diff options
author | Patrick McHardy <kaber@trash.net> | 2009-07-28 14:17:35 +0200 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2009-07-28 14:17:35 +0200 |
commit | ebfd6822498965cdb9961ec1a986f0463de5c9c0 (patch) | |
tree | 9420686a2b0b1adb62734cf889734301136d93f1 /include/netlink.h | |
parent | 414fa58ae9f283c35c8510fc31f28ba77bb5fdf5 (diff) |
add support for new set API and standalone sets
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'include/netlink.h')
-rw-r--r-- | include/netlink.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/netlink.h b/include/netlink.h index ec9a6142..22ef489c 100644 --- a/include/netlink.h +++ b/include/netlink.h @@ -16,10 +16,12 @@ * * @msgs: message queue * @list: list of parsed rules/chains/tables + * @set: current set */ struct netlink_ctx { struct list_head *msgs; struct list_head list; + struct set *set; }; extern void netlink_dump_object(struct nl_object *obj); @@ -28,6 +30,7 @@ extern struct nfnl_nft_table *alloc_nft_table(const struct handle *h); extern struct nfnl_nft_chain *alloc_nft_chain(const struct handle *h); extern struct nfnl_nft_rule *alloc_nft_rule(const struct handle *h); extern struct nfnl_nft_expr *alloc_nft_expr(int (*init)(struct nfnl_nft_expr *)); +extern struct nfnl_nft_set *alloc_nft_set(const struct handle *h); extern struct nfnl_nft_data *alloc_nft_data(const void *data, unsigned int len); extern struct nfnl_nft_data *netlink_gen_data(const struct expr *expr); @@ -68,4 +71,17 @@ extern int netlink_get_table(struct netlink_ctx *ctx, const struct handle *h); extern int netlink_list_table(struct netlink_ctx *ctx, const struct handle *h); extern int netlink_flush_table(struct netlink_ctx *ctx, const struct handle *h); +extern int netlink_add_set(struct netlink_ctx *ctx, const struct handle *h, + struct set *set); +extern int netlink_delete_set(struct netlink_ctx *ctx, const struct handle *h); +extern int netlink_list_sets(struct netlink_ctx *ctx, const struct handle *h); +extern int netlink_get_set(struct netlink_ctx *ctx, const struct handle *h); + +extern int netlink_add_setelems(struct netlink_ctx *ctx, const struct handle *h, + const struct expr *expr); +extern int netlink_delete_setelems(struct netlink_ctx *ctx, const struct handle *h, + const struct expr *expr); +extern int netlink_get_setelems(struct netlink_ctx *ctx, const struct handle *h, + struct set *set); + #endif /* NFTABLES_NETLINK_H */ |