diff options
Diffstat (limited to 'include/expr_ops.h')
-rw-r--r-- | include/expr_ops.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/include/expr_ops.h b/include/expr_ops.h index 01f6fef..6cfb3b5 100644 --- a/include/expr_ops.h +++ b/include/expr_ops.h @@ -7,24 +7,23 @@ struct nlattr; struct nlmsghdr; struct nftnl_expr; -struct nftnl_reg; + +struct attr_policy { + uint32_t maxlen; +}; struct expr_ops { const char *name; uint32_t alloc_len; - int max_attr; + int nftnl_max_attr; + struct attr_policy *attr_policy; void (*init)(const struct nftnl_expr *e); void (*free)(const struct nftnl_expr *e); int (*set)(struct nftnl_expr *e, uint16_t type, const void *data, uint32_t data_len); const void *(*get)(const struct nftnl_expr *e, uint16_t type, uint32_t *data_len); int (*parse)(struct nftnl_expr *e, struct nlattr *attr); void (*build)(struct nlmsghdr *nlh, const struct nftnl_expr *e); - int (*snprintf)(char *buf, size_t len, uint32_t flags, const struct nftnl_expr *e); - struct { - int (*len)(const struct nftnl_expr *e); - bool (*cmp)(const struct nftnl_reg *reg, const struct nftnl_expr *e); - void (*update)(struct nftnl_reg *reg, const struct nftnl_expr *e); - } reg; + int (*output)(char *buf, size_t len, uint32_t flags, const struct nftnl_expr *e); }; struct expr_ops *nftnl_expr_ops_lookup(const char *name); |