Work on Join Response
FossilOrigin-Name: 48d72b9ebe374fd5ab2ad167ec3a18b75ec6d97511b499d2fb883d5dc34faf92
This commit is contained in:
parent
aa24582d05
commit
d38cf4a06d
@ -3,9 +3,9 @@
|
|||||||
<Project Name="ac" Path="ac.project" Active="No"/>
|
<Project Name="ac" Path="ac.project" Active="No"/>
|
||||||
<Project Name="wtp" Path="wtp.project" Active="No"/>
|
<Project Name="wtp" Path="wtp.project" Active="No"/>
|
||||||
<Project Name="mod_cipwap" Path="mod_cipwap.project" Active="No"/>
|
<Project Name="mod_cipwap" Path="mod_cipwap.project" Active="No"/>
|
||||||
<Project Name="mod_capwap" Path="mod_capwap.project" Active="No"/>
|
<Project Name="mod_capwap" Path="mod_capwap.project" Active="Yes"/>
|
||||||
<Project Name="mod_cisco" Path="mod_cisco.project" Active="No"/>
|
<Project Name="mod_cisco" Path="mod_cisco.project" Active="No"/>
|
||||||
<Project Name="libcw" Path="libcw.project" Active="Yes"/>
|
<Project Name="libcw" Path="libcw.project" Active="No"/>
|
||||||
<Project Name="mod_capwap80211" Path="mod_capwap80211.project" Active="No"/>
|
<Project Name="mod_capwap80211" Path="mod_capwap80211.project" Active="No"/>
|
||||||
<Project Name="mod_fortinet" Path="mod_fortinet.project" Active="No"/>
|
<Project Name="mod_fortinet" Path="mod_fortinet.project" Active="No"/>
|
||||||
<BuildMatrix>
|
<BuildMatrix>
|
||||||
|
@ -246,7 +246,7 @@
|
|||||||
#define CAPWAP_ELEM_MTU_DISCOVERY_PADDING 52
|
#define CAPWAP_ELEM_MTU_DISCOVERY_PADDING 52
|
||||||
#define CW_ELEM_RADIO_ADMINISTRATIVE_STATE 31
|
#define CW_ELEM_RADIO_ADMINISTRATIVE_STATE 31
|
||||||
#define CW_ELEM_RADIO_OPERATIONAL_STATE 32
|
#define CW_ELEM_RADIO_OPERATIONAL_STATE 32
|
||||||
#define CW_ELEM_RESULT_CODE 33
|
#define CAPWAP_ELEM_RESULT_CODE 33
|
||||||
#define CW_ELEM_RETURNED_MESSAGE_ELEMENT 34
|
#define CW_ELEM_RETURNED_MESSAGE_ELEMENT 34
|
||||||
#define CAPWAP_ELEM_SESSION_ID 35
|
#define CAPWAP_ELEM_SESSION_ID 35
|
||||||
#define CW_ELEM_STATISTICS_TIMER 36
|
#define CW_ELEM_STATISTICS_TIMER 36
|
||||||
|
@ -40,7 +40,7 @@ struct cw_StrListElem capwap_strings_elem[] = {
|
|||||||
{CAPWAP_ELEM_MTU_DISCOVERY_PADDING, "MTU Discovery Padding"},
|
{CAPWAP_ELEM_MTU_DISCOVERY_PADDING, "MTU Discovery Padding"},
|
||||||
{CW_ELEM_RADIO_ADMINISTRATIVE_STATE, "Radio Administrative State"},
|
{CW_ELEM_RADIO_ADMINISTRATIVE_STATE, "Radio Administrative State"},
|
||||||
{CW_ELEM_RADIO_OPERATIONAL_STATE, "Radio Operational State"},
|
{CW_ELEM_RADIO_OPERATIONAL_STATE, "Radio Operational State"},
|
||||||
{CW_ELEM_RESULT_CODE, "Result Code"},
|
{CAPWAP_ELEM_RESULT_CODE, "Result Code"},
|
||||||
{CW_ELEM_RETURNED_MESSAGE_ELEMENT, "Returned Message Element"},
|
{CW_ELEM_RETURNED_MESSAGE_ELEMENT, "Returned Message Element"},
|
||||||
{CAPWAP_ELEM_SESSION_ID, "Session ID"},
|
{CAPWAP_ELEM_SESSION_ID, "Session ID"},
|
||||||
{CW_ELEM_STATISTICS_TIMER, "Statistics Timer"},
|
{CW_ELEM_STATISTICS_TIMER, "Statistics Timer"},
|
||||||
|
@ -476,7 +476,7 @@ static int process_elements(struct conn *conn, uint8_t * rawmsg, int len,
|
|||||||
|
|
||||||
cw_send_error_response(conn, rawmsg, result_code);
|
cw_send_error_response(conn, rawmsg, result_code);
|
||||||
} else if (result_code == 0) {
|
} else if (result_code == 0) {
|
||||||
/*cw_ktv_add_word(conn->local_cfg,"result_code")*/
|
cw_ktv_set_dword(conn->local_cfg,"result-code",result_code);
|
||||||
|
|
||||||
/* All is ok, send regular response message */
|
/* All is ok, send regular response message */
|
||||||
cw_send_response(conn, rawmsg, len);
|
cw_send_response(conn, rawmsg, len);
|
||||||
|
@ -167,7 +167,7 @@ int cw_addelem_bstr(uint8_t * dst, uint16_t type, const bstr_t bstr)
|
|||||||
int cw_put_elem_result_code(uint8_t * dst, uint32_t code)
|
int cw_put_elem_result_code(uint8_t * dst, uint32_t code)
|
||||||
{
|
{
|
||||||
cw_set_dword(dst + 4, code);
|
cw_set_dword(dst + 4, code);
|
||||||
return 4 + cw_put_elem_hdr(dst, CW_ELEM_RESULT_CODE, 4);
|
return 4 + cw_put_elem_hdr(dst, CAPWAP_ELEM_RESULT_CODE, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -191,6 +191,29 @@ static struct cw_ElemHandler handlers[] = {
|
|||||||
}
|
}
|
||||||
,
|
,
|
||||||
|
|
||||||
|
{
|
||||||
|
"Result Code", /* name */
|
||||||
|
CAPWAP_ELEM_RESULT_CODE, /* Element ID */
|
||||||
|
0,0, /* Vendor / Proto */
|
||||||
|
4,4, /* min/max length */
|
||||||
|
CW_TYPE_DWORD, /* type */
|
||||||
|
"result-code", /* Key */
|
||||||
|
cw_in_generic, /* get */
|
||||||
|
cw_out_generic /* put */
|
||||||
|
}
|
||||||
|
,
|
||||||
|
|
||||||
|
{
|
||||||
|
"ECN Support", /* name */
|
||||||
|
CAPWAP_ELEM_ECN_SUPPORT, /* Element ID */
|
||||||
|
0,0, /* Vendor / Proto */
|
||||||
|
1,1, /* min/max length */
|
||||||
|
CW_TYPE_BYTE, /* type */
|
||||||
|
"ecn-support", /* Key */
|
||||||
|
cw_in_generic, /* get */
|
||||||
|
cw_out_generic /* put */
|
||||||
|
}
|
||||||
|
,
|
||||||
|
|
||||||
|
|
||||||
{0,0,0,0,0,0,0,0}
|
{0,0,0,0,0,0,0,0}
|
||||||
@ -243,7 +266,20 @@ static struct cw_ElemDef join_request_elements[] ={
|
|||||||
{0,0,0,0,0}
|
{0,0,0,0,0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static int join_response_states[] = {CAPWAP_STATE_JOIN,0};
|
||||||
|
static struct cw_ElemDef join_response_elements[] ={
|
||||||
|
{0,0,CAPWAP_ELEM_RESULT_CODE, 1, 0},
|
||||||
|
{0,0,CAPWAP_ELEM_AC_DESCRIPTOR, 1, 0},
|
||||||
|
{0,0,CAPWAP_ELEM_AC_NAME, 1, 0},
|
||||||
|
{0,0,CAPWAP_ELEM_ECN_SUPPORT, 1, 0},
|
||||||
|
/* {0,0,CAPWAP_ELEM_AC_DESCRIPTOR, 1, 0},
|
||||||
|
{0,0,CAPWAP_ELEM_AC_NAME, 1, 0},
|
||||||
|
{0,0,CW_ELEM_CAPWAP_CONTROL_IPV4_ADDRESS, 1, 0},
|
||||||
|
{0,0,CW_ELEM_CAPWAP_CONTROL_IPV6_ADDRESS, 1, 0},
|
||||||
|
{0,0,CAPWAP_ELEM_VENDOR_SPECIFIC_PAYLOAD, 0, CW_IGNORE},*/
|
||||||
|
{0,0,0,0,0}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
static struct cw_MsgDef messages[] = {
|
static struct cw_MsgDef messages[] = {
|
||||||
{
|
{
|
||||||
@ -270,6 +306,15 @@ static struct cw_MsgDef messages[] = {
|
|||||||
join_request_elements
|
join_request_elements
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"Join Response",
|
||||||
|
CAPWAP_MSG_JOIN_RESPONSE,
|
||||||
|
CW_ROLE_WTP,
|
||||||
|
join_response_states,
|
||||||
|
join_response_elements
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* {
|
/* {
|
||||||
|
@ -87,7 +87,7 @@ static cw_action_in_t actions_in[] = {
|
|||||||
*/
|
*/
|
||||||
.capwap_state = CAPWAP_STATE_DISCOVERY,
|
.capwap_state = CAPWAP_STATE_DISCOVERY,
|
||||||
.msg_id = CAPWAP_MSG_DISCOVERY_RESPONSE,
|
.msg_id = CAPWAP_MSG_DISCOVERY_RESPONSE,
|
||||||
.elem_id = CW_ELEM_RESULT_CODE,
|
.elem_id = CAPWAP_ELEM_RESULT_CODE,
|
||||||
.item_id = CW_ITEM_RESULT_CODE,
|
.item_id = CW_ITEM_RESULT_CODE,
|
||||||
.start = cw_in_generic2,
|
.start = cw_in_generic2,
|
||||||
.min_len = 4,
|
.min_len = 4,
|
||||||
@ -111,7 +111,7 @@ static cw_action_in_t actions_in[] = {
|
|||||||
{
|
{
|
||||||
.capwap_state = CAPWAP_STATE_JOIN,
|
.capwap_state = CAPWAP_STATE_JOIN,
|
||||||
.msg_id = CAPWAP_MSG_JOIN_RESPONSE,
|
.msg_id = CAPWAP_MSG_JOIN_RESPONSE,
|
||||||
.elem_id = CW_ELEM_RESULT_CODE,
|
.elem_id = CAPWAP_ELEM_RESULT_CODE,
|
||||||
.item_id = CW_ITEM_RESULT_CODE,
|
.item_id = CW_ITEM_RESULT_CODE,
|
||||||
.start = cw_in_generic2,
|
.start = cw_in_generic2,
|
||||||
.min_len = 4,
|
.min_len = 4,
|
||||||
@ -271,7 +271,7 @@ static cw_action_in_t actions_in[] = {
|
|||||||
{
|
{
|
||||||
.capwap_state = CW_STATE_CONFIGURE,
|
.capwap_state = CW_STATE_CONFIGURE,
|
||||||
.msg_id = CAPWAP_MSG_CONFIGURATION_STATUS_RESPONSE,
|
.msg_id = CAPWAP_MSG_CONFIGURATION_STATUS_RESPONSE,
|
||||||
.elem_id = CW_ELEM_RESULT_CODE,
|
.elem_id = CAPWAP_ELEM_RESULT_CODE,
|
||||||
.item_id = CW_ITEM_RESULT_CODE,
|
.item_id = CW_ITEM_RESULT_CODE,
|
||||||
.start = cw_in_generic2,
|
.start = cw_in_generic2,
|
||||||
.min_len = 4,
|
.min_len = 4,
|
||||||
@ -321,7 +321,7 @@ static cw_action_in_t actions_in[] = {
|
|||||||
{
|
{
|
||||||
.capwap_state = CW_STATE_CONFIGURE,
|
.capwap_state = CW_STATE_CONFIGURE,
|
||||||
.msg_id = CAPWAP_MSG_CHANGE_STATE_EVENT_RESPONSE,
|
.msg_id = CAPWAP_MSG_CHANGE_STATE_EVENT_RESPONSE,
|
||||||
.elem_id = CW_ELEM_RESULT_CODE,
|
.elem_id = CAPWAP_ELEM_RESULT_CODE,
|
||||||
.item_id = CW_ITEM_RESULT_CODE,
|
.item_id = CW_ITEM_RESULT_CODE,
|
||||||
.start = cw_in_generic2,
|
.start = cw_in_generic2,
|
||||||
.min_len = 4,
|
.min_len = 4,
|
||||||
@ -344,7 +344,7 @@ static cw_action_in_t actions_in[] = {
|
|||||||
{
|
{
|
||||||
.capwap_state = CW_STATE_RUN,
|
.capwap_state = CW_STATE_RUN,
|
||||||
.msg_id = CAPWAP_MSG_CHANGE_STATE_EVENT_RESPONSE,
|
.msg_id = CAPWAP_MSG_CHANGE_STATE_EVENT_RESPONSE,
|
||||||
.elem_id = CW_ELEM_RESULT_CODE,
|
.elem_id = CAPWAP_ELEM_RESULT_CODE,
|
||||||
.item_id = CW_ITEM_RESULT_CODE,
|
.item_id = CW_ITEM_RESULT_CODE,
|
||||||
.start = cw_in_generic2,
|
.start = cw_in_generic2,
|
||||||
.min_len = 4,
|
.min_len = 4,
|
||||||
@ -695,7 +695,7 @@ static cw_action_out_t actions_out[] = {
|
|||||||
|
|
||||||
{
|
{
|
||||||
.msg_id = CAPWAP_MSG_CHANGE_STATE_EVENT_REQUEST,
|
.msg_id = CAPWAP_MSG_CHANGE_STATE_EVENT_REQUEST,
|
||||||
.elem_id = CW_ELEM_RESULT_CODE,
|
.elem_id = CAPWAP_ELEM_RESULT_CODE,
|
||||||
.item_id = CW_ITEM_RESULT_CODE,
|
.item_id = CW_ITEM_RESULT_CODE,
|
||||||
.out = cw_out_generic,
|
.out = cw_out_generic,
|
||||||
.get = cw_out_get_outgoing,
|
.get = cw_out_get_outgoing,
|
||||||
|
Loading…
Reference in New Issue
Block a user