]> git.proxmox.com Git - mirror_frr.git/blobdiff - bgpd/bgp_evpn.h
Merge pull request #12780 from opensourcerouting/spdx-license-id
[mirror_frr.git] / bgpd / bgp_evpn.h
index 5f5be1a2730b274bf5002b0846dbcd07611d5089..1dce4820d680a05a67bbe8f202c1aa14cad388d6 100644 (file)
@@ -21,27 +21,6 @@ static inline int is_evpn_enabled(void)
        return bgp ? EVPN_ENABLED(bgp) : 0;
 }
 
-static inline void vni2label(vni_t vni, mpls_label_t *label)
-{
-       uint8_t *tag = (uint8_t *)label;
-
-       tag[0] = (vni >> 16) & 0xFF;
-       tag[1] = (vni >> 8) & 0xFF;
-       tag[2] = vni & 0xFF;
-}
-
-static inline vni_t label2vni(mpls_label_t *label)
-{
-       uint8_t *tag = (uint8_t *)label;
-       vni_t vni;
-
-       vni = ((uint32_t)*tag++ << 16);
-       vni |= (uint32_t)*tag++ << 8;
-       vni |= (uint32_t)(*tag & 0xFF);
-
-       return vni;
-}
-
 static inline int advertise_type5_routes(struct bgp *bgp_vrf,
                                         afi_t afi)
 {
@@ -214,5 +193,10 @@ bgp_evpn_handle_resolve_overlay_index_set(struct hash_bucket *bucket,
 extern void
 bgp_evpn_handle_resolve_overlay_index_unset(struct hash_bucket *bucket,
                                            void *arg);
+extern mpls_label_t *bgp_evpn_path_info_labels_get_l3vni(mpls_label_t *labels,
+                                                        uint32_t num_labels);
+extern vni_t bgp_evpn_path_info_get_l3vni(const struct bgp_path_info *pi);
+extern bool bgp_evpn_mpath_has_dvni(const struct bgp *bgp_vrf,
+                                   struct bgp_path_info *mpinfo);
 
 #endif /* _QUAGGA_BGP_EVPN_H */