diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-08-03 17:31:48 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-10-11 15:15:02 +0200 |
commit | 00c179b4c9f9f9394cc6f79e5f2a68410631fd72 (patch) | |
tree | 00057636d125f3c89e2b9485c67c4283a98d91b2 /src/internal.h |
initial version of libnftables
It adds support for table, chain and rule handling.
This also includes expression handling for each rule.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/internal.h')
-rw-r--r-- | src/internal.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/internal.h b/src/internal.h new file mode 100644 index 0000000..5ba7c76 --- /dev/null +++ b/src/internal.h @@ -0,0 +1,32 @@ +#ifndef INTERNAL_H +#define INTERNAL_H 1 + +#include "config.h" +#ifdef HAVE_VISIBILITY_HIDDEN +# define __visible __attribute__((visibility("default"))) +# define EXPORT_SYMBOL(x) typeof(x) (x) __visible +#else +# define EXPORT_SYMBOL +#endif + +#include "linux_list.h" + +#include <stdint.h> + +struct expr_ops; + +struct nft_rule_expr { + struct list_head head; + uint32_t flags; + struct expr_ops *ops; + uint8_t data[]; +}; + +#define SNPRINTF_BUFFER_SIZE(ret, size, len, offset) \ + size += ret; \ + if (ret > len) \ + ret = len; \ + offset += ret; \ + len -= ret; + +#endif |