From c4f0f0140863c743b1d63c3bc94cb8e85417a4ad Mon Sep 17 00:00:00 2001 From: Ondrej Filip Date: Thu, 1 Jun 2000 17:52:21 +0000 Subject: Added show ospf interface. show ospf neighbors now knows "". --- proto/ospf/iface.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'proto/ospf/iface.c') diff --git a/proto/ospf/iface.c b/proto/ospf/iface.c index eb6d464..011fd4b 100644 --- a/proto/ospf/iface.c +++ b/proto/ospf/iface.c @@ -14,6 +14,8 @@ char *ospf_is[]={ "down", "loop", "waiting", "point-to-point", "drother", char *ospf_ism[]={ "interface up", "wait timer fired", "backup seen", "neighbor change", "loop indicated", "unloop indicated", "interface down"}; +char *ospf_it[]={ "broadcast", "nbma", "point-to-point", "virtual link" }; + void iface_chstate(struct ospf_iface *ifa, u8 state) { @@ -406,3 +408,22 @@ ospf_if_notify(struct proto *p, unsigned flags, struct iface *iface) } } +void +ospf_iface_info(struct ospf_iface *ifa) +{ + int x; + cli_msg(-1015,"Interface \"%s\":", ifa->iface->name); + cli_msg(-1015,"\tArea: %I (%u)", ifa->oa->areaid, ifa->oa->areaid); + cli_msg(-1015,"\tType: %s", ospf_it[ifa->type]); + cli_msg(-1015,"\tState: %s", ospf_is[ifa->state]); + cli_msg(-1015,"\tPriority: %u", ifa->priority); + cli_msg(-1015,"\tCost: %u", ifa->cost); + cli_msg(-1015,"\tHello timer: %u", ifa->helloint); + cli_msg(-1015,"\tWait timer: %u", ifa->waitint); + cli_msg(-1015,"\tDead timer: %u", ifa->deadc*ifa->helloint); + cli_msg(-1015,"\tRetransmit timer: %u", ifa->rxmtint); + cli_msg(-1015,"\tDesigned router (ID): %I", ifa->drid); + cli_msg(-1015,"\tDesigned router (IP): %I", ifa->drip); + cli_msg(-1015,"\tBackup designed router (ID): %I", ifa->bdrid); + cli_msg(-1015,"\tBackup designed router (IP): %I", ifa->bdrip); +} -- cgit v1.2.3