Naming of constants changed.
FossilOrigin-Name: 8bd3ae7319ccf259e9ec27aba78cbbbacdd56ee7e0691f0a6ef9edf81ae893e2
This commit is contained in:
parent
0db50b3be4
commit
5784b53a93
@ -173,11 +173,13 @@ struct capwap_ctrlhdr
|
|||||||
*/
|
*/
|
||||||
#define CW_ELEM_DECRYPTION_ERROR_REPORT_PERIOD 16
|
#define CW_ELEM_DECRYPTION_ERROR_REPORT_PERIOD 16
|
||||||
// Decryption Error Report Period 16
|
// Decryption Error Report Period 16
|
||||||
/*
|
|
||||||
Delete MAC ACL Entry 17
|
#define CW_ELEM_DELETE_MAC_ACL_ENTRY 17
|
||||||
Delete Station 18
|
|
||||||
Reserved 19
|
#define CW_ELEM_DELETE_STATION 18
|
||||||
*/
|
|
||||||
|
#define CW_ELEM_RESEERVED_19 19
|
||||||
|
|
||||||
#define CWMSGELEM_DISCOVERY_TYPE 20
|
#define CWMSGELEM_DISCOVERY_TYPE 20
|
||||||
|
|
||||||
#define CW_ELEM_DUPLICATE_IPV4_ADDRESS 21
|
#define CW_ELEM_DUPLICATE_IPV4_ADDRESS 21
|
||||||
@ -186,10 +188,9 @@ struct capwap_ctrlhdr
|
|||||||
#define CWMSGELEM_ECN_SUPPORT 53
|
#define CWMSGELEM_ECN_SUPPORT 53
|
||||||
|
|
||||||
#define CW_ELEM_IDLE_TIMEOUT 23
|
#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
|
/* Image Information 26
|
||||||
Initiate Download 27
|
Initiate Download 27
|
||||||
*/
|
*/
|
||||||
@ -231,8 +232,7 @@ struct capwap_ctrlhdr
|
|||||||
|
|
||||||
#define CWMSGELEM_WTP_STATIC_IP_ADDRESS_INFO 49
|
#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)*/
|
/* Cisco's CAPWAP definitions (CAPWAP draft 7)*/
|
||||||
#define CW_ELEM_WTP_IPV4_IP_ADDRESS 42
|
#define CW_ELEM_WTP_IPV4_IP_ADDRESS 42
|
||||||
|
@ -37,7 +37,7 @@ int conn_prepare_image_data_request(struct conn *conn, struct cwimage_data *data
|
|||||||
if (conn->capwap_mode == CWMODE_CISCO) {
|
if (conn->capwap_mode == CWMODE_CISCO) {
|
||||||
uint8_t type = 3;
|
uint8_t type = 3;
|
||||||
uint16_t checksum = htons(lw_checksum(data->data, data->len));
|
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,
|
&type, 1,
|
||||||
&checksum, 2,
|
&checksum, 2,
|
||||||
data->data, data->len,
|
data->data, data->len,
|
||||||
@ -48,7 +48,7 @@ int conn_prepare_image_data_request(struct conn *conn, struct cwimage_data *data
|
|||||||
|
|
||||||
/* standard capwap operation */
|
/* standard capwap operation */
|
||||||
|
|
||||||
cwmsg_vaddelem(cwmsg,CWMSGELEM_IMAGE_DATA,
|
cwmsg_vaddelem(cwmsg,CW_ELEM_IMAGE_DATA,
|
||||||
&data->type, sizeof(data->type),
|
&data->type, sizeof(data->type),
|
||||||
data->data, data->len,
|
data->data, data->len,
|
||||||
NULL
|
NULL
|
||||||
|
@ -77,21 +77,21 @@ const char * cw_msgelemtostr(int elem_id)
|
|||||||
case CW_ELEM_IDLE_TIMEOUT:
|
case CW_ELEM_IDLE_TIMEOUT:
|
||||||
return "Idle Timeout";
|
return "Idle Timeout";
|
||||||
|
|
||||||
case CWMSGELEM_IMAGE_DATA:
|
case CW_ELEM_IMAGE_DATA:
|
||||||
return "image data";
|
return "Image Data";
|
||||||
|
|
||||||
case CWMSGELEM_IMAGE_IDENTIFIER:
|
case CW_ELEM_IMAGE_IDENTIFIER:
|
||||||
return "image identifier";
|
return "Image Identifier";
|
||||||
|
|
||||||
|
|
||||||
/* Image Information 26
|
/* Image Information 26
|
||||||
Initiate Download 27
|
Initiate Download 27
|
||||||
*/
|
*/
|
||||||
case CWMSGELEM_LOCATION_DATA:
|
case CWMSGELEM_LOCATION_DATA:
|
||||||
return "location data";
|
return "Location Data";
|
||||||
|
|
||||||
case CWMSGELEM_MAXIMUM_MESSAGE_LENGTH:
|
case CWMSGELEM_MAXIMUM_MESSAGE_LENGTH:
|
||||||
return "max msg len";
|
return "Maximum Message Length";
|
||||||
case CWMSGELEM_MTU_DISCOVERY_PADDING:
|
case CWMSGELEM_MTU_DISCOVERY_PADDING:
|
||||||
return "mtu discovery padding";
|
return "mtu discovery padding";
|
||||||
|
|
||||||
@ -148,10 +148,11 @@ const char * cw_msgelemtostr(int elem_id)
|
|||||||
|
|
||||||
|
|
||||||
case CWMSGELEM_WTP_REBOOT_STATISTICS:
|
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
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
int cw_readelem_image_identifier(struct cwimage_data *data, int type,uint8_t *msgelem, int len)
|
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;
|
return 0;
|
||||||
|
|
||||||
data->vendor_id = ntohl(*((uint32_t*)msgelem));
|
data->vendor_id = ntohl(*((uint32_t*)msgelem));
|
||||||
|
@ -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);
|
// 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);
|
// cwmsg_vaddelem(cwmsg,CWMSGELEM_IMAGE_IDENTIFIER,2,&net_vendor_id,sizeof(net_vendor_id),img,len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user