summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6_neighbor.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospf6d/ospf6_neighbor.c')
-rw-r--r--ospf6d/ospf6_neighbor.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/ospf6d/ospf6_neighbor.c b/ospf6d/ospf6_neighbor.c
index 7f6c6c5c..f20c83b9 100644
--- a/ospf6d/ospf6_neighbor.c
+++ b/ospf6d/ospf6_neighbor.c
@@ -46,6 +46,31 @@ const char *ospf6_neighbor_state_str[] =
{ "None", "Down", "Attempt", "Init", "Twoway", "ExStart", "ExChange",
"Loading", "Full", NULL };
+static const char *ospf6_neighbor_event_str[] =
+ {
+ "NoEvent",
+ "HelloReceived",
+ "2-WayReceived",
+ "NegotiationDone",
+ "ExchangeDone",
+ "LoadingDone",
+ "AdjOK?",
+ "SeqNumberMismatch",
+ "BadLSReq",
+ "1-WayReceived",
+ "InactivityTimer",
+ };
+
+static const char *
+ospf6_neighbor_event_string (int event)
+{
+ #define OSPF6_NEIGHBOR_UNKNOWN_EVENT_STRING "UnknownEvent"
+
+ if (event < OSPF6_NEIGHBOR_EVENT_MAX_EVENT)
+ return ospf6_neighbor_event_str[event];
+ return OSPF6_NEIGHBOR_UNKNOWN_EVENT_STRING;
+}
+
int
ospf6_neighbor_cmp (void *va, void *vb)
{