]> git.ipfire.org Git - thirdparty/nftables.git/commit
datatype: Replace getnameinfo() by internal lookup table
authorElise Lennion <elise.lennion@gmail.com>
Wed, 30 Nov 2016 01:12:37 +0000 (23:12 -0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 30 Nov 2016 18:31:18 +0000 (19:31 +0100)
commitccc5da470e76032f8e175920553516835efb30f1
tree50011acf096213e345f014b2e51025f2400b128d
parent7222680eb328b5cebcea78b1dc6ccfacadeaa172
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>
include/datatype.h
src/Makefile.am
src/datatype.c
src/services.c [new file with mode: 0644]