path: root/include/libnftnl/table.h
diff options
authorPablo Neira Ayuso <>2015-09-01 20:19:56 +0200
committerPablo Neira Ayuso <>2015-09-07 19:24:19 +0200
commit760768890e60617acfd144dce875a4a3be14513c (patch)
tree14a3a4f53e81fd9b44c8481e123f2c0ceb6f2bff /include/libnftnl/table.h
parentb7154e52fc417e927bef0bbfa5db6e7a71f28602 (diff)
src: rename existing functions to use the nftnl_ prefix
So we can use the nft_* prefix anytime soon for our upcoming higher level library. After this patch, the nft_* symbols become an alias of the nftnl_* symbols. Signed-off-by: Pablo Neira Ayuso <>
Diffstat (limited to 'include/libnftnl/table.h')
1 files changed, 42 insertions, 42 deletions
diff --git a/include/libnftnl/table.h b/include/libnftnl/table.h
index fac79e7..0f0589b 100644
--- a/include/libnftnl/table.h
+++ b/include/libnftnl/table.h
@@ -12,66 +12,66 @@
extern "C" {
-struct nft_table;
+struct nftnl_table;
-struct nft_table *nft_table_alloc(void);
-void nft_table_free(struct nft_table *);
+struct nftnl_table *nftnl_table_alloc(void);
+void nftnl_table_free(struct nftnl_table *);
enum {
-bool nft_table_attr_is_set(const struct nft_table *t, uint16_t attr);
-void nft_table_attr_unset(struct nft_table *t, uint16_t attr);
-void nft_table_attr_set(struct nft_table *t, uint16_t attr, const void *data);
-void nft_table_attr_set_data(struct nft_table *t, uint16_t attr,
+bool nftnl_table_attr_is_set(const struct nftnl_table *t, uint16_t attr);
+void nftnl_table_attr_unset(struct nftnl_table *t, uint16_t attr);
+void nftnl_table_attr_set(struct nftnl_table *t, uint16_t attr, const void *data);
+void nftnl_table_attr_set_data(struct nftnl_table *t, uint16_t attr,
const void *data, uint32_t data_len);
-const void *nft_table_attr_get(struct nft_table *t, uint16_t attr);
-const void *nft_table_attr_get_data(struct nft_table *t, uint16_t attr,
+const void *nftnl_table_attr_get(struct nftnl_table *t, uint16_t attr);
+const void *nftnl_table_attr_get_data(struct nftnl_table *t, uint16_t attr,
uint32_t *data_len);
-void nft_table_attr_set_u8(struct nft_table *t, uint16_t attr, uint8_t data);
-void nft_table_attr_set_u32(struct nft_table *t, uint16_t attr, uint32_t data);
-void nft_table_attr_set_str(struct nft_table *t, uint16_t attr, const char *str);
-uint8_t nft_table_attr_get_u8(struct nft_table *t, uint16_t attr);
-uint32_t nft_table_attr_get_u32(struct nft_table *t, uint16_t attr);
-const char *nft_table_attr_get_str(struct nft_table *t, uint16_t attr);
+void nftnl_table_attr_set_u8(struct nftnl_table *t, uint16_t attr, uint8_t data);
+void nftnl_table_attr_set_u32(struct nftnl_table *t, uint16_t attr, uint32_t data);
+void nftnl_table_attr_set_str(struct nftnl_table *t, uint16_t attr, const char *str);
+uint8_t nftnl_table_attr_get_u8(struct nftnl_table *t, uint16_t attr);
+uint32_t nftnl_table_attr_get_u32(struct nftnl_table *t, uint16_t attr);
+const char *nftnl_table_attr_get_str(struct nftnl_table *t, uint16_t attr);
struct nlmsghdr;
-void nft_table_nlmsg_build_payload(struct nlmsghdr *nlh, const struct nft_table *t);
+void nftnl_table_nlmsg_build_payload(struct nlmsghdr *nlh, const struct nftnl_table *t);
-int nft_table_parse(struct nft_table *t, enum nft_parse_type type,
- const char *data, struct nft_parse_err *err);
-int nft_table_parse_file(struct nft_table *t, enum nft_parse_type type,
- FILE *fp, struct nft_parse_err *err);
-int nft_table_snprintf(char *buf, size_t size, struct nft_table *t, uint32_t type, uint32_t flags);
-int nft_table_fprintf(FILE *fp, struct nft_table *t, uint32_t type, uint32_t flags);
+int nftnl_table_parse(struct nftnl_table *t, enum nftnl_parse_type type,
+ const char *data, struct nftnl_parse_err *err);
+int nftnl_table_parse_file(struct nftnl_table *t, enum nftnl_parse_type type,
+ FILE *fp, struct nftnl_parse_err *err);
+int nftnl_table_snprintf(char *buf, size_t size, struct nftnl_table *t, uint32_t type, uint32_t flags);
+int nftnl_table_fprintf(FILE *fp, struct nftnl_table *t, uint32_t type, uint32_t flags);
-#define nft_table_nlmsg_build_hdr nft_nlmsg_build_hdr
-int nft_table_nlmsg_parse(const struct nlmsghdr *nlh, struct nft_table *t);
+#define nftnl_table_nlmsg_build_hdr nftnl_nlmsg_build_hdr
+int nftnl_table_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_table *t);
-struct nft_table_list;
+struct nftnl_table_list;
-struct nft_table_list *nft_table_list_alloc(void);
-void nft_table_list_free(struct nft_table_list *list);
-int nft_table_list_is_empty(struct nft_table_list *list);
-int nft_table_list_foreach(struct nft_table_list *table_list, int (*cb)(struct nft_table *t, void *data), void *data);
+struct nftnl_table_list *nftnl_table_list_alloc(void);
+void nftnl_table_list_free(struct nftnl_table_list *list);
+int nftnl_table_list_is_empty(struct nftnl_table_list *list);
+int nftnl_table_list_foreach(struct nftnl_table_list *table_list, int (*cb)(struct nftnl_table *t, void *data), void *data);
-void nft_table_list_add(struct nft_table *r, struct nft_table_list *list);
-void nft_table_list_add_tail(struct nft_table *r, struct nft_table_list *list);
-void nft_table_list_del(struct nft_table *r);
+void nftnl_table_list_add(struct nftnl_table *r, struct nftnl_table_list *list);
+void nftnl_table_list_add_tail(struct nftnl_table *r, struct nftnl_table_list *list);
+void nftnl_table_list_del(struct nftnl_table *r);
-struct nft_table_list_iter;
+struct nftnl_table_list_iter;
-struct nft_table_list_iter *nft_table_list_iter_create(struct nft_table_list *l);
-struct nft_table *nft_table_list_iter_next(struct nft_table_list_iter *iter);
-void nft_table_list_iter_destroy(struct nft_table_list_iter *iter);
+struct nftnl_table_list_iter *nftnl_table_list_iter_create(struct nftnl_table_list *l);
+struct nftnl_table *nftnl_table_list_iter_next(struct nftnl_table_list_iter *iter);
+void nftnl_table_list_iter_destroy(struct nftnl_table_list_iter *iter);
#ifdef __cplusplus
} /* extern "C" */