summaryrefslogtreecommitdiffstats
path: root/include/libnftables/set.h
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2014-01-20 10:26:57 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2014-01-20 10:43:45 +0100
commit59e949294f4688bafe44b7def2972987224520c8 (patch)
tree0eccb41d605f64c88b9488879d34100ad9f17823 /include/libnftables/set.h
parent8460aa61e7136973ea01c40098f348b13d9af26f (diff)
rename library to libnftnllibnftnl-1.0.0
We plan to use this library name for the higher layer library. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/libnftables/set.h')
-rw-r--r--include/libnftables/set.h119
1 files changed, 0 insertions, 119 deletions
diff --git a/include/libnftables/set.h b/include/libnftables/set.h
deleted file mode 100644
index c4b1ff6..0000000
--- a/include/libnftables/set.h
+++ /dev/null
@@ -1,119 +0,0 @@
-#ifndef _LIBNFTABLES_SET_H_
-#define _LIBNFTABLES_SET_H_
-
-#include <stdio.h>
-#include <stdint.h>
-#include <stdbool.h>
-#include <sys/types.h>
-
-#include <libnftables/common.h>
-
-enum {
- NFT_SET_ATTR_TABLE,
- NFT_SET_ATTR_NAME,
- NFT_SET_ATTR_FLAGS,
- NFT_SET_ATTR_KEY_TYPE,
- NFT_SET_ATTR_KEY_LEN,
- NFT_SET_ATTR_DATA_TYPE,
- NFT_SET_ATTR_DATA_LEN,
- NFT_SET_ATTR_FAMILY,
-};
-
-struct nft_set;
-
-struct nft_set *nft_set_alloc(void);
-void nft_set_free(struct nft_set *s);
-
-bool nft_set_attr_is_set(const struct nft_set *s, uint16_t attr);
-void nft_set_attr_unset(struct nft_set *s, uint16_t attr);
-void nft_set_attr_set(struct nft_set *s, uint16_t attr, const void *data);
-void nft_set_attr_set_u32(struct nft_set *s, uint16_t attr, uint32_t val);
-void nft_set_attr_set_str(struct nft_set *s, uint16_t attr, const char *str);
-
-const void *nft_set_attr_get(struct nft_set *s, uint16_t attr);
-const char *nft_set_attr_get_str(struct nft_set *s, uint16_t attr);
-uint32_t nft_set_attr_get_u32(struct nft_set *s, uint16_t attr);
-
-struct nlmsghdr;
-
-#define nft_set_nlmsg_build_hdr nft_nlmsg_build_hdr
-void nft_set_nlmsg_build_payload(struct nlmsghdr *nlh, struct nft_set *s);
-int nft_set_nlmsg_parse(const struct nlmsghdr *nlh, struct nft_set *s);
-int nft_set_elems_nlmsg_parse(const struct nlmsghdr *nlh, struct nft_set *s);
-
-int nft_set_snprintf(char *buf, size_t size, struct nft_set *s, uint32_t type, uint32_t flags);
-int nft_set_fprintf(FILE *fp, struct nft_set *s, uint32_t type, uint32_t flags);
-
-struct nft_set_list;
-
-struct nft_set_list *nft_set_list_alloc(void);
-void nft_set_list_free(struct nft_set_list *list);
-int nft_set_list_is_empty(struct nft_set_list *list);
-void nft_set_list_add(struct nft_set *s, struct nft_set_list *list);
-void nft_set_list_add_tail(struct nft_set *s, struct nft_set_list *list);
-void nft_set_list_del(struct nft_set *s);
-int nft_set_list_foreach(struct nft_set_list *set_list, int (*cb)(struct nft_set *t, void *data), void *data);
-
-struct nft_set_list_iter;
-struct nft_set_list_iter *nft_set_list_iter_create(struct nft_set_list *l);
-struct nft_set *nft_set_list_iter_cur(struct nft_set_list_iter *iter);
-struct nft_set *nft_set_list_iter_next(struct nft_set_list_iter *iter);
-void nft_set_list_iter_destroy(struct nft_set_list_iter *iter);
-
-int nft_set_parse(struct nft_set *s, enum nft_parse_type type,
- const char *data, struct nft_parse_err *err);
-int nft_set_parse_file(struct nft_set *s, enum nft_parse_type type,
- FILE *fp, struct nft_parse_err *err);
-
-/*
- * Set elements
- */
-
-enum {
- NFT_SET_ELEM_ATTR_FLAGS,
- NFT_SET_ELEM_ATTR_KEY,
- NFT_SET_ELEM_ATTR_VERDICT,
- NFT_SET_ELEM_ATTR_CHAIN,
- NFT_SET_ELEM_ATTR_DATA,
-};
-
-struct nft_set_elem;
-
-struct nft_set_elem *nft_set_elem_alloc(void);
-void nft_set_elem_free(struct nft_set_elem *s);
-
-void nft_set_elem_add(struct nft_set *s, struct nft_set_elem *elem);
-
-void nft_set_elem_attr_unset(struct nft_set_elem *s, uint16_t attr);
-void nft_set_elem_attr_set(struct nft_set_elem *s, uint16_t attr, const void *data, uint32_t data_len);
-void nft_set_elem_attr_set_u32(struct nft_set_elem *s, uint16_t attr, uint32_t val);
-void nft_set_elem_attr_set_str(struct nft_set_elem *s, uint16_t attr, const char *str);
-
-const void *nft_set_elem_attr_get(struct nft_set_elem *s, uint16_t attr, uint32_t *data_len);
-const char *nft_set_elem_attr_get_str(struct nft_set_elem *s, uint16_t attr);
-uint32_t nft_set_elem_attr_get_u32(struct nft_set_elem *s, uint16_t attr);
-
-bool nft_set_elem_attr_is_set(const struct nft_set_elem *s, uint16_t attr);
-
-#define nft_set_elem_nlmsg_build_hdr nft_nlmsg_build_hdr
-void nft_set_elems_nlmsg_build_payload(struct nlmsghdr *nlh, struct nft_set *s);
-void nft_set_elem_nlmsg_build_payload(struct nlmsghdr *nlh, struct nft_set_elem *e);
-
-int nft_set_elem_nlmsg_parse(const struct nlmsghdr *nlh, struct nft_set_elem *s);
-
-int nft_set_elem_parse(struct nft_set_elem *e, enum nft_parse_type type,
- const char *data, struct nft_parse_err *err);
-int nft_set_elem_parse_file(struct nft_set_elem *e, enum nft_parse_type type,
- FILE *fp, struct nft_parse_err *err);
-int nft_set_elem_snprintf(char *buf, size_t size, struct nft_set_elem *s, uint32_t type, uint32_t flags);
-int nft_set_elem_fprintf(FILE *fp, struct nft_set_elem *se, uint32_t type, uint32_t flags);
-
-int nft_set_elem_foreach(struct nft_set *s, int (*cb)(struct nft_set_elem *e, void *data), void *data);
-
-struct nft_set_elems_iter;
-struct nft_set_elems_iter *nft_set_elems_iter_create(struct nft_set *s);
-struct nft_set_elem *nft_set_elems_iter_cur(struct nft_set_elems_iter *iter);
-struct nft_set_elem *nft_set_elems_iter_next(struct nft_set_elems_iter *iter);
-void nft_set_elems_iter_destroy(struct nft_set_elems_iter *iter);
-
-#endif /* _LIBNFTABLES_SET_H_ */