]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/zebra_ns.h
Merge pull request #3502 from donaldsharp/socket_to_me_baby
[mirror_frr.git] / zebra / zebra_ns.h
index f6b8f5f9b34694c2d31c164fd90024a13de3af68..d3592f8f305d9b942dfab015a72e80f7b48eeb1c 100644 (file)
@@ -25,6 +25,9 @@
 #include <lib/ns.h>
 #include <lib/vrf.h>
 
+#include "zebra/rib.h"
+#include "zebra/zebra_vrf.h"
+
 #ifdef HAVE_NETLINK
 /* Socket interface to kernel */
 struct nlsock {
@@ -35,18 +38,6 @@ struct nlsock {
 };
 #endif
 
-struct zebra_ns_table {
-       RB_ENTRY(zebra_ns_table) zebra_ns_table_entry;
-
-       uint32_t tableid;
-       afi_t afi;
-
-       struct route_table *table;
-};
-RB_HEAD(zebra_ns_table_head, zebra_ns_table);
-RB_PROTOTYPE(zebra_ns_table_head, zebra_ns_table, zebra_ns_table_entry,
-            zebra_ns_table_entry_compare)
-
 struct zebra_ns {
        /* net-ns name.  */
        char name[VRF_NAMSIZ];
@@ -55,24 +46,14 @@ struct zebra_ns {
        ns_id_t ns_id;
 
 #ifdef HAVE_NETLINK
-       struct nlsock netlink;     /* kernel messages */
-       struct nlsock netlink_cmd; /* command channel */
+       struct nlsock netlink;        /* kernel messages */
+       struct nlsock netlink_cmd;    /* command channel */
+       struct nlsock netlink_dplane; /* dataplane channel */
        struct thread *t_netlink;
 #endif
 
        struct route_table *if_table;
 
-       /* L3-VNI hash table (for EVPN). Only in default instance */
-       struct hash *l3vni_table;
-
-#if defined(HAVE_RTADV)
-       struct rtadv rtadv;
-#endif /* HAVE_RTADV */
-
-       struct zebra_ns_table_head ns_tables;
-
-       struct hash *rules_hash;
-
        /* Back pointer */
        struct ns *ns;
 };
@@ -82,14 +63,9 @@ struct zebra_ns *zebra_ns_lookup(ns_id_t ns_id);
 int zebra_ns_init(void);
 int zebra_ns_enable(ns_id_t ns_id, void **info);
 int zebra_ns_disabled(struct ns *ns);
-int zebra_ns_disable(ns_id_t ns_id, void **info);
+int zebra_ns_early_shutdown(struct ns *ns);
+int zebra_ns_final_shutdown(struct ns *ns);
 
-extern struct route_table *zebra_ns_find_table(struct zebra_ns *zns,
-                                              uint32_t tableid, afi_t afi);
-extern struct route_table *zebra_ns_get_table(struct zebra_ns *zns,
-                                             struct zebra_vrf *zvrf,
-                                             uint32_t tableid, afi_t afi);
 int zebra_ns_config_write(struct vty *vty, struct ns *ns);
 
-unsigned long zebra_ns_score_proto(u_char proto, u_short instance);
 #endif