diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-10-28 18:04:19 -0400 | 
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-10-28 18:06:28 -0400 | 
| commit | 94ccb30979b7a289da6f4fb95fc52307e8057162 (patch) | |
| tree | b0e5bdef8dbd40d9bc4f7059c81954c5cdcf86b8 /eigrpd/eigrp_const.h | |
| parent | 5cc74ec1b87f0ebf7e0c38c4da9fe5d9b3966ff9 (diff) | |
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 3fa59756b7..c5f6e64d0b 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  | 
