From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Leblond Subject: [nft PATH 07/16] libnftables: add NFT_EXIT_* to library Date: Wed, 16 Aug 2017 22:43:01 +0200 Message-ID: <20170816204310.3371-8-eric@regit.org> References: <20170816204310.3371-1-eric@regit.org> Cc: netfilter-devel@vger.kernel.org, Eric Leblond To: pablo@netfilter.org Return-path: Received: from home.regit.org ([37.187.126.138]:40706 "EHLO home.regit.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752726AbdHPVZg (ORCPT ); Wed, 16 Aug 2017 17:25:36 -0400 In-Reply-To: <20170816204310.3371-1-eric@regit.org> Sender: netfilter-devel-owner@vger.kernel.org List-ID: So it can be used by client to check function return. Signed-off-by: Eric Leblond --- include/nftables.h | 7 ------- include/nftables/nftables.h | 7 +++++++ src/netlink.c | 1 + src/utils.c | 1 + 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/include/nftables.h b/include/nftables.h index c2bb7d8..aad204e 100644 --- a/include/nftables.h +++ b/include/nftables.h @@ -48,13 +48,6 @@ extern unsigned int max_errors; extern unsigned int debug_level; extern const char *include_paths[INCLUDE_PATHS_MAX]; -enum nftables_exit_codes { - NFT_EXIT_SUCCESS = 0, - NFT_EXIT_FAILURE = 1, - NFT_EXIT_NOMEM = 2, - NFT_EXIT_NONL = 3, -}; - struct input_descriptor; struct location { const struct input_descriptor *indesc; diff --git a/include/nftables/nftables.h b/include/nftables/nftables.h index 980c6ec..20a062c 100644 --- a/include/nftables/nftables.h +++ b/include/nftables/nftables.h @@ -14,6 +14,13 @@ #include #include +enum nftables_exit_codes { + NFT_EXIT_SUCCESS = 0, + NFT_EXIT_FAILURE = 1, + NFT_EXIT_NOMEM = 2, + NFT_EXIT_NONL = 3, +}; + void nft_global_init(void); void nft_global_deinit(void); diff --git a/src/netlink.c b/src/netlink.c index 7311149..ea5d9b1 100644 --- a/src/netlink.c +++ b/src/netlink.c @@ -30,6 +30,7 @@ #include #include +#include #include #include #include diff --git a/src/utils.c b/src/utils.c index 47f5b79..aace563 100644 --- a/src/utils.c +++ b/src/utils.c @@ -16,6 +16,7 @@ #include #include +#include #include void __noreturn __memory_allocation_error(const char *filename, uint32_t line) -- 2.14.1