summaryrefslogtreecommitdiff
path: root/lib/ns.h
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2016-10-28 22:32:07 -0200
committerRenato Westphal <renato@opensourcerouting.org>2016-11-28 16:18:35 -0200
commitf30c50b99223be343b7fe1ae9e374602ec0d93d5 (patch)
treeb56a33113f07c0657711844df53483bd153a3971 /lib/ns.h
parent1fbe3e585ddb0a1c16a870b8112b145732549f45 (diff)
zebra/lib: move some code around
* move netlink code from zebra_nc.c to kernel_netlink.c; * move vrf CLI commands from if.c/interface.c to vrf.c/zebra_vrf.c; * move declaration of the 'ns' structure to a header file. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'lib/ns.h')
-rw-r--r--lib/ns.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/ns.h b/lib/ns.h
index c96f1b2743..74616cd62f 100644
--- a/lib/ns.h
+++ b/lib/ns.h
@@ -33,6 +33,22 @@ typedef u_int16_t ns_id_t;
/* Default netns directory (Linux) */
#define NS_RUN_DIR "/var/run/netns"
+struct ns
+{
+ /* Identifier, same as the vector index */
+ ns_id_t ns_id;
+ /* Name */
+ char *name;
+ /* File descriptor */
+ int fd;
+
+ /* Master list of interfaces belonging to this NS */
+ struct list *iflist;
+
+ /* User data */
+ void *info;
+};
+
/*
* NS hooks
*/