diff options
author | Paul Jakma <paul.jakma@sun.com> | 2006-07-25 20:44:12 +0000 |
---|---|---|
committer | Paul Jakma <paul.jakma@sun.com> | 2006-07-25 20:44:12 +0000 |
commit | 3fed4160cd23f1767d8980e8cba10bc3933947d5 (patch) | |
tree | 34a08d8c76296aaeea1200be35fe08411ca45c2c /ospfd/ospf_nsm.c | |
parent | cc8b13a00bfe7083ae68755e547a39cd762f2963 (diff) |
[ospfd] Additional NSM neighbour state change stats/information
2006-07-25 Paul Jakma <paul.jakma@sun.com>
* ospf_neigbor.h: (struct ospf_neighbor) Add some additional
neighbour state statistics fields, timestamps for progressive
and regressive state changes, and pointer to event string
for the latter state change.
* ospf_nsm.c: (nsm_notice_state_change) Update new state changs
history as required.
* ospf_vty.c: (show_ip_ospf_neighbor_detail_sub) Print out above
new per-neighbour state change stats.
Diffstat (limited to 'ospfd/ospf_nsm.c')
-rw-r--r-- | ospfd/ospf_nsm.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ospfd/ospf_nsm.c b/ospfd/ospf_nsm.c index ff0a52d0..8329a4f3 100644 --- a/ospfd/ospf_nsm.c +++ b/ospfd/ospf_nsm.c @@ -615,8 +615,14 @@ nsm_notice_state_change (struct ospf_neighbor *nbr, int next_state, int event) LOOKUP (ospf_nsm_state_msg, next_state), ospf_nsm_event_str [event]); - nbr->ts_last_change = recent_time; - nbr->last_event_str = ospf_nsm_event_str [event]; + /* Advance in NSM */ + if (next_state > nbr->state) + nbr->ts_last_progress = recent_time; + else /* regression in NSM */ + { + nbr->ts_last_regress = recent_time; + nbr->last_regress_str = ospf_nsm_event_str [event]; + } #ifdef HAVE_SNMP /* Terminal state or regression */ |