So it can be used by client to check function return.

Signed-off-by: Eric Leblond <e...@regit.org>
---
 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 <stdint.h>
 #include <stdbool.h>
 
+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 <linux/netfilter.h>
 
 #include <nftables.h>
+#include <nftables/nftables.h>
 #include <netlink.h>
 #include <mnl.h>
 #include <expression.h>
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 <string.h>
 
 #include <nftables.h>
+#include <nftables/nftables.h>
 #include <utils.h>
 
 void __noreturn __memory_allocation_error(const char *filename, uint32_t line)
-- 
2.14.1

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to