diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2024-12-19 18:21:07 +0200 |
|---|---|---|
| committer | Donatas Abraitis <donatas@opensourcerouting.org> | 2024-12-19 18:21:07 +0200 |
| commit | aade9a7992750e45634b8ce54f141c93e1f6c6de (patch) | |
| tree | 7d59a61c41e925a7fce1a13155f7c254b6dfa32b /lib/xref.c | |
| parent | 708f08cb189ce15e3b55b6a8f6e1247df5849f86 (diff) | |
bgpd: Print totalRoutes and totalPaths in JSON output
E.g.:
```
r1# sh bgp ipv4 unicast neighbors 192.168.1.2 routes json
{
"vrfId": 0,
"vrfName": "default",
"tableVersion": 2,
"routerId": "192.168.1.1",
"defaultLocPrf": 100,
"localAS": 65001,
"routes": { "172.16.16.254/32": [{"valid":true,"bestpath":true,"selectionReason":"Nothing left to compare","pathFrom":"external","prefix":"172.16.16.254","prefixLen":32,"network":"172.16.16.254\/32","version":2,"weight":0,"peerId":"192.168.1.2","path":"65002 65006","origin":"incomplete","nexthops":[{"ip":"192.168.1.2","hostname":"r2","afi":"ipv4","used":true}]},{"valid":true,"multipath":true,"pathFrom":"external","prefix":"172.16.16.254","prefixLen":32,"network":"172.16.16.254\/32","version":2,"weight":0,"peerId":"192.168.1.2","path":"65002 65005","origin":"incomplete","nexthops":[{"ip":"192.168.1.2","hostname":"r2","afi":"ipv4","used":true}]}]
} , "totalRoutes": 1, "totalPaths": 2 }
```
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'lib/xref.c')
0 files changed, 0 insertions, 0 deletions
