Working on reboot statistics
FossilOrigin-Name: 134a5b893fbd0a7a240b1a60113a3f071ae7ce83811392a87f4abd782cf3070c
This commit is contained in:
@ -450,13 +450,13 @@ extern int cw_readelem_vendor_specific_payload(void *data, int msgtype, int elem
|
||||
|
||||
|
||||
enum cw_reboot_failure_types {
|
||||
CW_REBOOT_FAILURE_TYPE_NOT_SUPPORTED=0,
|
||||
CW_REBOOT_FAILURE_TYPE_AC_INITIATED=1,
|
||||
CW_REBOOT_FAILURE_TYPE_LINK_FAILURE=2,
|
||||
CW_REBOOT_FAILURE_TYPE_SOFTWARE_FAILURE=3,
|
||||
CW_REBOOT_FAILURE_TYPE_HARDWARE_FAILURE=4,
|
||||
CW_REBOOT_FAILURE_TYPE_OTHER_FAILURE=5,
|
||||
CW_REBOOT_FAILURE_ONKNOWN
|
||||
CW_REBOOT_TYPE_NOT_SUPPORTED=0,
|
||||
CW_REBOOT_TYPE_AC_INITIATED=1,
|
||||
CW_REBOOT_TYPE_LINK_FAILURE=2,
|
||||
CW_REBOOT_TYPE_SOFTWARE_FAILURE=3,
|
||||
CW_REBOOT_TYPE_HARDWARE_FAILURE=4,
|
||||
CW_REBOOT_TYPE_OTHER_FAILURE=5,
|
||||
CW_REBOOT_TYPE_FAILURE_ONKNOWN
|
||||
|
||||
};
|
||||
|
||||
|
@ -133,6 +133,11 @@ cisco_items or so */
|
||||
{CW_ITEM_CISCO_BOARD_DATA_OPTIONS,CW_ITEM_NONE,MBAG_BSTR16},
|
||||
|
||||
|
||||
{CW_ITEM_WTP_REBOOT_STATISTICS,CW_ITEM_REBOOT_COUNT,MBAG_WORD},
|
||||
{CW_ITEM_WTP_REBOOT_STATISTICS,CW_ITEM_REBOOT_AC_INITIATED_COUNT,MBAG_WORD},
|
||||
{CW_ITEM_WTP_REBOOT_STATISTICS,CW_ITEM_REBOOT_OTHER_FAILURE_COUNT,MBAG_WORD},
|
||||
|
||||
|
||||
|
||||
{CW_ITEM_NONE}
|
||||
|
||||
|
@ -173,6 +173,15 @@ extern const char CW_ITEM_RADIO_INFOS[];
|
||||
extern const char CW_ITEM_ECN_SUPPORT[];
|
||||
|
||||
|
||||
#define CW_ITEM_REBOOT_COUNT "reboot_count"
|
||||
#define CW_ITEM_REBOOT_AC_INITIATED_COUNT "ac_initiated"
|
||||
#define CW_ITEM_REBOOT_LINK_FAILURE_COUNT "link_failure"
|
||||
#define CW_ITEM_REBOOT_SW_FAILURE_COUNT "sw_failure"
|
||||
#define CW_ITEM_REBOOT_HW_FAILURE_COUNT "hw_failure"
|
||||
#define CW_ITEM_REBOOT_OTHER_FAILURE_COUNT "other_failure"
|
||||
#define CW_ITEM_REBOOT_UNKNOWN_FAILURE_COUNT "unknown_failure"
|
||||
#define CW_ITEM_REBOOT_LAST_FAILURE_TYPE "last_failure"
|
||||
|
||||
|
||||
|
||||
extern struct cw_itemdef capwap_itemdefs[];
|
||||
|
@ -177,6 +177,7 @@ static inline int mbag_set_word(mbag_t s, const char *id, uint16_t word)
|
||||
|
||||
|
||||
|
||||
|
||||
static inline struct mbag_item * mbag_set_dword(mbag_t s, const char *id, uint32_t dword)
|
||||
{
|
||||
struct mbag_item *i = mbag_item_create(s, id);
|
||||
@ -440,6 +441,17 @@ static inline mavl_t mbag_get_mbag_c(mbag_t s, const char *id,
|
||||
return avltree;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static inline int mbag_inc_word(mbag_t s, const char * id)
|
||||
{
|
||||
uint16_t w = mbag_get_word(s,id,0);
|
||||
mbag_set_word(s,id,w+1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static inline mavl_t mbag_i_get_mbag_c(mbag_t s, uint32_t iid,
|
||||
mavl_t (creator) ())
|
||||
{
|
||||
|
Reference in New Issue
Block a user