zebra: Add the 'struct zebra_ns' data structure

This commit adds the 'struct zebra_ns' data structure.
We are not currently using it.  But pretty much
everything after this commit in zebra depends on it.

Signed-off-by: Vipin Kumar <vipin@cumulusnetworks.com>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2016-02-01 09:56:42 -08:00
parent f93e3f696c
commit 244a59d228

View File

@ -28,6 +28,7 @@
#include "table.h"
#include "queue.h"
#include "nexthop.h"
#include "vrf.h"
#define DISTANCE_INFINITY 255
#define ZEBRA_KERNEL_TABLE_MAX 252 /* support for no more than this rt tables */
@ -283,6 +284,21 @@ struct nlsock
};
#endif
/* NetNS ID type. */
typedef u_int16_t ns_id_t;
struct zebra_ns
{
/* net-ns name. */
char name[VRF_NAMSIZ];
/* Identifier. */
ns_id_t ns_id;
struct route_table *if_table;
};
/* Routing table instance. */
struct zebra_vrf
{
@ -290,7 +306,7 @@ struct zebra_vrf
vrf_id_t vrf_id;
/* Routing table name. */
char *name;
char name[VRF_NAMSIZ];
/* Description. */
char *desc;
@ -298,6 +314,8 @@ struct zebra_vrf
/* FIB identifier. */
u_char fib_id;
u_int32_t table_id;
/* Routing table. */
struct route_table *table[AFI_MAX][SAFI_MAX];
@ -331,6 +349,11 @@ struct zebra_vrf
#if defined (HAVE_RTADV)
struct rtadv rtadv;
#endif /* HAVE_RTADV */
/*
* Back pointer to the owning namespace.
*/
struct zebra_ns *zns;
};
/*