aboutsummaryrefslogtreecommitdiffstats
path: root/include/ll_map.h
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 /include/ll_map.h
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 'include/ll_map.h')
-rw-r--r--include/ll_map.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/ll_map.h b/include/ll_map.h
index 4c78498e..b98a5714 100644
--- a/include/ll_map.h
+++ b/include/ll_map.h
@@ -10,5 +10,6 @@ extern const char *ll_index_to_name(unsigned idx);
extern const char *ll_idx_n2a(unsigned idx, char *buf);
extern int ll_index_to_type(unsigned idx);
extern int ll_index_to_flags(unsigned idx);
+extern unsigned namehash(const char *str);
#endif /* __LL_MAP_H__ */