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>
#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 */
};
#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
{
vrf_id_t vrf_id;
/* Routing table name. */
- char *name;
+ char name[VRF_NAMSIZ];
/* Description. */
char *desc;
/* FIB identifier. */
u_char fib_id;
+ u_int32_t table_id;
+
/* Routing table. */
struct route_table *table[AFI_MAX][SAFI_MAX];
#if defined (HAVE_RTADV)
struct rtadv rtadv;
#endif /* HAVE_RTADV */
+
+ /*
+ * Back pointer to the owning namespace.
+ */
+ struct zebra_ns *zns;
};
/*