summaryrefslogtreecommitdiffstats
path: root/proto/ospf/iface.c
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2000-06-01 19:52:21 +0200
committerOndrej Filip <feela@network.cz>2000-06-01 19:52:21 +0200
commitc4f0f0140863c743b1d63c3bc94cb8e85417a4ad (patch)
tree8251605b5d619bc89e85042c69379f11633823be /proto/ospf/iface.c
parent58740ed4c587a230bf1406eca52cbc84bcb1c5c3 (diff)
downloadbird-c4f0f0140863c743b1d63c3bc94cb8e85417a4ad.tar
bird-c4f0f0140863c743b1d63c3bc94cb8e85417a4ad.zip
Added show ospf interface.
show ospf neighbors now knows "<interface>".
Diffstat (limited to 'proto/ospf/iface.c')
-rw-r--r--proto/ospf/iface.c21
1 files changed, 21 insertions, 0 deletions
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);
+}