More Join Message Elements added

FossilOrigin-Name: 8948a1bf0e34873bbc9f9744e1bbb13049079b829a49944a1331d973c7350f01
This commit is contained in:
7u83@mail.ru 2018-04-03 16:11:14 +00:00
parent 43c5b27523
commit 13fd5bdc27
10 changed files with 25 additions and 10 deletions

View File

@ -3,6 +3,6 @@ include ../Config.mak
# Define SSL Library: OPENSSL or GNUTLS
# SSL_LIBRARY=OPENSSL
SSL_LIBRARY=OPENSSL
SSL_LIBRARY=GNUTLS

View File

@ -15,7 +15,7 @@ ac-descriptor/hardware/vendor:Dword:1234567
ac-descriptor/hardware/version:Bstr16:"1.7.3"
ac-name:Bstr16:"TubesAC"
capwap-control-ip-address/address.0:IPAddress:192.168.0.14
capwap-control-ip-address/address.0:IPAddress:172.16.66.229
#capwap-control-ip-address/address.1:IPAddress:2a00:c1a0:48c6:4a00:9965:1b6e:aca3:1398
capwap-control-ip-address/wtps.0:Word:0
#capwap-control-ip-address/wtps.1:Word:11

View File

@ -104,7 +104,7 @@ int dataman_process_keep_alive(struct netconn *nc, uint8_t *rawmsg, int len)
cw_foreach_elem(elem, elems_ptr, elems_len) {
if (cw_get_elem_id(elem) == CW_ELEM_SESSION_ID){
if (cw_get_elem_id(elem) == CAPWAP_ELEM_SESSION_ID){
uint8_t sessid[16];
memset(sessid,0,16);

View File

@ -248,7 +248,7 @@
#define CW_ELEM_RADIO_OPERATIONAL_STATE 32
#define CW_ELEM_RESULT_CODE 33
#define CW_ELEM_RETURNED_MESSAGE_ELEMENT 34
#define CW_ELEM_SESSION_ID 35
#define CAPWAP_ELEM_SESSION_ID 35
#define CW_ELEM_STATISTICS_TIMER 36
/**
* The Vendor Specific Payload allows tronasport of
@ -357,7 +357,7 @@
//#define CWMSG_MAX_SIZE 2048
*/
#define CW_SESSION_ID_LEN 16
#define CAPWAP_SESSION_ID_LEN 16
#define CAPWAP_MAX_AC_NAME_LEN 512
#define CAPWAP_MAX_WTP_NAME_LEN 512
#define CAPWAP_MAX_LOCATION_DATA_LEN 1024

View File

@ -42,7 +42,7 @@ struct cw_StrListElem capwap_strings_elem[] = {
{CW_ELEM_RADIO_OPERATIONAL_STATE, "Radio Operational State"},
{CW_ELEM_RESULT_CODE, "Result Code"},
{CW_ELEM_RETURNED_MESSAGE_ELEMENT, "Returned Message Element"},
{CW_ELEM_SESSION_ID, "Session ID"},
{CAPWAP_ELEM_SESSION_ID, "Session ID"},
{CW_ELEM_STATISTICS_TIMER, "Statistics Timer"},
{CAPWAP_ELEM_VENDOR_SPECIFIC_PAYLOAD, "Vendor Specific Payload"},
{CAPWAP_ELEM_WTP_BOARD_DATA, "WTP Board Data"},

View File

@ -199,9 +199,10 @@ int cw_put_elem_radio_administrative_state(uint8_t * dst, int rid, int state) {
return 2+cw_put_elem_hdr(dst,CW_ELEM_RADIO_ADMINISTRATIVE_STATE,2);
}
int cw_put_elem_session_id(uint8_t *dst, uint8_t *session_id, int len){
memcpy(dst+4,session_id,len);
return len+cw_put_elem_hdr(dst,CW_ELEM_SESSION_ID,len);
return len+cw_put_elem_hdr(dst,CAPWAP_ELEM_SESSION_ID,len);
}

View File

@ -179,6 +179,18 @@ static struct cw_ElemHandler handlers[] = {
cw_out_generic /* put */
}
,
{
"Session ID", /* name */
CAPWAP_ELEM_SESSION_ID, /* Element ID */
0,0, /* Vendor / Proto */
CAPWAP_SESSION_ID_LEN,CAPWAP_SESSION_ID_LEN, /* min/max length */
CW_TYPE_BSTR16, /* type */
"session-id", /* Key */
cw_in_generic, /* get */
cw_out_generic /* put */
}
,
{0,0,0,0,0,0,0,0}
@ -216,7 +228,7 @@ static struct cw_ElemDef join_request_elements[] ={
{0,0,CAPWAP_ELEM_WTP_BOARD_DATA, 1, 0},
{0,0,CAPWAP_ELEM_WTP_DESCRIPTOR, 1, 0},
{0,0,CAPWAP_ELEM_WTP_NAME, 1, 0},
/* Session ID */
{0,0,CAPWAP_ELEM_SESSION_ID, 1, 0},
{0,0,CAPWAP_ELEM_WTP_FRAME_TUNNEL_MODE, 1, 0},
{0,0,CAPWAP_ELEM_WTP_MAC_TYPE, 1, 0},

View File

@ -555,7 +555,7 @@ static cw_action_out_t actions_out[] = {
/* Session ID - Join Request */
{
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
.elem_id = CW_ELEM_SESSION_ID,
.elem_id = CAPWAP_ELEM_SESSION_ID,
.item_id = CW_ITEM_SESSION_ID,
.out = cw_out_generic,
.get = cw_out_get_session_id,

View File

@ -94,7 +94,7 @@ static cw_action_in_t actions_in[] = {
/* Cisco uses 4 byte session ids */
.capwap_state = CAPWAP_STATE_JOIN,
.msg_id = CW_MSG_JOIN_REQUEST,
.elem_id = CW_ELEM_SESSION_ID,
.elem_id = CAPWAP_ELEM_SESSION_ID,
.start = cw_in_generic2,
.item_id = CW_ITEM_SESSION_ID,
.mand = 1,

View File

@ -32,6 +32,8 @@ wtp-descriptor/max-radios:Byte:3
radio/0/wtp-radio-information:Dword:01
radio/1/wtp-radio-information:Dword:02
radio/2/wtp-radio-information:Dword:03
wtp-name:Bstr16:WFAT01