diff options
| author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2021-04-10 10:27:06 +0300 |
|---|---|---|
| committer | Donatas Abraitis <donatas.abraitis@gmail.com> | 2021-04-13 22:06:32 +0300 |
| commit | f280c93b118be645e7b6ef334f7c30e9f9f08303 (patch) | |
| tree | 18b3af1754263f3fe52d8d106d54c6c28e420053 /lib/filter.c | |
| parent | d75213d26036a2880f23f5e67cb1c890f20299de (diff) | |
bgpd: Add `show bgp json detail` command
Print detailed version for JSON output when dumping ALL BGP table with
`show bgp <afi> <safi> json detail`.
This output should be at some sort of identical to show_ip_bgp_route_cmd.
To avoid breaking backward-compatibility for `show bgp json`, adding
'detail' keyword for that.
In long-term it's easier for operators to compare stuff just looking at global
view instead of per-prefix for details.
Before:
```
],"192.168.100.1/32": [
{
"valid":true,
"bestpath":true,
"selectionReason":"First path received",
"pathFrom":"external",
"prefix":"192.168.100.1",
"prefixLen":32,
"network":"192.168.100.1\/32",
"metric":0,
"weight":32768,
"peerId":"(unspec)",
"path":"",
"origin":"incomplete",
"nexthops":[
{
"ip":"0.0.0.0",
"hostname":"exit1-debian-9",
"afi":"ipv4",
"used":true
}
]
}
] } }
```
After:
```
],"192.168.100.1/32": [
{
"aspath":{
"string":"Local",
"segments":[
],
"length":0
},
"origin":"incomplete",
"metric":0,
"weight":32768,
"valid":true,
"sourced":true,
"bestpath":{
"overall":true,
"selectionReason":"First path received"
},
"lastUpdate":{
"epoch":1618040124,
"string":"Sat Apr 10 07:35:24 2021\n"
},
"nexthops":[
{
"ip":"0.0.0.0",
"hostname":"exit1-debian-9",
"afi":"ipv4",
"metric":0,
"accessible":true,
"used":true
}
],
"peer":{
"peerId":"0.0.0.0",
"routerId":"192.168.100.1"
}
}
] } }
```
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'lib/filter.c')
0 files changed, 0 insertions, 0 deletions
