summaryrefslogtreecommitdiffstats
path: root/include/obj.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/obj.h')
-rw-r--r--include/obj.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/obj.h b/include/obj.h
index 10f806c..d217737 100644
--- a/include/obj.h
+++ b/include/obj.h
@@ -22,6 +22,11 @@ struct nftnl_obj {
uint32_t flags;
uint64_t handle;
+ struct {
+ void *data;
+ uint32_t len;
+ } user;
+
union {
struct nftnl_obj_counter {
uint64_t pkts;
@@ -99,12 +104,13 @@ struct obj_ops {
const char *name;
uint32_t type;
size_t alloc_len;
- int max_attr;
+ int nftnl_max_attr;
+ struct attr_policy *attr_policy;
int (*set)(struct nftnl_obj *e, uint16_t type, const void *data, uint32_t data_len);
const void *(*get)(const struct nftnl_obj *e, uint16_t type, uint32_t *data_len);
int (*parse)(struct nftnl_obj *e, struct nlattr *attr);
void (*build)(struct nlmsghdr *nlh, const struct nftnl_obj *e);
- int (*snprintf)(char *buf, size_t len, uint32_t type, uint32_t flags, const struct nftnl_obj *e);
+ int (*output)(char *buf, size_t len, uint32_t flags, const struct nftnl_obj *e);
};
extern struct obj_ops obj_ops_counter;