"Address Family\n"
#define V4_HEADER \
- " Network Next Hop Metric LocPrf Weight Path"
+ " Network Next Hop Metric LocPrf Weight Path\n"
#define V4_HEADER_TAG \
- " Network Next Hop In tag/Out tag"
+ " Network Next Hop In tag/Out tag\n"
#define V4_HEADER_OVERLAY \
- " Network Next Hop EthTag Overlay Index RouterMac"
+ " Network Next Hop EthTag Overlay Index RouterMac\n"
-struct rd_as
-{
- u_int16_t type;
- as_t as;
- u_int32_t val;
-};
-
-struct rd_ip
-{
- u_int16_t type;
- struct in_addr ip;
- u_int16_t val;
-};
-
-#if ENABLE_BGP_VNC
-struct rd_vnc_eth
-{
- u_int16_t type;
- uint8_t local_nve_id;
- struct ethaddr macaddr;
-};
-#endif
-
-extern u_int16_t decode_rd_type (u_char *);
-extern void encode_rd_type (u_int16_t, u_char *);
extern void bgp_mplsvpn_init (void);
extern int bgp_nlri_parse_vpn (struct peer *, struct attr *, struct bgp_nlri *);
extern u_int32_t decode_label (mpls_label_t *);
}
}
- if(attr->extra)
+ struct eth_segment_id *id = &(attr->evpn_overlay.eth_s_id);
+ char *str = esi2str(id);
+ vty_out (vty, "%s", str);
+ XFREE (MTYPE_TMP, str);
+ if (IS_EVPN_PREFIX_IPADDR_V4((struct prefix_evpn *)p))
{
- struct eth_segment_id *id = &(attr->extra->evpn_overlay.eth_s_id);
- char *str = esi2str(id);
- vty_out (vty, "%s", str);
- XFREE (MTYPE_TMP, str);
- if (IS_EVPN_PREFIX_IPADDR_V4((struct prefix_evpn *)p))
- {
- vty_out (vty, "/%s", inet_ntoa (attr->extra->evpn_overlay.gw_ip.ipv4));
- }
- else if (IS_EVPN_PREFIX_IPADDR_V6((struct prefix_evpn *)p))
- {
- vty_out (vty, "/%s",
- inet_ntop (AF_INET6, &(attr->extra->evpn_overlay.gw_ip.ipv6),
- buf, BUFSIZ));
- }
- if(attr->extra->ecommunity)
- {
- char *mac = NULL;
- struct ecommunity_val *routermac = ecommunity_lookup (attr->extra->ecommunity,
- ECOMMUNITY_ENCODE_EVPN,
- ECOMMUNITY_EVPN_SUBTYPE_ROUTERMAC);
- if(routermac)
- mac = ecom_mac2str((char *)routermac->val);
- if(mac)
- {
- vty_out (vty, "/%s",(char *)mac);
- XFREE(MTYPE_TMP, mac);
- }
+ vty_out (vty, "/%s", inet_ntoa (attr->evpn_overlay.gw_ip.ipv4));
+ }
+ else if (IS_EVPN_PREFIX_IPADDR_V6((struct prefix_evpn *)p))
+ {
+ vty_out (vty, "/%s",
+ inet_ntop (AF_INET6, &(attr->evpn_overlay.gw_ip.ipv6),
+ buf, BUFSIZ));
+ }
+ if(attr->ecommunity)
+ {
+ char *mac = NULL;
+ struct ecommunity_val *routermac = ecommunity_lookup (attr->ecommunity,
+ ECOMMUNITY_ENCODE_EVPN,
+ ECOMMUNITY_EVPN_SUBTYPE_ROUTERMAC);
+ if(routermac)
+ mac = ecom_mac2str((char *)routermac->val);
+ if(mac)
+ {
+ vty_out (vty, "/%s",(char *)mac);
+ XFREE(MTYPE_TMP, mac);
}
}
- vty_out (vty, VTYNL);
+ vty_out (vty, "\n");
}
/* dampening route */
}
if (!json_paths)
- vty_out (vty, VTYNL);
+ vty_out (vty, "\n");
/* display the link-local nexthop */
- if (attr->extra && attr->extra->mp_nexthop_len == BGP_ATTR_NHLEN_IPV6_GLOBAL_AND_LL)
+ if (attr->mp_nexthop_len == BGP_ATTR_NHLEN_IPV6_GLOBAL_AND_LL)
{
if (json_paths)
{
}
else
{
- vty_outln (vty, " (%s) %s",
+ vty_out (vty, " (%s) %s\n",
- inet_ntop (AF_INET6, &attr->extra->mp_nexthop_local,
+ inet_ntop (AF_INET6, &attr->mp_nexthop_local,
buf, INET6_ADDRSTRLEN),
- attr->extra->mp_nexthop_prefer_global ? "(prefer-global)" : "(used)");
+ attr->mp_nexthop_prefer_global ? "(prefer-global)" : "(used)");
}
}
/* If we do not have a link-local nexthop then we must flag the global as "used" */
}
else
{
- vty_outln (vty, " Extended Community: %s",
+ vty_out (vty, " Extended Community: %s\n",
- attr->extra->ecommunity->str);
+ attr->ecommunity->str);
}
}
/* Line 6 display Large community */
if (attr->flag & ATTR_FLAG_BIT(BGP_ATTR_LARGE_COMMUNITIES))
- vty_outln (vty, " Large Community: %s",
- vty_out (vty, " Large Community: %s\n",
- attr->extra->lcommunity->str);
++ vty_outln (vty, " Large Community: %s\n",
+ attr->lcommunity->str);
/* Line 7 display Originator, Cluster-id */
if ((attr->flag & ATTR_FLAG_BIT(BGP_ATTR_ORIGINATOR_ID)) ||
}
/* Label Index */
- if (attr->extra->label_index != BGP_INVALID_LABEL_INDEX)
+ if (attr->label_index != BGP_INVALID_LABEL_INDEX)
{
if (json_paths)
- json_object_int_add(json_path, "labelIndex", attr->extra->label_index);
+ json_object_int_add(json_path, "labelIndex", attr->label_index);
else
- vty_outln (vty, " Label Index: %d",
+ vty_out (vty, " Label Index: %d\n",
- attr->extra->label_index);
+ attr->label_index);
}
/* Line 8 display Addpath IDs */
((safi == SAFI_MPLS_VPN) || (safi == SAFI_EVPN)) ? ":" : "",
buf2,
p->prefixlen);
+#endif
if (has_valid_label)
- vty_outln (vty, "Local label: %d", label);
+ vty_out (vty, "Local label: %d\n", label);
- else if (bgp_labeled_safi(safi))
- vty_out (vty, "Local label: not allocated\n");
+#if defined (HAVE_CUMULUS)
+ if (bgp_labeled_safi(safi) && safi != SAFI_EVPN)
+#else
+ if (bgp_labeled_safi(safi))
+#endif
- vty_out(vty, "not allocated%s", VTY_NEWLINE);
++ vty_out(vty, "not allocated\n");
}
for (ri = rn->info; ri; ri = ri->next)
/* Attributes */
count = attr_count();
- vty_out (vty, "%ld BGP attributes, using %s of memory%s", count,
+ vty_out (vty, "%ld BGP attributes, using %s of memory\n", count,
mtype_memstr (memstrbuf, sizeof (memstrbuf),
- count * sizeof(struct attr)),
- VTYNL);
+ count * sizeof(struct attr)));
- if ((count = mtype_stats_alloc (MTYPE_ATTR_EXTRA)))
- vty_out (vty, "%ld BGP extra attributes, using %s of memory\n", count,
- mtype_memstr (memstrbuf, sizeof (memstrbuf),
- count * sizeof(struct attr_extra)));
if ((count = attr_unknown_count()))
- vty_out (vty, "%ld unknown attributes%s", count, VTYNL);
+ vty_out (vty, "%ld unknown attributes\n", count);
/* AS_PATH attributes */
count = aspath_count ();
bgp_config_write_maxpaths (vty, bgp, afi, safi, &write);
bgp_config_write_table_map (vty, bgp, afi, safi, &write);
+ if (safi == SAFI_EVPN)
+ bgp_config_write_evpn_info (vty, bgp, afi, safi, &write);
+
if (write)
- vty_outln (vty, " exit-address-family");
+ vty_out (vty, " exit-address-family\n");
return write;
}
}
if (IS_ZEBRA_DEBUG_MPLS)
{
- vty_out (vty, "debug zebra mpls%s", VTYNL);
+ vty_out (vty, "debug zebra mpls\n");
write++;
}
+ if (IS_ZEBRA_DEBUG_VXLAN)
+ {
+ vty_out (vty, "debug zebra vxlan%s", VTY_NEWLINE);
+ write++;
+ }
return write;
}
zserv_time_buf(&client->connect_time, cbuf, ZEBRA_TIME_BUF));
if (client->nh_reg_time)
{
- vty_outln (vty, "Nexthop Registry Time: %s ",
+ vty_out (vty, "Nexthop Registry Time: %s \n",
zserv_time_buf(&client->nh_reg_time, nhbuf, ZEBRA_TIME_BUF));
if (client->nh_last_upd_time)
- vty_outln (vty, "Nexthop Last Update Time: %s ",
+ vty_out (vty, "Nexthop Last Update Time: %s \n",
zserv_time_buf(&client->nh_last_upd_time, mbuf, ZEBRA_TIME_BUF));
else
- vty_outln (vty, "No Nexthop Update sent");
+ vty_out (vty, "No Nexthop Update sent\n");
}
else
- vty_outln (vty, "Not registered for Nexthop Updates");
+ vty_out (vty, "Not registered for Nexthop Updates\n");
- vty_outln (vty, "Last Msg Rx Time: %s ",
+ vty_out (vty, "Last Msg Rx Time: %s \n",
zserv_time_buf(&client->last_read_time, rbuf, ZEBRA_TIME_BUF));
- vty_outln (vty, "Last Msg Tx Time: %s ",
+ vty_out (vty, "Last Msg Tx Time: %s \n",
zserv_time_buf(&client->last_write_time, wbuf, ZEBRA_TIME_BUF));
if (client->last_read_time)
- vty_outln (vty, "Last Rcvd Cmd: %s ",
+ vty_out (vty, "Last Rcvd Cmd: %s \n",
zserv_command_string(client->last_read_cmd));
if (client->last_write_time)
- vty_outln (vty, "Last Sent Cmd: %s ",
+ vty_out (vty, "Last Sent Cmd: %s \n",
zserv_command_string(client->last_write_cmd));
- vty_out (vty, VTYNL);
+ vty_out (vty, "\n");
- vty_outln (vty, "Type Add Update Del ");
- vty_outln (vty, "================================================== ");
- vty_outln (vty, "IPv4 %-12d%-12d%-12d", client->v4_route_add_cnt,
+ vty_out (vty, "Type Add Update Del \n");
+ vty_out (vty, "================================================== \n");
+ vty_out (vty, "IPv4 %-12d%-12d%-12d\n", client->v4_route_add_cnt,
client->v4_route_upd8_cnt, client->v4_route_del_cnt);
- vty_outln (vty, "IPv6 %-12d%-12d%-12d", client->v6_route_add_cnt,
+ vty_out (vty, "IPv6 %-12d%-12d%-12d\n", client->v6_route_add_cnt,
client->v6_route_upd8_cnt, client->v6_route_del_cnt);
- vty_outln (vty, "Redist:v4 %-12d%-12d%-12d", client->redist_v4_add_cnt, 0,
+ vty_out (vty, "Redist:v4 %-12d%-12d%-12d\n", client->redist_v4_add_cnt, 0,
client->redist_v4_del_cnt);
- vty_outln (vty, "Redist:v6 %-12d%-12d%-12d", client->redist_v6_add_cnt, 0,
+ vty_out (vty, "Redist:v6 %-12d%-12d%-12d\n", client->redist_v6_add_cnt, 0,
client->redist_v6_del_cnt);
- vty_outln (vty, "Connected %-12d%-12d%-12d", client->ifadd_cnt, 0,
+ vty_out (vty, "Connected %-12d%-12d%-12d\n", client->ifadd_cnt, 0,
client->ifdel_cnt);
- vty_outln (vty, "BFD peer %-12d%-12d%-12d", client->bfd_peer_add_cnt,
+ vty_out (vty, "BFD peer %-12d%-12d%-12d\n", client->bfd_peer_add_cnt,
client->bfd_peer_upd8_cnt, client->bfd_peer_del_cnt);
- vty_outln (vty, "Interface Up Notifications: %d",client->ifup_cnt);
- vty_outln (vty, "Interface Down Notifications: %d",client->ifdown_cnt);
- vty_outln (vty, "VNI add notifications: %d", client->vniadd_cnt);
- vty_outln (vty, "VNI delete notifications: %d", client->vnidel_cnt);
- vty_outln (vty, "MAC-IP add notifications: %d", client->macipadd_cnt);
- vty_outln (vty, "MAC-IP delete notifications: %d", client->macipdel_cnt);
-
- vty_out (vty, VTYNL);
+ vty_out (vty, "Interface Up Notifications: %d\n",client->ifup_cnt);
+ vty_out (vty, "Interface Down Notifications: %d\n",client->ifdown_cnt);
++ vty_out (vty, "VNI add notifications: %d\n", client->vniadd_cnt);
++ vty_out (vty, "VNI delete notifications: %d\n", client->vnidel_cnt);
++ vty_out (vty, "MAC-IP add notifications: %d\n", client->macipadd_cnt);
++ vty_out (vty, "MAC-IP delete notifications: %d\n", client->macipdel_cnt);
+
+ vty_out (vty, "\n");
return;
}