diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-10-29 00:04:19 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-10-29 00:06:28 +0200 |
commit | 94ccb30979b7a289da6f4fb95fc52307e8057162 (patch) | |
tree | b0e5bdef8dbd40d9bc4f7059c81954c5cdcf86b8 /eigrpd/eigrp_const.h | |
parent | eigrpd: Create a function to return a string of prefix state (diff) | |
download | frr-94ccb30979b7a289da6f4fb95fc52307e8057162.tar.xz frr-94ccb30979b7a289da6f4fb95fc52307e8057162.zip |
eigrpd: Create enum for states and string name for display
Create an enum for the different states and create
a string name display handler.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'eigrpd/eigrp_const.h')
-rw-r--r-- | eigrpd/eigrp_const.h | 39 |
1 files changed, 31 insertions, 8 deletions
diff --git a/eigrpd/eigrp_const.h b/eigrpd/eigrp_const.h index 3fa59756b..c5f6e64d0 100644 --- a/eigrpd/eigrp_const.h +++ b/eigrpd/eigrp_const.h @@ -153,14 +153,37 @@ enum eigrp_fsm_states { #define EIGRP_FSM_NEED_QUERY 2 /*EIGRP FSM events*/ -#define EIGRP_FSM_EVENT_NQ_FCN 0 /*input event other than query from succ, FC not satisfied*/ -#define EIGRP_FSM_EVENT_LR 1 /*last reply, FD is reset*/ -#define EIGRP_FSM_EVENT_Q_FCN 2 /*query from succ, FC not satisfied*/ -#define EIGRP_FSM_EVENT_LR_FCS 3 /*last reply, FC satisfied with current value of FDij*/ -#define EIGRP_FSM_EVENT_DINC 4 /*distance increase while in active state*/ -#define EIGRP_FSM_EVENT_QACT 5 /*query from succ while in active state*/ -#define EIGRP_FSM_EVENT_LR_FCN 6 /*last reply, FC not satisfied with current value of FDij*/ -#define EIGRP_FSM_KEEP_STATE 7 /*state not changed, usually by receiving not last reply */ +enum eigrp_fsm_events { + /* + * Input event other than query from succ, + * FC is not satisified + */ + EIGRP_FSM_EVENT_NQ_FCN, + + /* last reply, FD is reset */ + EIGRP_FSM_EVENT_LR, + + /* Query from succ, FC not satisfied */ + EIGRP_FSM_EVENT_Q_FCN, + + /* last reply, FC satisifed with current value of FDij */ + EIGRP_FSM_EVENT_LR_FCS, + + /* distance increase while in a active state */ + EIGRP_FSM_EVENT_DINC, + + /* Query from succ while in active state */ + EIGRP_FSM_EVENT_QACT, + + /* last reply, FC not satisified */ + EIGRP_FSM_EVENT_LR_FCN, + + /* + * state not changed + * usually by receiving not last reply + */ + EIGRP_FSM_KEEP_STATE, +}; /** * External routes originate from some other protocol - these are them |