diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2009-01-30 05:38:11 +0100 |
---|---|---|
committer | Jan Engelhardt <jengelh@medozas.de> | 2009-01-30 05:38:34 +0100 |
commit | 1de7edffc9085c0f41c261dca995e28ae4126c29 (patch) | |
tree | be4430c82ac15fd9faf144fa0c14aefd843b70a2 /include/xtables.h.in | |
parent | 0f16c725aadaac7e670d632ecbaea3661ff00827 (diff) |
libxtables: prefix/order - move parse_protocol to xtables.c
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'include/xtables.h.in')
-rw-r--r-- | include/xtables.h.in | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/include/xtables.h.in b/include/xtables.h.in index c1bf6d59..07217d6a 100644 --- a/include/xtables.h.in +++ b/include/xtables.h.in @@ -21,6 +21,9 @@ #ifndef IPPROTO_DCCP #define IPPROTO_DCCP 33 #endif +#ifndef IPPROTO_MH +# define IPPROTO_MH 135 +#endif #ifndef IPPROTO_UDPLITE #define IPPROTO_UDPLITE 136 #endif @@ -151,6 +154,17 @@ struct xtables_rule_match { bool completed; }; +/** + * struct xtables_pprot - + * + * A few hardcoded protocols for 'all' and in case the user has no + * /etc/protocols. + */ +struct xtables_pprot { + const char *name; + u_int8_t num; +}; + enum xtables_tryload { XTF_DONT_LOAD, XTF_DURING_LOAD, @@ -239,10 +253,13 @@ extern void xtables_save_string(const char *value); # define _init __attribute__((constructor)) _INIT #endif -/* Present in both iptables.c and ip6tables.c */ -extern u_int16_t parse_protocol(const char *s); +extern const struct xtables_pprot xtables_chain_protos[]; +extern u_int16_t xtables_parse_protocol(const char *s); #ifdef XTABLES_INTERNAL +# ifndef ARRAY_SIZE +# define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x))) +# endif # include <xtables/internal.h> #endif |