diff options
author | Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com> | 2014-05-06 13:28:33 +0200 |
---|---|---|
committer | Arturo Borrero Gonzalez <aborrero@cica.es> | 2014-05-07 17:09:29 +0200 |
commit | caa1cf2960db0d0a01e707f5a82a05d0718ff498 (patch) | |
tree | daad2ad6efadd88271a9351b52e7ee50049ac555 /include/mnl.h | |
parent | c179ee88d91a84fc75dc4602cca500e8fa72ed66 (diff) |
nft-sync: complete --fetch operation
This patch complete the --fetch operation in the server side.
By now, the format of the ruleset is XML. In further patches we can include
additional config options to let the admin choose one of XML/JSON.
Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/mnl.h')
-rw-r--r-- | include/mnl.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/mnl.h b/include/mnl.h new file mode 100644 index 0000000..cd146bd --- /dev/null +++ b/include/mnl.h @@ -0,0 +1,24 @@ +#ifndef _MNL_H_ +#define _MNL_H_ + +#include <libmnl/libmnl.h> +#include <libnftnl/common.h> +#include <libnftnl/ruleset.h> +#include <libnftnl/table.h> +#include <libnftnl/chain.h> +#include <libnftnl/set.h> +#include <libnftnl/rule.h> + +#include "config.h" + +struct nft_rule_list *mnl_rule_dump(struct mnl_socket *nf_sock, int family); +struct nft_chain_list *mnl_chain_dump(struct mnl_socket *nf_sock, int family); +struct nft_table_list *mnl_table_dump(struct mnl_socket *nf_sock, int family); +struct nft_set_list *mnl_set_dump(struct mnl_socket *nf_sock, int family, const char *table); +int mnl_setelem_get(struct mnl_socket *nf_sock, struct nft_set *nls); +struct nft_ruleset *mnl_ruleset_dump(struct mnl_socket *nf_sock); +int nfts_socket_open(struct nft_sync_inst *nfts_inst); +void nfts_socket_close(struct nft_sync_inst *nfts_inst); +const char *netlink_dump_ruleset(struct mnl_socket *s); + +#endif /* _MNL_H_ */ |