diff options
author | Ondrej Filip <feela@network.cz> | 2000-06-01 16:26:59 +0000 |
---|---|---|
committer | Ondrej Filip <feela@network.cz> | 2000-06-01 16:26:59 +0000 |
commit | 4ab4e9778f35f8a123ee6bbc2387b9870859b707 (patch) | |
tree | 23b767755892747887dcd4336f13818058975c51 /proto/ospf/ospf.c | |
parent | cf318e3cd3206ad6a459a01e29e8494a100a67eb (diff) |
show ospf implemented.
Diffstat (limited to 'proto/ospf/ospf.c')
-rw-r--r-- | proto/ospf/ospf.c | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/proto/ospf/ospf.c b/proto/ospf/ospf.c index b8f7b984..7e7896a1 100644 --- a/proto/ospf/ospf.c +++ b/proto/ospf/ospf.c @@ -324,7 +324,7 @@ ospf_sh_neigh(struct proto *p) struct ospf_neighbor *n; struct proto_ospf *po=(struct proto_ospf *)p; - cli_msg(-1013,"%s:",p->name); + 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) @@ -332,3 +332,42 @@ ospf_sh_neigh(struct proto *p) ospf_sh_neigh_info(n); cli_msg(0,""); } + +void +ospf_sh(struct proto *p) +{ + struct ospf_area *oa; + struct proto_ospf *po=(struct proto_ospf *)p; + struct ospf_iface *ifa; + struct ospf_neighbor *n; + int ifano; + int nno; + int adjno; + + cli_msg(-1014,"%s:", p->name); + cli_msg(-1014,"Number of areas: %u", po->areano); + + WALK_LIST(oa,po->area_list) + { + cli_msg(-1014,"\tArea: %I (%u) %s", oa->areaid, oa->areaid, + oa->areaid==0 ? "[BACKBONE]" : ""); + ifano=0; + nno=0; + adjno=0; + WALK_LIST(ifa, po->iface_list) + { + if(oa==ifa->oa) ifano++; + WALK_LIST(n, ifa->neigh_list) + { + nno++; + if(n->state==NEIGHBOR_FULL) adjno++; + } + } + cli_msg(-1014,"\t\tNumber of interfaces: %u", ifano); + cli_msg(-1014,"\t\tNumber of LSAs: %u", oa->gr->hash_entries); + cli_msg(-1014,"\t\tNumber of neighbors: %u", nno); + cli_msg(-1014,"\t\tNumber of fully adjacent neighbors: %u", adjno); + } + cli_msg(0,""); +} + |