mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-04 06:55:18 +00:00
bgpd: labeled unicast display
Implement 'show' and 'clear' commands for the labeled-unicast address-family. Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
This commit is contained in:
parent
cd1964ff38
commit
b60f527556
@ -8300,7 +8300,7 @@ bgp_show_lcommunity_list (struct vty *vty, struct bgp *bgp, const char *lcom,
|
||||
|
||||
DEFUN (show_ip_bgp_large_community_list,
|
||||
show_ip_bgp_large_community_list_cmd,
|
||||
"show [ip] bgp [<view|vrf> WORD] [<ipv4|ipv6> [<unicast|multicast|vpn|encap>]] large-community-list <(1-500)|WORD> [json]",
|
||||
"show [ip] bgp [<view|vrf> WORD] [<ipv4|ipv6> [<unicast|multicast|vpn|encap|labeled-unicast>]] large-community-list <(1-500)|WORD> [json]",
|
||||
SHOW_STR
|
||||
IP_STR
|
||||
BGP_STR
|
||||
@ -8311,6 +8311,7 @@ DEFUN (show_ip_bgp_large_community_list,
|
||||
"Address Family modifier\n"
|
||||
"Address Family modifier\n"
|
||||
"Address Family modifier\n"
|
||||
"Address Family modifier\n"
|
||||
"Display routes matching the large-community-list\n"
|
||||
"large-community-list number\n"
|
||||
"large-community-list name\n"
|
||||
@ -8346,7 +8347,7 @@ DEFUN (show_ip_bgp_large_community_list,
|
||||
}
|
||||
DEFUN (show_ip_bgp_large_community,
|
||||
show_ip_bgp_large_community_cmd,
|
||||
"show [ip] bgp [<view|vrf> WORD] [<ipv4|ipv6> [<unicast|multicast|vpn|encap>]] large-community [AA:BB:CC] [json]",
|
||||
"show [ip] bgp [<view|vrf> WORD] [<ipv4|ipv6> [<unicast|multicast|vpn|encap|labeled-unicast>]] large-community [AA:BB:CC] [json]",
|
||||
SHOW_STR
|
||||
IP_STR
|
||||
BGP_STR
|
||||
@ -8357,6 +8358,7 @@ DEFUN (show_ip_bgp_large_community,
|
||||
"Address Family modifier\n"
|
||||
"Address Family modifier\n"
|
||||
"Address Family modifier\n"
|
||||
"Address Family modifier\n"
|
||||
"Display routes matching the large-communities\n"
|
||||
"List of large-community numbers\n"
|
||||
JSON_STR)
|
||||
@ -9300,7 +9302,7 @@ bgp_peer_counts (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi, u_c
|
||||
|
||||
DEFUN (show_ip_bgp_instance_neighbor_prefix_counts,
|
||||
show_ip_bgp_instance_neighbor_prefix_counts_cmd,
|
||||
"show [ip] bgp [<view|vrf> WORD] [<ipv4|ipv6> [<unicast|multicast|vpn|encap>]] "
|
||||
"show [ip] bgp [<view|vrf> WORD] [<ipv4|ipv6> [<unicast|multicast|vpn|encap|labeled-unicast>]] "
|
||||
"neighbors <A.B.C.D|X:X::X:X|WORD> prefix-counts [json]",
|
||||
SHOW_STR
|
||||
IP_STR
|
||||
@ -9312,6 +9314,7 @@ DEFUN (show_ip_bgp_instance_neighbor_prefix_counts,
|
||||
"Address Family modifier\n"
|
||||
"Address Family modifier\n"
|
||||
"Address Family modifier\n"
|
||||
"Address Family modifier\n"
|
||||
"Detailed information on TCP and BGP neighbor connections\n"
|
||||
"Neighbor to display information about\n"
|
||||
"Neighbor to display information about\n"
|
||||
|
@ -265,6 +265,12 @@ argv_find_and_parse_safi (struct cmd_token **argv, int argc, int *index, safi_t
|
||||
if (safi)
|
||||
*safi = SAFI_MULTICAST;
|
||||
}
|
||||
else if (argv_find (argv, argc, "labeled-unicast", index))
|
||||
{
|
||||
ret = 1;
|
||||
if (safi)
|
||||
*safi = SAFI_LABELED_UNICAST;
|
||||
}
|
||||
else if (argv_find (argv, argc, "vpn", index))
|
||||
{
|
||||
ret = 1;
|
||||
@ -296,12 +302,12 @@ argv_find_and_parse_safi (struct cmd_token **argv, int argc, int *index, safi_t
|
||||
* that is being parsed.
|
||||
*
|
||||
* The show commands are generally of the form:
|
||||
* "show [ip] bgp [<view|vrf> WORD] [<ipv4|ipv6> [<unicast|multicast|vpn|encap>]] ..."
|
||||
* "show [ip] bgp [<view|vrf> WORD] [<ipv4|ipv6> [<unicast|multicast|vpn|encap|labeled-unicast>]] ..."
|
||||
*
|
||||
* Since we use argv_find if the show command in particular doesn't have:
|
||||
* [ip]
|
||||
* [<view|vrf> WORD]
|
||||
* [<ipv4|ipv6> [<unicast|multicast|vpn|encap>]]
|
||||
* [<ipv4|ipv6> [<unicast|multicast|vpn|encap|labeled-unicast>]]
|
||||
* The command parsing should still be ok.
|
||||
*
|
||||
* vty -> The vty for the command so we can output some useful data in
|
||||
@ -6917,6 +6923,8 @@ afi_safi_print (afi_t afi, safi_t safi)
|
||||
return "IPv4 Unicast";
|
||||
else if (afi == AFI_IP && safi == SAFI_MULTICAST)
|
||||
return "IPv4 Multicast";
|
||||
else if (afi == AFI_IP && safi == SAFI_LABELED_UNICAST)
|
||||
return "IPv4 labeled-unicast";
|
||||
else if (afi == AFI_IP && safi == SAFI_MPLS_VPN)
|
||||
return "IPv4 VPN";
|
||||
else if (afi == AFI_IP && safi == SAFI_ENCAP)
|
||||
@ -6925,6 +6933,8 @@ afi_safi_print (afi_t afi, safi_t safi)
|
||||
return "IPv6 Unicast";
|
||||
else if (afi == AFI_IP6 && safi == SAFI_MULTICAST)
|
||||
return "IPv6 Multicast";
|
||||
else if (afi == AFI_IP6 && safi == SAFI_LABELED_UNICAST)
|
||||
return "IPv6 labeled-unicast";
|
||||
else if (afi == AFI_IP6 && safi == SAFI_MPLS_VPN)
|
||||
return "IPv6 VPN";
|
||||
else if (afi == AFI_IP6 && safi == SAFI_ENCAP)
|
||||
@ -6942,6 +6952,8 @@ afi_safi_json (afi_t afi, safi_t safi)
|
||||
return "IPv4Unicast";
|
||||
else if (afi == AFI_IP && safi == SAFI_MULTICAST)
|
||||
return "IPv4Multicast";
|
||||
else if (afi == AFI_IP && safi == SAFI_LABELED_UNICAST)
|
||||
return "IPv4LabeledUnicast";
|
||||
else if (afi == AFI_IP && safi == SAFI_MPLS_VPN)
|
||||
return "IPv4VPN";
|
||||
else if (afi == AFI_IP && safi == SAFI_ENCAP)
|
||||
@ -6950,6 +6962,8 @@ afi_safi_json (afi_t afi, safi_t safi)
|
||||
return "IPv6Unicast";
|
||||
else if (afi == AFI_IP6 && safi == SAFI_MULTICAST)
|
||||
return "IPv6Multicast";
|
||||
else if (afi == AFI_IP6 && safi == SAFI_LABELED_UNICAST)
|
||||
return "IPv6LabeledUnicast";
|
||||
else if (afi == AFI_IP6 && safi == SAFI_MPLS_VPN)
|
||||
return "IPv6VPN";
|
||||
else if (afi == AFI_IP6 && safi == SAFI_ENCAP)
|
||||
|
@ -28,12 +28,13 @@ struct bgp;
|
||||
|
||||
#define BGP_AFI_CMD_STR "<ipv4|ipv6>"
|
||||
#define BGP_AFI_HELP_STR "Address Family\nAddress Family\n"
|
||||
#define BGP_SAFI_CMD_STR "<unicast|multicast|vpn|encap>"
|
||||
#define BGP_SAFI_CMD_STR "<unicast|multicast|vpn|encap|labeled-unicast>"
|
||||
#define BGP_SAFI_HELP_STR \
|
||||
"Address Family modifier\n" \
|
||||
"Address Family modifier\n" \
|
||||
"Address Family modifier\n" \
|
||||
"Address Family modifier\n" \
|
||||
"Address Family modifier\n" \
|
||||
"Address Family modifier\n"
|
||||
#define BGP_AFI_SAFI_CMD_STR BGP_AFI_CMD_STR" "BGP_SAFI_CMD_STR
|
||||
#define BGP_AFI_SAFI_HELP_STR BGP_AFI_HELP_STR BGP_SAFI_HELP_STR
|
||||
|
Loading…
Reference in New Issue
Block a user