diff options
author | Elise Lennion <elise.lennion@gmail.com> | 2016-11-29 23:12:37 -0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-11-30 19:31:18 +0100 |
commit | ccc5da470e76032f8e175920553516835efb30f1 (patch) | |
tree | 50011acf096213e345f014b2e51025f2400b128d /include/datatype.h | |
parent | 7222680eb328b5cebcea78b1dc6ccfacadeaa172 (diff) |
datatype: Replace getnameinfo() by internal lookup table
To avoid exceeding the inputs number limit of the flex scanner used,
when calling getnameinfo() in inet_service_type_print().
The new symbol_table was associated with inet_service_type, to enable
listing all pre-defined services using nft command line tool.
The listed services are all well-known and registered ports of my
local /etc/services file, from Ubuntu 16.04. Service numbers are
converted to respect network byte order.
Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/datatype.h')
-rw-r--r-- | include/datatype.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/datatype.h b/include/datatype.h index 9f3f711c..d4fe817b 100644 --- a/include/datatype.h +++ b/include/datatype.h @@ -196,6 +196,8 @@ extern void symbol_table_print(const struct symbol_table *tbl, extern struct symbol_table *rt_symbol_table_init(const char *filename); extern void rt_symbol_table_free(struct symbol_table *tbl); +extern const struct symbol_table inet_service_tbl; + extern const struct datatype invalid_type; extern const struct datatype verdict_type; extern const struct datatype nfproto_type; |