diff --git a/src/ac/wtpman.c b/src/ac/wtpman.c index 32621010..7aa5f4f5 100644 --- a/src/ac/wtpman.c +++ b/src/ac/wtpman.c @@ -256,7 +256,7 @@ static void wtpman_image_data(struct wtpman *wtpman) int rc = 0; while (conn->capwap_state == CW_STATE_IMAGE_DATA && rc == 0 && eof != NULL) { - rc = cw_send_request(conn, CW_MSG_IMAGE_DATA_REQUEST); + rc = cw_send_request(conn, CAPWAP_MSG_IMAGE_DATA_REQUEST); eof = mbag_get(conn->outgoing, CW_ITEM_IMAGE_FILEHANDLE); } @@ -466,7 +466,7 @@ void wtpman_run_data(void *wtpman_arg) static int msg_end_handler(struct conn *conn, struct cw_action_in *a, uint8_t * data, int len, struct sockaddr *from) { - if (a->msg_id ==CW_MSG_CHANGE_STATE_EVENT_REQUEST) { + if (a->msg_id ==CAPWAP_MSG_CHANGE_STATE_EVENT_REQUEST) { props_to_sql(conn,conn->incomming,0); radios_to_sql(conn); } diff --git a/src/cw/capwap.h b/src/cw/capwap.h index 6408a967..02591739 100644 --- a/src/cw/capwap.h +++ b/src/cw/capwap.h @@ -147,19 +147,19 @@ #define CAPWAP_MSG_CONFIGURATION_UPDATE_RESPONSE 8 #define CAPWAP_MSG_WTP_EVENT_REQUEST 9 -#define CW_MSG_WTP_EVENT_RESPONSE 10 +#define CAPWAP_MSG_WTP_EVENT_RESPONSE 10 -#define CW_MSG_CHANGE_STATE_EVENT_REQUEST 11 -#define CW_MSG_CHANGE_STATE_EVENT_RESPONSE 12 +#define CAPWAP_MSG_CHANGE_STATE_EVENT_REQUEST 11 +#define CAPWAP_MSG_CHANGE_STATE_EVENT_RESPONSE 12 #define CAPWAP_MSG_ECHO_REQUEST 13 -#define CW_MSG_ECHO_RESPONSE 14 +#define CAPWAP_MSG_ECHO_RESPONSE 14 -#define CW_MSG_IMAGE_DATA_REQUEST 15 -#define CW_MSG_IMAGE_DATA_RESPONSE 16 +#define CAPWAP_MSG_IMAGE_DATA_REQUEST 15 +#define CAPWAP_MSG_IMAGE_DATA_RESPONSE 16 -#define CW_MSG_RESET_REQUEST 17 -#define CW_MSG_RESET_RESPONSE 18 +#define CAPWAP_MSG_RESET_REQUEST 17 +#define CAPWAP_MSG_RESET_RESPONSE 18 #define CW_MSG_PRIMARY_DISCOVERY_REQUEST 19 #define CW_MSG_PRIMARY_DISCOVERY_RESPONSE 20 diff --git a/src/cw/capwap_strings_msg.c b/src/cw/capwap_strings_msg.c index 537eaadd..9f289126 100644 --- a/src/cw/capwap_strings_msg.c +++ b/src/cw/capwap_strings_msg.c @@ -35,15 +35,15 @@ struct cw_strlist_elem capwap_strings_msg[] = { { CAPWAP_MSG_CONFIGURATION_UPDATE_REQUEST,"Configuration Update Request"}, { CAPWAP_MSG_CONFIGURATION_UPDATE_RESPONSE,"Configuration Update Response"}, { CAPWAP_MSG_WTP_EVENT_REQUEST,"WTP Event Request"}, -{ CW_MSG_WTP_EVENT_RESPONSE,"WTP Event Response"}, -{ CW_MSG_CHANGE_STATE_EVENT_REQUEST,"Change State Event Request"}, -{ CW_MSG_CHANGE_STATE_EVENT_RESPONSE,"Change State Event Response"}, +{ CAPWAP_MSG_WTP_EVENT_RESPONSE,"WTP Event Response"}, +{ CAPWAP_MSG_CHANGE_STATE_EVENT_REQUEST,"Change State Event Request"}, +{ CAPWAP_MSG_CHANGE_STATE_EVENT_RESPONSE,"Change State Event Response"}, { CAPWAP_MSG_ECHO_REQUEST,"Echo Request"}, -{ CW_MSG_ECHO_RESPONSE,"Echo Response"}, -{ CW_MSG_IMAGE_DATA_REQUEST,"Image Data Request"}, -{ CW_MSG_IMAGE_DATA_RESPONSE,"Image Data Response"}, -{ CW_MSG_RESET_REQUEST,"Reset Request"}, -{ CW_MSG_RESET_RESPONSE,"Reset Response"}, +{ CAPWAP_MSG_ECHO_RESPONSE,"Echo Response"}, +{ CAPWAP_MSG_IMAGE_DATA_REQUEST,"Image Data Request"}, +{ CAPWAP_MSG_IMAGE_DATA_RESPONSE,"Image Data Response"}, +{ CAPWAP_MSG_RESET_REQUEST,"Reset Request"}, +{ CAPWAP_MSG_RESET_RESPONSE,"Reset Response"}, { CW_MSG_PRIMARY_DISCOVERY_REQUEST,"Primary Discovery Request"}, { CW_MSG_PRIMARY_DISCOVERY_RESPONSE,"Primary Discovery Response"}, diff --git a/src/mod/capwap/capwap_actions_wtp.c b/src/mod/capwap/capwap_actions_wtp.c index 504af91a..1739dd30 100644 --- a/src/mod/capwap/capwap_actions_wtp.c +++ b/src/mod/capwap/capwap_actions_wtp.c @@ -313,14 +313,14 @@ static cw_action_in_t actions_in[] = { { .capwap_state = CW_STATE_CONFIGURE, - .msg_id = CW_MSG_CHANGE_STATE_EVENT_RESPONSE, + .msg_id = CAPWAP_MSG_CHANGE_STATE_EVENT_RESPONSE, .end = cw_in_check_cfg_update_req } , { .capwap_state = CW_STATE_CONFIGURE, - .msg_id = CW_MSG_CHANGE_STATE_EVENT_RESPONSE, + .msg_id = CAPWAP_MSG_CHANGE_STATE_EVENT_RESPONSE, .elem_id = CW_ELEM_RESULT_CODE, .item_id = CW_ITEM_RESULT_CODE, .start = cw_in_generic2, @@ -336,14 +336,14 @@ static cw_action_in_t actions_in[] = { { .capwap_state = CW_STATE_RUN, - .msg_id = CW_MSG_CHANGE_STATE_EVENT_RESPONSE, + .msg_id = CAPWAP_MSG_CHANGE_STATE_EVENT_RESPONSE, .end = cw_in_check_cfg_update_req } , { .capwap_state = CW_STATE_RUN, - .msg_id = CW_MSG_CHANGE_STATE_EVENT_RESPONSE, + .msg_id = CAPWAP_MSG_CHANGE_STATE_EVENT_RESPONSE, .elem_id = CW_ELEM_RESULT_CODE, .item_id = CW_ITEM_RESULT_CODE, .start = cw_in_generic2, @@ -362,14 +362,14 @@ static cw_action_in_t actions_in[] = { */ { .capwap_state = CW_STATE_RUN, - .msg_id = CW_MSG_ECHO_RESPONSE, + .msg_id = CAPWAP_MSG_ECHO_RESPONSE, } , /* Vendor Specific Payload - Echo Response */ { .capwap_state = CW_STATE_RUN, - .msg_id = CW_MSG_ECHO_RESPONSE, + .msg_id = CAPWAP_MSG_ECHO_RESPONSE, .elem_id = CAPWAP_ELEM_VENDOR_SPECIFIC_PAYLOAD, .start = cw_in_vendor_specific_payload } @@ -683,7 +683,7 @@ static cw_action_out_t actions_out[] = { /* Radio Operational State(s) - Change State Event */ { - .msg_id = CW_MSG_CHANGE_STATE_EVENT_REQUEST, + .msg_id = CAPWAP_MSG_CHANGE_STATE_EVENT_REQUEST, .elem_id = CW_ELEM_RADIO_OPERATIONAL_STATE, .item_id = CW_RADIOITEM_OPER_STATE, // .out = cw_out_radio_operational_state, @@ -694,7 +694,7 @@ static cw_action_out_t actions_out[] = { { - .msg_id = CW_MSG_CHANGE_STATE_EVENT_REQUEST, + .msg_id = CAPWAP_MSG_CHANGE_STATE_EVENT_REQUEST, .elem_id = CW_ELEM_RESULT_CODE, .item_id = CW_ITEM_RESULT_CODE, .out = cw_out_generic, diff --git a/src/mod/cisco/cisco_actions_ac.c b/src/mod/cisco/cisco_actions_ac.c index 8a1dedbb..b53983f4 100644 --- a/src/mod/cisco/cisco_actions_ac.c +++ b/src/mod/cisco/cisco_actions_ac.c @@ -351,7 +351,7 @@ static cw_action_in_t actions_in[] = { /* Radio Operational State - Run State - Change State Event Req */ { .capwap_state = CW_STATE_RUN, - .msg_id= CW_MSG_CHANGE_STATE_EVENT_REQUEST, + .msg_id= CAPWAP_MSG_CHANGE_STATE_EVENT_REQUEST, .elem_id = CW_ELEM_RADIO_OPERATIONAL_STATE, .item_id = CW_RADIOITEM_OPER_STATE, .start = cisco_in_radio_operational_state, @@ -364,7 +364,7 @@ static cw_action_in_t actions_in[] = { /* Radio Operational State - Configure State - Change State Event Req */ { .capwap_state = CW_STATE_CONFIGURE, - .msg_id= CW_MSG_CHANGE_STATE_EVENT_REQUEST, + .msg_id= CAPWAP_MSG_CHANGE_STATE_EVENT_REQUEST, .elem_id = CW_ELEM_RADIO_OPERATIONAL_STATE, .item_id = CW_RADIOITEM_OPER_STATE, .start = cisco_in_radio_operational_state, //operational_state, @@ -437,7 +437,7 @@ static cw_action_out_t actions_out[]={ */ /* AP Time Sync - Echo Response */ { - .msg_id = CW_MSG_ECHO_RESPONSE, + .msg_id = CAPWAP_MSG_ECHO_RESPONSE, .vendor_id = CW_VENDOR_ID_CISCO, .item_id = CW_ITEM_AC_TIMESTAMP, .elem_id = CW_CISCO_AP_TIMESYNC, diff --git a/src/mod/cisco/cisco_actions_wtp.c b/src/mod/cisco/cisco_actions_wtp.c index f96614fd..8e441cee 100644 --- a/src/mod/cisco/cisco_actions_wtp.c +++ b/src/mod/cisco/cisco_actions_wtp.c @@ -390,7 +390,7 @@ static cw_action_out_t actions_out[]={ /* Cisco WTP Operational state - OUT */ { - .msg_id = CW_MSG_CHANGE_STATE_EVENT_REQUEST, + .msg_id = CAPWAP_MSG_CHANGE_STATE_EVENT_REQUEST, .vendor_id = CW_VENDOR_ID_CISCO, // .elem_id = CW_CISCO_AP_MODE_AND_TYPE, .item_id = CISCO_ITEM_WTP_OPER_STATE, @@ -405,7 +405,7 @@ static cw_action_out_t actions_out[]={ /* Radio Operational State - OUT */ { - .msg_id = CW_MSG_CHANGE_STATE_EVENT_REQUEST, + .msg_id = CAPWAP_MSG_CHANGE_STATE_EVENT_REQUEST, .elem_id = CW_ELEM_RADIO_OPERATIONAL_STATE, .item_id = CW_RADIOITEM_OPER_STATE, .out = cisco_out_radio_operational_state, diff --git a/src/mod/fortinet/fortinet_actions_ac.c b/src/mod/fortinet/fortinet_actions_ac.c index 67cf9594..5e274626 100644 --- a/src/mod/fortinet/fortinet_actions_ac.c +++ b/src/mod/fortinet/fortinet_actions_ac.c @@ -226,7 +226,7 @@ static cw_action_out_t actions_out[]={ */ /* AP Time Sync - Echo Response */ { - .msg_id = CW_MSG_ECHO_RESPONSE, + .msg_id = CAPWAP_MSG_ECHO_RESPONSE, .vendor_id = CW_VENDOR_ID_CISCO, .item_id = CW_ITEM_AC_TIMESTAMP, .elem_id = CW_CISCO_AP_TIMESYNC, diff --git a/src/wtp/changestate.c b/src/wtp/changestate.c index 6d0ddb53..1e7d3f1e 100644 --- a/src/wtp/changestate.c +++ b/src/wtp/changestate.c @@ -20,7 +20,7 @@ int changestate() /* Change State ... */ - int rc = cw_send_request(conn,CW_MSG_CHANGE_STATE_EVENT_REQUEST); + int rc = cw_send_request(conn,CAPWAP_MSG_CHANGE_STATE_EVENT_REQUEST); if ( !cw_rcok(rc) ) { cw_strresult(rc); return 0; diff --git a/src/wtp/image_update.c b/src/wtp/image_update.c index 095c5aec..19a2b4a2 100644 --- a/src/wtp/image_update.c +++ b/src/wtp/image_update.c @@ -22,7 +22,7 @@ int image_update() CW_VENDOR_ID_CISCO, (uint8_t *) ii, strlen(ii)); - int rc = cw_send_request(conn, CW_MSG_IMAGE_DATA_REQUEST); + int rc = cw_send_request(conn, CAPWAP_MSG_IMAGE_DATA_REQUEST); if (rc < 0) { } diff --git a/src/wtp/run.c b/src/wtp/run.c index 07291e96..29ae421d 100644 --- a/src/wtp/run.c +++ b/src/wtp/run.c @@ -94,7 +94,7 @@ static void do_update(struct conn * conn) cw_dbg(DBG_INFO, "Saving configuration ..."); cfg_to_json(); /* Change State ... */ - int rc = cw_send_request(conn,CW_MSG_CHANGE_STATE_EVENT_REQUEST); + int rc = cw_send_request(conn,CAPWAP_MSG_CHANGE_STATE_EVENT_REQUEST); if ( !cw_rcok(rc) ) { cw_strresult(rc); return ;