]> git.proxmox.com Git - mirror_iproute2.git/commit
ss: Put filter DB parsing into a separate function
authorPhil Sutter <phil@nwl.cc>
Tue, 27 Mar 2018 23:51:55 +0000 (01:51 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Wed, 28 Mar 2018 00:02:38 +0000 (17:02 -0700)
commit67d5fd558730ddbf271e44ad087137a7afde9247
tree97118721567ad654c65ecba6c2a1370198c8e14b
parentc121111ecbe32d795f99c99b17ce1553f5d63305
ss: Put filter DB parsing into a separate function

Use a table for database name parsing. The tricky bit is to allow for
association of a (nearly) arbitrary number of DBs with each name.
Luckily the number is not fully arbitrary as there is an upper bound of
MAX_DB items. Since it is not possible to have a variable length
array inside a variable length array, use this knowledge to make the
inner array of fixed length. But since DB values start from zero, an
explicit end entry needs to be present as well, so the inner array has
to be MAX_DB + 1 in size.

Signed-off-by: Phil Sutter <phil@nwl.cc>
misc/ss.c