]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/zebra_vxlan.h
Merge pull request #5789 from donaldsharp/bgp_ebgp_reason
[mirror_frr.git] / zebra / zebra_vxlan.h
index 206f65044aa82426ef581fdb11a155bf9e02dd88..b551ba8dff37a2bdf285c9bc4d61b05159726ed4 100644 (file)
@@ -25,6 +25,7 @@
 #define _ZEBRA_VXLAN_H
 
 #include <zebra.h>
+#include <zebra/zebra_router.h>
 
 #include "linklist.h"
 #include "if.h"
@@ -34,6 +35,7 @@
 #include "lib/json.h"
 #include "zebra/zebra_vrf.h"
 #include "zebra/zserv.h"
+#include "zebra/zebra_dplane.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -44,14 +46,14 @@ extern "C" {
 static inline int is_evpn_enabled(void)
 {
        struct zebra_vrf *zvrf = NULL;
-       zvrf = zebra_vrf_lookup_by_id(VRF_DEFAULT);
-       return zvrf ? zvrf->advertise_all_vni : 0;
+       zvrf = zebra_vrf_get_evpn();
+       return zvrf ? EVPN_ENABLED(zvrf) : 0;
 }
 
 static inline int
 is_vxlan_flooding_head_end(void)
 {
-       struct zebra_vrf *zvrf = zebra_vrf_lookup_by_id(VRF_DEFAULT);
+       struct zebra_vrf *zvrf = zebra_vrf_get_evpn();
 
        if (!zvrf)
                return 0;
@@ -59,9 +61,11 @@ is_vxlan_flooding_head_end(void)
 }
 
 /* VxLAN interface change flags of interest. */
-#define ZEBRA_VXLIF_LOCAL_IP_CHANGE     0x1
-#define ZEBRA_VXLIF_MASTER_CHANGE       0x2
-#define ZEBRA_VXLIF_VLAN_CHANGE         0x4
+#define ZEBRA_VXLIF_LOCAL_IP_CHANGE     (1 << 0)
+#define ZEBRA_VXLIF_MASTER_CHANGE       (1 << 1)
+#define ZEBRA_VXLIF_VLAN_CHANGE         (1 << 2)
+#define ZEBRA_VXLIF_MCAST_GRP_CHANGE    (1 << 3)
+
 
 #define VNI_STR_LEN 32
 
@@ -76,6 +80,7 @@ extern void zebra_vxlan_advertise_svi_macip(ZAPI_HANDLER_ARGS);
 extern void zebra_vxlan_advertise_gw_macip(ZAPI_HANDLER_ARGS);
 extern void zebra_vxlan_advertise_all_vni(ZAPI_HANDLER_ARGS);
 extern void zebra_vxlan_dup_addr_detection(ZAPI_HANDLER_ARGS);
+extern void zebra_vxlan_sg_replay(ZAPI_HANDLER_ARGS);
 
 extern int is_l3vni_for_prefix_routes_only(vni_t vni);
 extern ifindex_t get_l3vni_svi_ifindex(vrf_id_t vrf_id);
@@ -136,7 +141,8 @@ extern void zebra_vxlan_print_neigh_vni_dad(struct vty *vty,
                                        struct zebra_vrf *zvrf, vni_t vni,
                                        bool use_json);
 extern void zebra_vxlan_print_vni(struct vty *vty, struct zebra_vrf *zvrf,
-                                 vni_t vni, bool use_json);
+                                 vni_t vni, bool use_json,
+                                 json_object *json_array);
 extern void zebra_vxlan_print_vnis(struct vty *vty, struct zebra_vrf *zvrf,
                                   bool use_json);
 extern void zebra_vxlan_print_vnis_detail(struct vty *vty,
@@ -209,6 +215,11 @@ extern int zebra_vxlan_clear_dup_detect_vni_all(struct vty *vty,
 extern int zebra_vxlan_clear_dup_detect_vni(struct vty *vty,
                                            struct zebra_vrf *zvrf,
                                            vni_t vni);
+extern void zebra_vxlan_handle_result(struct zebra_dplane_ctx *ctx);
+
+extern void zebra_evpn_init(void);
+extern void zebra_vxlan_macvlan_up(struct interface *ifp);
+extern void zebra_vxlan_macvlan_down(struct interface *ifp);
 
 #ifdef __cplusplus
 }