]> git.puffer.fish Git - matthieu/frr.git/commit
bgpd: display link-state prefixes detail
authorLouis Scalbert <louis.scalbert@6wind.com>
Fri, 21 Apr 2023 10:04:08 +0000 (12:04 +0200)
committerLouis Scalbert <louis.scalbert@6wind.com>
Mon, 18 Sep 2023 13:05:54 +0000 (15:05 +0200)
commit7e0d9ff8ba984966689562553afe2734b04c8539
tree58bfb62539c08fc8a0e159d1827c49b300f6c4f6
parent3098772467ad8a46a8f35cdd4e502806740b2064
bgpd: display link-state prefixes detail

BGP link-state prefixes are displayed in the form of NLRI-TYPE /
Prefix-Length.

> r2# show bgp all
>
> For address family: Link State
> BGP table version is 8, local router ID is 192.0.2.2, vrf id 0
> Default local pref 100, local AS 65002
>     Network          Next Hop            Metric LocPrf Weight Path
>  *> Link/153                                0 65001 i
>  *> IPv6-Prefix/77                          0 65001 i
>  *> IPv4-Prefix/57                          0 65001 i
>  *> Node/49                                 0 65001 i
>  *> Node/45                                 0 65001 i

Add a lib prefix display hook in bgpd to display properly all the details.

> r2# show bgp all
>
> For address family: Link State
> BGP table version is 8, local router ID is 192.0.2.2, vrf id 0
> Default local pref 100, local AS 65002
>     Network          Next Hop            Metric LocPrf Weight Path
>  *> Link OSPFv3 ID:0xffffffffffffffff {Local {AS:4294967295 ID:4294967295 Area:4294967295 Rtr:10.10.10.11:2.2.2.2} Remote {AS:4294967295 ID:4294967295 Area:4294967295 Rtr:10.10.10.10:1.1.1.1} IPv4:10.1.0.1 Neigh-IPv4:10.1.0.2 IPv6:2001::1 Neigh-IPv6:2001::2 MT:0,2}/153
>                                            0 65001 i
>  *> IPv6-Prefix OSPFv3 ID:0x20 {Local {AS:65001 ID:0 Area:0 Rtr:10.10.10.10} MT:2 OSPF-Route-Type:1 IPv6:12:12::12:12/128}/77
>                                            0 65001 i
>  *> IPv4-Prefix OSPFv2 ID:0x20 {Local {AS:65001 ID:0 Area:0 Rtr:10.10.10.10:1.1.1.1} IPv4:89.10.11.0/24}/57
>                                            0 65001 i
>  *> Node OSPFv2 ID:0x20 {Local {AS:65001 ID:0 Area:0 Rtr:10.10.10.10:1.1.1.1}}/49
>                                            0 65001 i
>  *> Node OSPFv2 ID:0x20 {Local {AS:65001 ID:0 Area:0 Rtr:10.10.10.10}}/45
>                                            0 65001 i

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
bgpd/bgp_linkstate.c [new file with mode: 0644]
bgpd/bgp_linkstate.h [new file with mode: 0644]
bgpd/bgp_linkstate_tlv.c
bgpd/bgp_linkstate_tlv.h
bgpd/bgp_route.c
bgpd/bgpd.c
bgpd/subdir.am