From a783e259d8d710208280126177487cc790418515 Mon Sep 17 00:00:00 2001 From: Ondrej Filip Date: Thu, 1 Jun 2000 15:53:06 +0000 Subject: Cisco-like "show ospf neighbors" implemented. --- proto/ospf/ospf.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'proto/ospf/ospf.c') diff --git a/proto/ospf/ospf.c b/proto/ospf/ospf.c index 92bb670..b8f7b98 100644 --- a/proto/ospf/ospf.c +++ b/proto/ospf/ospf.c @@ -316,3 +316,19 @@ struct protocol proto_ospf = { get_attr: ospf_get_attr, get_status: ospf_get_status }; + +void +ospf_sh_neigh(struct proto *p) +{ + struct ospf_iface *ifa; + struct ospf_neighbor *n; + struct proto_ospf *po=(struct proto_ospf *)p; + + cli_msg(-1013,"%s:",p->name); + cli_msg(-1013,"%-12s\t%3s\t%-15s\t%-5s\t%-12s\t%-10s","Router ID","Pri", + " State", "DTime", "Router IP", "Interface"); + WALK_LIST(ifa,po->iface_list) + WALK_LIST(n, ifa->neigh_list) + ospf_sh_neigh_info(n); + cli_msg(0,""); +} -- cgit v1.2.3