aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ll_map.c
diff options
context:
space:
mode:
authorNicolas Dichtel <nicolas.dichtel@6wind.com>2015-04-15 14:23:22 +0200
committerStephen Hemminger <shemming@brocade.com>2015-04-20 10:02:38 -0700
commitd652ccbf8195e63ff6eedb923fad060b065fd18a (patch)
tree6b626838ce1eb8dab516c5015778422b5385cb32 /lib/ll_map.c
parentb1410e0ab1b4f2f9f0b21392efc213692adf2bd5 (diff)
downloadplatform_external_iproute2-d652ccbf8195e63ff6eedb923fad060b065fd18a.tar.gz
platform_external_iproute2-d652ccbf8195e63ff6eedb923fad060b065fd18a.tar.bz2
platform_external_iproute2-d652ccbf8195e63ff6eedb923fad060b065fd18a.zip
netns: allow to dump and monitor nsid
Two commands are added: - ip netns list-id - ip monitor nsid A cache is also added to remember the association between the iproute2 netns name (from /var/run/netns/) and the nsid. To avoid interfering with the rth socket, a new rtnl socket (rtnsh) is used to get nsid (we may send rtnl request during listing on rth). Example: $ ip netns list-id nsid 0 (iproute2 netns name: foo) $ ip monitor nsid Deleted nsid 0 (iproute2 netns name: foo) nsid 16 (iproute2 netns name: bar) Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Diffstat (limited to 'lib/ll_map.c')
-rw-r--r--lib/ll_map.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ll_map.c b/lib/ll_map.c
index db34a2aa..c6f70274 100644
--- a/lib/ll_map.c
+++ b/lib/ll_map.c
@@ -52,7 +52,7 @@ static struct ll_cache *ll_get_by_index(unsigned index)
return NULL;
}
-static unsigned namehash(const char *str)
+unsigned namehash(const char *str)
{
unsigned hash = 5381;