diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2008-11-25 01:03:19 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2008-11-25 01:03:19 +0100 |
commit | 20506e55b12ba22b761a1ad84dc8a47ce8c82f2e (patch) | |
tree | a23824017b20e4161e6310fefdfd0a20503fca99 /include/internal/stack.h | |
parent | 972e6b3c19f3c79b59804308efac447bd2d016ec (diff) |
bsf: major rework of the BSF generation code
This patch reworks the BSF automatic generation code. This
feature needs more love and it has several limitations like
that the maximum number of IPs are 127 due to BSF code
restrictions. See this patch as a first step forward.
This patch also adds the stack data type, which is used to
resolve jump dynamically instead of the previous static
approach.
This patch also includes fixes in the limitations, previous
calculations were wrong.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/internal/stack.h')
-rw-r--r-- | include/internal/stack.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/internal/stack.h b/include/internal/stack.h new file mode 100644 index 0000000..f57bd15 --- /dev/null +++ b/include/internal/stack.h @@ -0,0 +1,11 @@ +#ifndef _STACK_H_ +#define _STACK_H_ + +struct stack; + +struct stack *stack_create(size_t elem_size, int max_elems); +void stack_destroy(struct stack *s); +int stack_push(struct stack *s, void *data); +int stack_pop(struct stack *s, void *data); + +#endif |