diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-10-19 13:06:53 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-10-20 11:14:15 +0200 |
commit | abae556c886d94751128c0deb0feee9589fda4c3 (patch) | |
tree | f7fbcd9dcfa24ef80734d593ee80b847684e07b2 /include/xtables.h | |
parent | c2d9ed99316f26de2d57d9798eee50034114540b (diff) |
libxtables: expose new etherdb lookup function through libxtables API
This is used from extensions and included in libxtables, so we have to
make them public.
Fixes: 31f1434dfe37 ("libxtables: Integrate getethertype.c from xtables core")
Reported-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Acked-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'include/xtables.h')
-rw-r--r-- | include/xtables.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/xtables.h b/include/xtables.h index bf169b08..8fb8843a 100644 --- a/include/xtables.h +++ b/include/xtables.h @@ -521,6 +521,18 @@ extern void xtables_ip6parse_any(const char *, struct in6_addr **, extern void xtables_ip6parse_multiple(const char *, struct in6_addr **, struct in6_addr **, unsigned int *); +/* Absolute file name for network data base files. */ +#define XT_PATH_ETHERTYPES "/etc/ethertypes" + +struct xt_ethertypeent { + char *e_name; /* Official ethernet type name. */ + char **e_aliases; /* Alias list. */ + int e_ethertype; /* Ethernet type number. */ +}; + +extern struct xt_ethertypeent *xtables_getethertypebyname(const char *name); +extern struct xt_ethertypeent *xtables_getethertypebynumber(int ethertype); + /** * Print the specified value to standard output, quoting dangerous * characters if required. |