Naming of constants changed.

FossilOrigin-Name: 8bd3ae7319ccf259e9ec27aba78cbbbacdd56ee7e0691f0a6ef9edf81ae893e2
This commit is contained in:
7u83@mail.ru 2015-03-29 07:35:11 +00:00
parent 0db50b3be4
commit 5784b53a93
5 changed files with 24 additions and 23 deletions

View File

@ -173,11 +173,13 @@ struct capwap_ctrlhdr
*/
#define CW_ELEM_DECRYPTION_ERROR_REPORT_PERIOD 16
// Decryption Error Report Period 16
/*
Delete MAC ACL Entry 17
Delete Station 18
Reserved 19
*/
#define CW_ELEM_DELETE_MAC_ACL_ENTRY 17
#define CW_ELEM_DELETE_STATION 18
#define CW_ELEM_RESEERVED_19 19
#define CWMSGELEM_DISCOVERY_TYPE 20
#define CW_ELEM_DUPLICATE_IPV4_ADDRESS 21
@ -186,10 +188,9 @@ struct capwap_ctrlhdr
#define CWMSGELEM_ECN_SUPPORT 53
#define CW_ELEM_IDLE_TIMEOUT 23
#define CW_ELEM_IMAGE_DATA 24
#define CW_ELEM_IMAGE_IDENTIFIER 25
#define CWMSGELEM_IMAGE_DATA 24
#define CWMSGELEM_IMAGE_IDENTIFIER 25
/* Image Information 26
Initiate Download 27
*/
@ -231,8 +232,7 @@ struct capwap_ctrlhdr
#define CWMSGELEM_WTP_STATIC_IP_ADDRESS_INFO 49
/* WTP Static IP Address Information 49
*/
#define CW_ELEM_WTP_STATIC_IP_ADDRESS_INFORMATION 49
/* Cisco's CAPWAP definitions (CAPWAP draft 7)*/
#define CW_ELEM_WTP_IPV4_IP_ADDRESS 42

View File

@ -37,7 +37,7 @@ int conn_prepare_image_data_request(struct conn *conn, struct cwimage_data *data
if (conn->capwap_mode == CWMODE_CISCO) {
uint8_t type = 3;
uint16_t checksum = htons(lw_checksum(data->data, data->len));
cwmsg_vaddelem(cwmsg, CWMSGELEM_IMAGE_DATA,
cwmsg_vaddelem(cwmsg, CW_ELEM_IMAGE_DATA,
&type, 1,
&checksum, 2,
data->data, data->len,
@ -48,7 +48,7 @@ int conn_prepare_image_data_request(struct conn *conn, struct cwimage_data *data
/* standard capwap operation */
cwmsg_vaddelem(cwmsg,CWMSGELEM_IMAGE_DATA,
cwmsg_vaddelem(cwmsg,CW_ELEM_IMAGE_DATA,
&data->type, sizeof(data->type),
data->data, data->len,
NULL

View File

@ -77,21 +77,21 @@ const char * cw_msgelemtostr(int elem_id)
case CW_ELEM_IDLE_TIMEOUT:
return "Idle Timeout";
case CWMSGELEM_IMAGE_DATA:
return "image data";
case CW_ELEM_IMAGE_DATA:
return "Image Data";
case CWMSGELEM_IMAGE_IDENTIFIER:
return "image identifier";
case CW_ELEM_IMAGE_IDENTIFIER:
return "Image Identifier";
/* Image Information 26
Initiate Download 27
*/
case CWMSGELEM_LOCATION_DATA:
return "location data";
return "Location Data";
case CWMSGELEM_MAXIMUM_MESSAGE_LENGTH:
return "max msg len";
return "Maximum Message Length";
case CWMSGELEM_MTU_DISCOVERY_PADDING:
return "mtu discovery padding";
@ -148,10 +148,11 @@ const char * cw_msgelemtostr(int elem_id)
case CWMSGELEM_WTP_REBOOT_STATISTICS:
return "wtp reboot statistics";
return "WTP Reboot Statistics";
case CW_ELEM_STATIC_IP_ADDRESS_INFORMATION: /*49*/
return "WTP Static IP Addr Info";
/* WTP Static IP Address Information 49
*/

View File

@ -31,7 +31,7 @@
int cw_readelem_image_identifier(struct cwimage_data *data, int type,uint8_t *msgelem, int len)
{
if (type != CWMSGELEM_IMAGE_IDENTIFIER)
if (type != CW_ELEM_IMAGE_IDENTIFIER)
return 0;
data->vendor_id = ntohl(*((uint32_t*)msgelem));

View File

@ -23,7 +23,7 @@ void cwmsg_addelem_image_identifier(struct cwmsg *cwmsg,uint32_t vendor_id,uint8
{
// uint32_t net_vendor_id = htonl(vendor_id);
cwmsg_vaddelem(cwmsg,CWMSGELEM_IMAGE_IDENTIFIER,img,len,NULL);
cwmsg_vaddelem(cwmsg,CW_ELEM_IMAGE_IDENTIFIER,img,len,NULL);
// cwmsg_vaddelem(cwmsg,CWMSGELEM_IMAGE_IDENTIFIER,2,&net_vendor_id,sizeof(net_vendor_id),img,len);
}