summaryrefslogtreecommitdiffstats
path: root/proto/ospf
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>1999-08-16 12:32:05 +0200
committerOndrej Filip <feela@network.cz>1999-08-16 12:32:05 +0200
commitb332fcdfc8f0b1ac7111a63c55f72ba4b00b8035 (patch)
tree4761dfb963c73eeeb17fb27342e63339ac649501 /proto/ospf
parent032df28048c1c3d64716d3876ea759660d9d3cf0 (diff)
downloadbird-b332fcdfc8f0b1ac7111a63c55f72ba4b00b8035.tar
bird-b332fcdfc8f0b1ac7111a63c55f72ba4b00b8035.zip
Better dumping.
Diffstat (limited to 'proto/ospf')
-rw-r--r--proto/ospf/ospf.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/proto/ospf/ospf.c b/proto/ospf/ospf.c
index 5ce861d..1fa33fc 100644
--- a/proto/ospf/ospf.c
+++ b/proto/ospf/ospf.c
@@ -825,11 +825,23 @@ static void
ospf_dump(struct proto *p)
{
char areastr[20];
+ struct ospf_iface *ifa;
+ struct ospf_neighbor *n;
struct ospf_config *c = (void *) p->cf;
- DBG(p->name);
- DBG(": Dump.\n");
- debug(" -AreaID: %u\n", c->area );
+ debug("%s: AreaID: %u\n", p->name, c->area );
+
+ WALK_LIST(ifa, ((struct proto_ospf *)p)->iface_list)
+ {
+ debug("%s: Interface: %s\n", p->name, ifa->iface->name);
+ debug("%s: state: %u\n", p->name, ifa->state);
+ debug("%s: DR: %u\n", p->name, ifa->drid);
+ debug("%s: BDR: %u\n", p->name, ifa->bdrid);
+ WALK_LIST(n, ifa->neigh_list)
+ {
+ debug("%s: neighbor %u in state %u\n", p->name, n->rid, n->state);
+ }
+ }
}
static struct proto *