mirror_iproute2/include
Nicolas Dichtel eaefb07804 ipnetns: enable to dump nsid conversion table
This patch enables to dump/get nsid from a netns into another netns.

Example:
$ ./test.sh
+ ip netns add foo
+ ip netns add bar
+ touch /var/run/netns/init_net
+ mount --bind /proc/1/ns/net /var/run/netns/init_net
+ ip netns set init_net 11
+ ip netns set foo 12
+ ip netns set bar 13
+ ip netns
init_net (id: 11)
bar (id: 13)
foo (id: 12)
+ ip -n foo netns set init_net 21
+ ip -n foo netns set foo 22
+ ip -n foo netns set bar 23
+ ip -n foo netns
init_net (id: 21)
bar (id: 23)
foo (id: 22)
+ ip -n bar netns set init_net 31
+ ip -n bar netns set foo 32
+ ip -n bar netns set bar 33
+ ip -n bar netns
init_net (id: 31)
bar (id: 33)
foo (id: 32)
+ ip netns list-id target-nsid 12
nsid 21 current-nsid 11 (iproute2 netns name: init_net)
nsid 22 current-nsid 12 (iproute2 netns name: foo)
nsid 23 current-nsid 13 (iproute2 netns name: bar)
+ ip -n foo netns list-id target-nsid 21
nsid 11 current-nsid 21 (iproute2 netns name: init_net)
nsid 12 current-nsid 22 (iproute2 netns name: foo)
nsid 13 current-nsid 23 (iproute2 netns name: bar)
+ ip -n bar netns list-id target-nsid 33 nsid 32
nsid 32 current-nsid 32 (iproute2 netns name: foo)
+ ip -n bar netns list-id target-nsid 31 nsid 32
nsid 12 current-nsid 32 (iproute2 netns name: foo)
+ ip netns list-id nsid 13
nsid 13 (iproute2 netns name: bar)

CC: Petr Oros <poros@redhat.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Tested-by: Petr Oros <poros@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2019-10-14 13:04:19 -07:00
..
iptables SPDX license identifiers 2017-11-24 12:21:35 -08:00
libiptc SPDX license identifiers 2017-11-24 12:21:35 -08:00
netinet ss: report ecnseen 2011-11-23 14:51:54 -08:00
uapi uapi: update btf from 5.4-rc1 2019-10-01 08:55:01 -07:00
bpf_api.h SPDX license identifiers 2017-11-24 12:21:35 -08:00
bpf_elf.h bpf: implement btf handling and map annotation 2018-07-17 19:38:44 -07:00
bpf_scm.h SPDX license identifiers 2017-11-24 12:21:35 -08:00
bpf_util.h tc: full JSON support for 'bpf' actions 2019-02-03 09:10:10 -08:00
color.h lib/color: make local functions static 2018-11-19 11:42:44 -08:00
dlfcn.h SPDX license identifiers 2017-11-24 12:21:35 -08:00
ip6tables.h SPDX license identifiers 2017-11-24 12:21:35 -08:00
iptables.h SPDX license identifiers 2017-11-24 12:21:35 -08:00
json_print.h json_print: drop extra semi-colons 2019-07-29 08:45:32 -07:00
json_writer.h Merge branch 'iproute2-master' into iproute2-next 2018-12-19 12:02:17 -08:00
libgenl.h genl: remove unnecessary extern 2018-09-10 11:53:07 -07:00
libnetlink.h ipnetns: enable to dump nsid conversion table 2019-10-14 13:04:19 -07:00
list.h devlink: Add support for devlink resource abstraction 2018-02-23 08:36:05 -08:00
ll_map.h ll_map: Add function to remove link cache entry by index 2019-02-22 18:51:15 -08:00
names.h tc: drop unused name_to_id function 2018-11-19 11:42:44 -08:00
namespace.h netns: make netns_{save,restore} static 2019-06-20 14:30:41 -07:00
rt_names.h SPDX license identifiers 2017-11-24 12:21:35 -08:00
rtm_map.h SPDX license identifiers 2017-11-24 12:21:35 -08:00
SNAPSHOT.h v5.3.0 2019-09-24 12:32:05 -07:00
utils.h utils: don't match empty strings as prefixes 2019-07-15 13:48:48 -07:00
xt-internal.h SPDX license identifiers 2017-11-24 12:21:35 -08:00
xtables.h tc: adjust xtables_match and xtables_target to changes in recent iptables 2019-06-24 16:12:17 -07:00