From dd100e40c60811324b450ef7c078f0e992b2ded6 Mon Sep 17 00:00:00 2001 From: Ondrej Filip Date: Tue, 18 Apr 2000 17:58:16 +0000 Subject: Better dumping in neighbor chstate. --- proto/ospf/neighbor.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'proto/ospf/neighbor.c') diff --git a/proto/ospf/neighbor.c b/proto/ospf/neighbor.c index f52ff67..bb9d21d 100644 --- a/proto/ospf/neighbor.c +++ b/proto/ospf/neighbor.c @@ -8,6 +8,9 @@ #include "ospf.h" +char *ospf_ns[]={"down", "attempt", "init", "2way", "exstart", "exchange", + "loading", "full"}; + void neigh_chstate(struct ospf_neighbor *n, u8 state) { @@ -19,8 +22,8 @@ neigh_chstate(struct ospf_neighbor *n, u8 state) ifa=n->ifa; p=(struct proto *)(ifa->proto); - debug("%s: Neigbor '%u' changes state from %u to %u.\n", p->name, n->rid, - n->state, state); + debug("%s: Neigbor '%u' changes state from \"%u\" to \"%u\".\n", + p->name, n->rid, ospf_ns[n->state], ospf_ns[state]); n->state=state; } } -- cgit v1.2.3