From 59e949294f4688bafe44b7def2972987224520c8 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Mon, 20 Jan 2014 10:26:57 +0100 Subject: rename library to libnftnl We plan to use this library name for the higher layer library. Signed-off-by: Pablo Neira Ayuso --- include/libnftnl/common.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 include/libnftnl/common.h (limited to 'include/libnftnl/common.h') diff --git a/include/libnftnl/common.h b/include/libnftnl/common.h new file mode 100644 index 0000000..9d18b2b --- /dev/null +++ b/include/libnftnl/common.h @@ -0,0 +1,31 @@ +#ifndef _LIBNFTNL_COMMON_H_ +#define _LIBNFTNL_COMMON_H_ + +enum { + NFT_PARSE_EBADINPUT = 0, + NFT_PARSE_EMISSINGNODE, + NFT_PARSE_EBADTYPE, +}; + +enum nft_output_type { + NFT_OUTPUT_DEFAULT = 0, + NFT_OUTPUT_XML, + NFT_OUTPUT_JSON, +}; + +enum nft_parse_type { + NFT_PARSE_NONE = 0, + NFT_PARSE_XML, + NFT_PARSE_JSON, + NFT_PARSE_MAX, +}; + +struct nft_parse_err; + +struct nlmsghdr *nft_nlmsg_build_hdr(char *buf, uint16_t cmd, uint16_t family, + uint16_t type, uint32_t seq); + +struct nft_parse_err *nft_parse_err_alloc(void); +void nft_parse_err_free(struct nft_parse_err *); +int nft_parse_perror(const char *str, struct nft_parse_err *err); +#endif -- cgit v1.2.3 From a4a59b37ffce3b351ce6ddcfa3d964f23e4fb891 Mon Sep 17 00:00:00 2001 From: Arturo Borrero Date: Tue, 21 Jan 2014 13:08:32 +0100 Subject: include: add stdint.h to common.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes: /usr/local/include/libnftnl/common.h:25:49: error: unknown type name ‘uint16_t’ /usr/local/include/libnftnl/common.h:25:63: error: unknown type name ‘uint16_t’ /usr/local/include/libnftnl/common.h:26:10: error: unknown type name ‘uint16_t’ /usr/local/include/libnftnl/common.h:26:25: error: unknown type name ‘uint32_t’ Signed-off-by: Arturo Borrero Gonzalez Signed-off-by: Pablo Neira Ayuso --- include/libnftnl/common.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/libnftnl/common.h') diff --git a/include/libnftnl/common.h b/include/libnftnl/common.h index 9d18b2b..f0c20f0 100644 --- a/include/libnftnl/common.h +++ b/include/libnftnl/common.h @@ -1,6 +1,8 @@ #ifndef _LIBNFTNL_COMMON_H_ #define _LIBNFTNL_COMMON_H_ +#include + enum { NFT_PARSE_EBADINPUT = 0, NFT_PARSE_EMISSINGNODE, -- cgit v1.2.3