mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2025-01-18 06:51:54 +00:00
SNMP: Improve cli output
This commit is contained in:
parent
c41a9e044b
commit
35954b667f
@ -814,14 +814,20 @@ snmp_bgp4_show_info(struct snmp_proto *p)
|
|||||||
cli_msg(-1006, " Local router id %R", p->bgp_local_id);
|
cli_msg(-1006, " Local router id %R", p->bgp_local_id);
|
||||||
cli_msg(-1006, " BGP peers");
|
cli_msg(-1006, " BGP peers");
|
||||||
|
|
||||||
|
if (p->bgp_hash.count == 0)
|
||||||
|
{
|
||||||
|
cli_msg(-1006, " <no peers available>");
|
||||||
|
}
|
||||||
|
|
||||||
if (!snmp_is_active(p))
|
if (!snmp_is_active(p))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
HASH_WALK(p->bgp_hash, next, peer)
|
HASH_WALK(p->bgp_hash, next, peer)
|
||||||
{
|
{
|
||||||
cli_msg(-1006, " protocol name: %s", peer->bgp_proto->p.name);
|
cli_msg(-1006, " Protocol name: %s", peer->bgp_proto->p.name);
|
||||||
cli_msg(-1006, " Remote IPv4 address: %I4", peer->peer_ip);
|
cli_msg(-1006, " Remote IPv4 address: %I4", peer->peer_ip);
|
||||||
cli_msg(-1006, " Remote router id %R", peer->bgp_proto->remote_id);
|
cli_msg(-1006, " Remote router id %R", peer->bgp_proto->remote_id);
|
||||||
|
// TODO: add local ip addr
|
||||||
}
|
}
|
||||||
HASH_WALK_END;
|
HASH_WALK_END;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user