/* dst prefix must be AF_INET or AF_INET6 prefix, to forge EVPN prefix */
extern int bgp_build_evpn_prefix (int evpn_type, uint32_t eth_tag, struct prefix *dst)
{
-#if defined(HAVE_EVPN)
struct evpn_addr *p_evpn_p;
struct prefix p2;
struct prefix *src = &p2;
else
return -1;
return 0;
-#else
- return -1;
-#endif /* !(HAVE_EVPN) */
}
prd.family = AF_UNSPEC;
prd.prefixlen = 64;
-#if !defined(HAVE_EVPN)
- return -1;
-#else
p_evpn_p = &p.u.prefix_evpn;
pnt = packet->nlri;
lim = pnt + packet->length;
/* Packet length consistency check. */
if (pnt != lim)
return -1;
-#endif /* !(HAVE_EVPN) */
return 0;
}
struct prefix *p, struct prefix_rd *prd,
u_char *label, struct attr *attr)
{
-#if defined(HAVE_EVPN)
int len;
char temp[16];
struct evpn_addr *p_evpn_p;
else
stream_put3 (s, 0);
return;
-#endif /* (HAVE_EVPN) */
}
#if ENABLE_BGP_VNC
u_int32_t label = 0;
#endif
-#if defined(HAVE_EVPN)
union gw_addr add;
-#endif /* (HAVE_EVPN) */
assert (bgp_static);
bgp_attr_extra_get (&attr)->mp_nexthop_len = IPV4_MAX_BYTELEN;
}
}
-#if defined(HAVE_EVPN)
if(afi == AFI_L2VPN)
{
if (bgp_static->gatewayIp.family == AF_INET)
bgp_add_routermac_ecom (&attr, bgp_static->router_mac);
}
}
-#endif /* (HAVE_EVPN) */
/* Apply route-map. */
if (bgp_static->rmap.name)
{
{
encode_label (0, tag);
}
-#if defined (HAVE_EVPN)
if (safi == SAFI_EVPN)
{
if( esi && str2esi (esi, NULL) == 0)
}
}
}
-#endif /* (HAVE_EVPN) */
prn = bgp_node_get (bgp->route[afi][safi],
(struct prefix *)&prd);
if (prn->info == NULL)
if(attr->extra)
{
-#if defined (HAVE_EVPN)
struct eth_segment_id *id = &(attr->extra->evpn_overlay.eth_s_id);
char *str = esi2str(id);
vty_out (vty, "%s", str);
inet_ntop (AF_INET6, &(attr->extra->evpn_overlay.gw_ip.ipv6),
buf, BUFSIZ));
}
-#endif /* (HAVE_EVPN) */
if(attr->extra->ecommunity)
{
char *mac = NULL;
inet_ntop (AF_INET, &bgp_static->igpnexthop, buf2, SU_ADDRSTRLEN);
prefix2str (p, buf, sizeof (buf)),
-#if defined (HAVE_EVPN)
vty_out (vty, " network %s rd %s ethtag %u tag %u esi %s gwip %s routermac %s",
buf, rdbuf, p->u.prefix_evpn.eth_tag,
decode_label (bgp_static->tag), esi, buf2 , macrouter);
-#endif /*(HAVE_EVPN)*/
vty_out (vty, "%s", VTY_NEWLINE);
}
return 0;