Added Cisco-Vendor-Specific-CAPWAP and LWAPP definitions.
FossilOrigin-Name: 8b3cee8901a85308f6ddcd4ad90d25c41b48c8299e2b6d7e32215113f60c5bb5
This commit is contained in:
parent
5784b53a93
commit
99fb8907dc
@ -36,7 +36,7 @@ AP = RAD = WTP
|
||||
8. Cisco WTP Radio Configuration
|
||||
|
||||
See RFC 5412 - LWAPP 80211 WTP WLAN Radio Configuration. This Cisco
|
||||
CAPWAP element is slightly different.
|
||||
CAPWAP element is slightly different from LWAPP.
|
||||
|
||||
0 1 2 3
|
||||
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
|
||||
@ -184,7 +184,7 @@ AP = RAD = WTP
|
||||
+-+-+-+-+-+-+-+-+
|
||||
|
||||
Type: 126
|
||||
Length: 7
|
||||
Length: 5
|
||||
|
||||
|
||||
|
||||
@ -275,7 +275,7 @@ Vendor spec CAPWAP | Vedor spec LWAPP | Vendor specific LWAPP data
|
||||
20. Cisco AP Username Password
|
||||
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| Username (32 bytes) ...
|
||||
| Username (33 bytes) ...
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
... Username |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
@ -284,6 +284,11 @@ Vendor spec CAPWAP | Vedor spec LWAPP | Vendor specific LWAPP data
|
||||
|
||||
|
||||
|
||||
Username:
|
||||
0-terminated username, the field has to fillid up with zeros.
|
||||
|
||||
|
||||
|
||||
44. Cisco AP Telnet SSH
|
||||
0 1
|
||||
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
|
||||
@ -295,6 +300,36 @@ Vendor spec CAPWAP | Vedor spec LWAPP | Vendor specific LWAPP data
|
||||
Length: 2
|
||||
|
||||
|
||||
|
||||
54. AP Mode and Type
|
||||
|
||||
The AP Mode and Type message element is used to configure a WTP to
|
||||
operate in a specific mode.
|
||||
|
||||
0 1
|
||||
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| Mode | Type |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
|
||||
|
||||
Type: 54 for AP Mode and Type
|
||||
|
||||
Length: 2
|
||||
|
||||
Mode: An 8-bit value describing the type of information being sent.
|
||||
The following values are supported:
|
||||
|
||||
0 - Split MAC
|
||||
2 - Local MAC
|
||||
|
||||
Type: AP Type
|
||||
|
||||
4 -
|
||||
|
||||
|
||||
|
||||
|
||||
73. Cisco Path MTU
|
||||
|
||||
0 1 2 3
|
||||
|
@ -368,7 +368,7 @@ static void wtpman_run_discovery(void *arg)
|
||||
}
|
||||
|
||||
|
||||
if (cwrmsg->type!=CWMSG_DISCOVERY_REQUEST){
|
||||
if (cwrmsg->type!=CW_MSG_DISCOVERY_REQUEST){
|
||||
cw_dbg(DBG_MSG_ERR,"Invalid message in discovery state from %s, type=%s - %s ",
|
||||
CLIENT_IP,cwrmsg->type,cw_msgtostr(cwrmsg->type));
|
||||
wtpman_remove(wtpman);
|
||||
@ -440,10 +440,10 @@ static void wtpman_run_run(void *arg)
|
||||
|
||||
|
||||
conn_prepare_request(conn,CW_MSG_CONFIGURATION_UPDATE_REQUEST);
|
||||
cwmsg_addelem(&conn->req_msg,CWMSGELEM_WTP_NAME,(uint8_t*)"Tube7u83",strlen("Tube7u83")+1);
|
||||
cwmsg_addelem(&conn->req_msg,CW_ELEM_WTP_NAME,(uint8_t*)"Tube7u83",strlen("Tube7u83")+1);
|
||||
cwmsg_addelem(&conn->req_msg,CWMSGELEM_LOCATION_DATA,(uint8_t*)"Berlin",strlen("Berlin")+1);
|
||||
|
||||
cwmsg_addelem_vendor_specific_payload(&conn->req_msg,CW_VENDOR_ID_CISCO,CW_CISCO_RAD_NAME,(uint8_t*)"Schlumpf",strlen("Schlumpf"));
|
||||
// cwmsg_addelem_vendor_specific_payload(&conn->req_msg,CW_VENDOR_ID_CISCO,CW_CISCO_RAD_NAME,(uint8_t*)"Schlumpf",strlen("Schlumpf"));
|
||||
|
||||
cwrmsg = conn_send_request(conn);
|
||||
|
||||
|
@ -74,9 +74,6 @@ enum capwapmodes {
|
||||
#define CWTH_WBID_EPCGLOBAL 3
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define CAPWAP_PACKET_PREAMBLE (CW_VERSION<<4)
|
||||
#define CAPWAP_DTLS_PACKET_PREAMBLE (CW_VERSION<<4|1)
|
||||
|
||||
@ -100,10 +97,10 @@ struct capwap_ctrlhdr
|
||||
|
||||
/* CAPWAP message types as defined in RFC 5416 */
|
||||
|
||||
#define CWMSG_DISCOVERY_REQUEST 1 + CWIANA_ENTERPRISE_NUMBER*256
|
||||
#define CWMSG_DISCOVERY_RESPONSE 2 + CWIANA_ENTERPRISE_NUMBER*256
|
||||
#define CWMSG_JOIN_REQUEST 3 + CWIANA_ENTERPRISE_NUMBER*256
|
||||
#define CWMSG_JOIN_RESPONSE 4 + CWIANA_ENTERPRISE_NUMBER*256
|
||||
#define CW_MSG_DISCOVERY_REQUEST 1
|
||||
#define CW_MSG_DISCOVERY_RESPONSE 2
|
||||
#define CWMSG_JOIN_REQUEST 3
|
||||
#define CWMSG_JOIN_RESPONSE 4
|
||||
|
||||
#define CW_MSG_CONFIGURATION_STATUS_REQUEST 5
|
||||
#define CW_MSG_CONFIGURATION_STATUS_RESPONSE 6
|
||||
@ -123,11 +120,11 @@ struct capwap_ctrlhdr
|
||||
#define CW_MSG_IMAGE_DATA_REQUEST 15
|
||||
#define CW_MSG_IMAGE_DATA_RESPONSE 16
|
||||
|
||||
#define CW_MSG_RESET_REQUEST 17 + CWIANA_ENTERPRISE_NUMBER*256
|
||||
#define CW_MSG_RESET_RESPONSE 18 + CWIANA_ENTERPRISE_NUMBER*256
|
||||
#define CW_MSG_RESET_REQUEST 17
|
||||
#define CW_MSG_RESET_RESPONSE 18
|
||||
|
||||
#define CWMSG_PRIMARY_DISCOVERY_REQUEST 19 + CWIANA_ENTERPRISE_NUMBER*256
|
||||
#define CWMSG_PRIMARY_DISCOVERY_RESPONSE 20 + CWIANA_ENTERPRISE_NUMBER*256
|
||||
#define CWMSG_PRIMARY_DISCOVERY_REQUEST 19
|
||||
#define CWMSG_PRIMARY_DISCOVERY_RESPONSE 20
|
||||
|
||||
/* Data Transfer Request 21
|
||||
Data Transfer Response 22
|
||||
@ -137,11 +134,11 @@ struct capwap_ctrlhdr
|
||||
Station Configuration Response 26
|
||||
*/
|
||||
|
||||
#define CWMSG_MAXMSG 26 + CWIANA_ENTERPRISE_NUMBER*256
|
||||
#define CWMSG_MAXMSG 26
|
||||
|
||||
|
||||
/*
|
||||
* CAPWAP message elements as defined in RFC 5416
|
||||
* CAPWAP message elements as defined in RFC 5415
|
||||
*/
|
||||
|
||||
|
||||
@ -153,93 +150,61 @@ struct capwap_ctrlhdr
|
||||
#define CW_ELEM_AC_NAME_WITH_INDEX 5 /* Draft 7 */
|
||||
#define CW_ELEM_AC_TIMESTAMP 6
|
||||
|
||||
/* Add MAC ACL Entry 7
|
||||
Add Station 8
|
||||
Reserved 9
|
||||
*/
|
||||
#define CW_ELEM_ADD_MAC_ACL_ENTRY 7
|
||||
#define CW_ELEM_ADD_STATION 8
|
||||
#define CW_ELEM_RESERVED_9 9
|
||||
#define CWMSGELEM_CONTROL_IPV4_ADDRESS 10
|
||||
#define CWMSGELEM_CONTROL_IPV6_ADDRESS 11
|
||||
|
||||
#define CWMSGELEM_CAPWAP_LOCAL_IPV4_ADDRESS 30
|
||||
#define CWMSGELEM_CAPWAP_LOCAL_IPV6_ADDRESS 50
|
||||
|
||||
|
||||
|
||||
#define CW_ELEM_CAPWAP_TIMERS 12
|
||||
/* CAPWAP Transport Protocol 51
|
||||
Data Transfer Data 13
|
||||
Data Transfer Mode 14
|
||||
Decryption Error Report 15
|
||||
*/
|
||||
#define CW_ELEM_CAPWAP_TRANSPORT_PROTOCOL 51 /* not in draft 7 */
|
||||
#define CW_ELEM_DATA_TRANSFER_DATA 13
|
||||
#define CW_ELEM_DATA_TRANSFER_MODE 14
|
||||
#define CW_ELEM_DECRYPTION_ERROR_REPORT 15
|
||||
#define CW_ELEM_DECRYPTION_ERROR_REPORT_PERIOD 16
|
||||
// Decryption Error Report Period 16
|
||||
|
||||
#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
|
||||
#define CW_ELEM_DUPLICATE_IPV6_ADRESS 22
|
||||
|
||||
#define CWMSGELEM_ECN_SUPPORT 53
|
||||
|
||||
#define CW_ELEM_IDLE_TIMEOUT 23
|
||||
#define CW_ELEM_IMAGE_DATA 24
|
||||
#define CW_ELEM_IMAGE_IDENTIFIER 25
|
||||
|
||||
/* Image Information 26
|
||||
Initiate Download 27
|
||||
*/
|
||||
#define CW_ELEM_IMAGE_INFORMATION 26
|
||||
#define CW_ELEM_INITIATE_DOWNLOAD 27
|
||||
#define CWMSGELEM_LOCATION_DATA 28
|
||||
|
||||
#define CWMSGELEM_MAXIMUM_MESSAGE_LENGTH 29
|
||||
#define CWMSGELEM_MTU_DISCOVERY_PADDING 52
|
||||
|
||||
#define CWMSGELEM_RADIO_ADMINISTRATIVE_STATE 31
|
||||
#define CW_ELEM_RADIO_OPERATIONAL_STATE 32
|
||||
|
||||
#define CW_ELEM_RESULT_CODE 33
|
||||
|
||||
/* Returned Message Element 34
|
||||
*/
|
||||
#define CW_ELEM_RETURNED_MESSAGE_ELEMENT 34
|
||||
#define CW_ELEM_SESSION_ID 35
|
||||
#define CW_ELEM_STATISTICS_TIMER 36
|
||||
|
||||
#define CW_ELEM_VENDOR_SPECIFIC_PAYLOAD 37
|
||||
|
||||
#define CWMSGELEM_WTP_BOARD_DATA 38
|
||||
|
||||
#define CWMSGELEM_WTP_DESCRIPTOR 39
|
||||
#define CW_ELEM_WTP_FALLBACK 40
|
||||
|
||||
#define CWMSGELEM_WTP_FRAME_TUNNEL_MODE 41
|
||||
#define CWMSGELEM_RESERVED_1 42
|
||||
|
||||
/*
|
||||
Reserved 43
|
||||
*/
|
||||
#define CWMSGELEM_WTP_MAC_TYPE 44
|
||||
#define CWMSGELEM_WTP_NAME 45
|
||||
/*
|
||||
Unused/Reserved 46
|
||||
WTP Radio Statistics 47
|
||||
*/
|
||||
#define CW_ELEM_RESERVED_42 42
|
||||
#define CW_ELEM_RESERVED_43 43
|
||||
#define CW_ELEM_WTP_MAC_TYPE 44
|
||||
#define CW_ELEM_WTP_NAME 45
|
||||
#define CW_ELEM_RESERVED_46 46
|
||||
#define CW_ELEM_WTP_RADIO_STATISTICS 47
|
||||
#define CWMSGELEM_WTP_REBOOT_STATISTICS 48
|
||||
|
||||
#define CWMSGELEM_WTP_STATIC_IP_ADDRESS_INFO 49
|
||||
|
||||
#define CW_ELEM_WTP_STATIC_IP_ADDRESS_INFORMATION 49
|
||||
#define CW_ELEM_WTP_STATIC_IP_ADDR_INFO 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_IPV6_IP_ADDRESS 43
|
||||
|
||||
|
||||
|
||||
/* pseudo message elements, defined for libcapwap */
|
||||
|
||||
#define XCWMSGELEM_CAPWAP_LOCAL_IP_ADDRESS 0x10000 /* means LOCAL_IPV4 or IPV6 ADRESS */
|
||||
@ -443,22 +408,18 @@ extern int cw_readelem_vendor_specific_payload(void *data, int msgtype, int elem
|
||||
#define CW_RESULT_JOIN_FAILURE 3
|
||||
#define CW_RESULT_JOIN_RESOURCE_DEPLETION 4
|
||||
#define CW_RESULT_JOIN_UNKNOWN_SOURCE 5
|
||||
#define CW_RESULT_JOIN_FAILURE_INCORRECT_DATA 6
|
||||
#define CW_RESULT_JOIN_FAILURE_SESSION_ALREADY_IN_USE 7
|
||||
#define CW_RESULT_JOIN_FAILURE_WTP_HARDWARE_NOT_SUPPORTED 8
|
||||
#define CW_RESULT_JOIN_FAILURE_BINDING_NOT_SUPPORTED 9
|
||||
#define CW_RESULT_RESET_FAILURE_UNABLE_TO_RESET 10
|
||||
|
||||
#define CW_RESULT_RESET_FAILURE_FIRMWARE_WRITE_ERROR 11
|
||||
|
||||
#define CW_RESULT_CONFIGURATION_FAILURE 12 //Configuration Failure (Unable to Apply Requested Configuration
|
||||
|
||||
// - Service Provided Anyhow)
|
||||
/*
|
||||
6 Join Failure (Incorrect Data)
|
||||
|
||||
7 Join Failure (Session ID Already in Use)
|
||||
|
||||
8 Join Failure (WTP Hardware Not Supported)
|
||||
|
||||
9 Join Failure (Binding Not Supported)
|
||||
|
||||
10 Reset Failure (Unable to Reset)
|
||||
|
||||
11 Reset Failure (Firmware Write Error)
|
||||
|
||||
12 Configuration Failure (Unable to Apply Requested Configuration
|
||||
- Service Provided Anyhow)
|
||||
|
||||
13 Configuration Failure (Unable to Apply Requested Configuration
|
||||
- Service Not Provided)
|
||||
|
@ -30,17 +30,28 @@
|
||||
#include "lwapp.h"
|
||||
#include "capwap.h"
|
||||
|
||||
#define CW_CISCO_MWAR_ADDR 2
|
||||
#define CW_CISCO_MWAR_ADDR LW_ELEM_AC_ADDRESS /* 2 */
|
||||
#define CW_CISCO_RAD 3
|
||||
#define CW_CISCO_RAD_SLOT 4
|
||||
#define CW_CISCO_RAD_NAME LW_ELEM_WTP_NAME /* 5 */
|
||||
#define CW_CISCO_MWAR LW_ELEM_AC_DESCRIPTOR /* 6 */
|
||||
#define CW_CISCO_ADD_WLAN LW_ELEM_80211_ADD_WLAN /* 7 */
|
||||
#define CW_CISCO_WTP_RADIO_CFG 8
|
||||
|
||||
#define CW_CISCO_MULTI_DOMAIN_CAPAB LW_ELEM_80211_MULTI_DOMAIN_CAPABILITY /* 10 */
|
||||
#define CW_CISCO_MAC_OPERATION LW_ELEM_80211_MAC_OPERATION /* 11 */
|
||||
|
||||
#define CW_CISCO_TX_POWER LW_ELEM_80211_TX_POWER /* 12 */
|
||||
#define CW_CISCO_TX_POWER_LEVELS LW_ELEM_80211_TX_POWER_LEVELS /* 13 */
|
||||
#define CW_CISCO_DIRECT_SEQUENCE_CONTROL LW_ELEM_DIRECT_SEQUENCE_CONTROL /* 14 */
|
||||
#define CW_CISCO_SUPPORTED_RATES LW_ELEM_80211_RATE_SET /* 16 */
|
||||
|
||||
|
||||
#define CW_CISCO_LOCATION_DATA LW_ELEM_LOCATION_DATA /* 35 */
|
||||
#define CW_CISCO_STATISTICS_TIMER LW_ELEM_STATISTICS_TIMER /* 37 */
|
||||
|
||||
#define CW_CISCO_ANTENNA_PAYLOAD 41
|
||||
|
||||
#define CW_CISCO_CERTIFICATE LW_ELEM_CERTIFICATE /* 44 */
|
||||
#define CW_CISCO_WTP_BOARD_DATA LW_ELEM_WTP_BOARD_DATA /* 50 */
|
||||
#define CW_CISCO_AP_MODE_AND_TYPE LW_ELEM_80211_WTP_MODE_AND_TYPE /* 54 */
|
||||
@ -55,13 +66,17 @@
|
||||
#define CW_CISCO_SPAM_VENDOR_SPECIFIC 104
|
||||
|
||||
#define CW_CISCO_AP_GROUP_NAME 123
|
||||
#define CW_CISCO_AP_MODEL 127
|
||||
#define CW_CISCO_AP_RESET_BUTTON_STATE 128
|
||||
|
||||
#define CW_CISCO_AP_LED_STATE_CONFIG 125
|
||||
#define CW_CISCO_AP_REGULATORY_DOMAIN 126
|
||||
|
||||
#define CW_CISCO_LWAPP_CHANNEL_POWER 134
|
||||
#define CW_CISCO_AP_PRE_STD_SWITCH_CONFIG 137
|
||||
#define CW_CISCO_AP_POWER_INJECTOR_CONFIG 138
|
||||
|
||||
#define CW_CISCO_AP_MINIOS_VERSION 149
|
||||
#define CW_CISCO_AP_TIMESYNC 151
|
||||
#define CW_CISCO_AP_DOMAIN 169
|
||||
#define CW_CISCO_AP_DNS 170
|
||||
|
@ -72,6 +72,41 @@ const char * cw_cisco_id_to_str(int elem_id)
|
||||
case CW_CISCO_STATISTICS_TIMER:
|
||||
return "Statistics Timer";
|
||||
|
||||
case CW_CISCO_AP_MODE_AND_TYPE:
|
||||
return "AP Mode and Type";
|
||||
|
||||
case CW_CISCO_ADD_WLAN:
|
||||
return "Add WLAN";
|
||||
|
||||
case CW_CISCO_MWAR_ADDR:
|
||||
return "MWAR Addr";
|
||||
|
||||
case CW_CISCO_BOARD_DATA_OPTIONS:
|
||||
return "WTP Board Data Options";
|
||||
case CW_CISCO_AP_RESET_BUTTON_STATE:
|
||||
return "Reset Button State";
|
||||
|
||||
case CW_CISCO_MAC_OPERATION:
|
||||
return "Mac Operation";
|
||||
|
||||
case CW_CISCO_TX_POWER:
|
||||
return "TX Power";
|
||||
case CW_CISCO_TX_POWER_LEVELS:
|
||||
return "TX Power Levels";
|
||||
case CW_CISCO_DIRECT_SEQUENCE_CONTROL:
|
||||
return "Direct Sequence Control";
|
||||
case CW_CISCO_AP_MODEL:
|
||||
return "AP Model";
|
||||
case CW_CISCO_AP_MINIOS_VERSION:
|
||||
return "AP MiniOS Version";
|
||||
case CW_CISCO_LWAPP_CHANNEL_POWER:
|
||||
return "LWAPP Channel Power";
|
||||
case CW_CISCO_ANTENNA_PAYLOAD:
|
||||
return "Antenna Payload";
|
||||
case CW_CISCO_SUPPORTED_RATES:
|
||||
return "Supported Rates";
|
||||
|
||||
|
||||
default:
|
||||
return "Unknown";
|
||||
|
||||
|
@ -136,11 +136,11 @@ const char * cw_msgelemtostr(int elem_id)
|
||||
/*
|
||||
Reserved 43
|
||||
*/
|
||||
case CWMSGELEM_WTP_MAC_TYPE:
|
||||
return "mac type";
|
||||
case CW_ELEM_WTP_MAC_TYPE:
|
||||
return "Mac Type";
|
||||
|
||||
case CWMSGELEM_WTP_NAME:
|
||||
return "wtp name";
|
||||
case CW_ELEM_WTP_NAME:
|
||||
return "WTP Name";
|
||||
/*
|
||||
Unused/Reserved 46
|
||||
WTP Radio Statistics 47
|
||||
@ -150,7 +150,7 @@ const char * cw_msgelemtostr(int elem_id)
|
||||
case CWMSGELEM_WTP_REBOOT_STATISTICS:
|
||||
return "WTP Reboot Statistics";
|
||||
|
||||
case CW_ELEM_STATIC_IP_ADDRESS_INFORMATION: /*49*/
|
||||
case CW_ELEM_WTP_STATIC_IP_ADDRESS_INFORMATION: /*49*/
|
||||
return "WTP Static IP Addr Info";
|
||||
|
||||
|
||||
|
@ -21,10 +21,10 @@
|
||||
const char * cw_msgtostr(int type)
|
||||
{
|
||||
switch(type){
|
||||
case CWMSG_DISCOVERY_REQUEST:
|
||||
case CW_MSG_DISCOVERY_REQUEST:
|
||||
return "Discovery Request";
|
||||
|
||||
case CWMSG_DISCOVERY_RESPONSE:
|
||||
case CW_MSG_DISCOVERY_RESPONSE:
|
||||
return "Discovery Response";
|
||||
|
||||
case CWMSG_JOIN_REQUEST:
|
||||
|
@ -28,7 +28,7 @@ int cw_readelem_cisco_payload(void *data,int msgtype,int elem_id,uint8_t *msgele
|
||||
|
||||
return 0;
|
||||
}
|
||||
case CWMSG_DISCOVERY_REQUEST:
|
||||
case CW_MSG_DISCOVERY_REQUEST:
|
||||
{
|
||||
struct wtpinfo * wtpinfo = (struct wtpinfo*)data;
|
||||
if (lw_readelem_wtp_name(&wtpinfo->name,elem_id,msgelem,len))
|
||||
|
@ -35,7 +35,7 @@ static int wtpinfo_readelem_discovery_req(void *eparm, int type,
|
||||
uint8_t * msgelem, int len)
|
||||
{
|
||||
struct eparm *e = (struct eparm *) eparm;
|
||||
cw_dbg_msgelem(CWMSG_DISCOVERY_REQUEST, type, msgelem, len);
|
||||
cw_dbg_msgelem(CW_MSG_DISCOVERY_REQUEST, type, msgelem, len);
|
||||
|
||||
/* mandatory message elements */
|
||||
if (wtpinfo_readelem_discovery_type
|
||||
@ -66,7 +66,7 @@ static int wtpinfo_readelem_discovery_req(void *eparm, int type,
|
||||
return 1;
|
||||
|
||||
if (cw_readelem_vendor_specific_payload
|
||||
(e->wtpinfo, CWMSG_DISCOVERY_REQUEST, type, msgelem, len))
|
||||
(e->wtpinfo, CW_MSG_DISCOVERY_REQUEST, type, msgelem, len))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
@ -84,7 +84,7 @@ void cwread_discovery_request(struct wtpinfo *wtpinfo, uint8_t * msg,
|
||||
CWMSGELEM_WTP_BOARD_DATA,
|
||||
CWMSGELEM_WTP_DESCRIPTOR,
|
||||
CWMSGELEM_WTP_FRAME_TUNNEL_MODE,
|
||||
CWMSGELEM_WTP_MAC_TYPE,
|
||||
CW_ELEM_WTP_MAC_TYPE,
|
||||
CWMSGELEM_80211_WTP_RADIO_INFO,
|
||||
-1
|
||||
};
|
||||
@ -96,5 +96,5 @@ void cwread_discovery_request(struct wtpinfo *wtpinfo, uint8_t * msg,
|
||||
cw_foreach_msgelem(msg, len, wtpinfo_readelem_discovery_req,
|
||||
&eparm);
|
||||
|
||||
cw_dbg_missing_mand_elems_(0, CWMSG_DISCOVERY_REQUEST, eparm.mand);
|
||||
cw_dbg_missing_mand_elems_(0, CW_MSG_DISCOVERY_REQUEST, eparm.mand);
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ struct eparm {
|
||||
|
||||
static int acinfo_readelem_discovery_resp(void * eparm,int type,uint8_t* msgelem,int len)
|
||||
{
|
||||
cw_dbg_msgelem(CWMSG_DISCOVERY_RESPONSE, type, msgelem, len);
|
||||
cw_dbg_msgelem(CW_MSG_DISCOVERY_RESPONSE, type, msgelem, len);
|
||||
|
||||
struct eparm *e = (struct eparm *) eparm;
|
||||
|
||||
@ -84,7 +84,7 @@ void cwread_discovery_response(struct ac_info * acinfo, uint8_t * msg, int len)
|
||||
|
||||
cw_foreach_msgelem(msg,len,acinfo_readelem_discovery_resp,&eparm);
|
||||
|
||||
cw_dbg_missing_mand_elems_(0, CWMSG_DISCOVERY_RESPONSE, eparm.mand);
|
||||
cw_dbg_missing_mand_elems_(0, CW_MSG_DISCOVERY_RESPONSE, eparm.mand);
|
||||
}
|
||||
|
||||
|
||||
|
@ -34,7 +34,7 @@ int cwsend_discovery_request(struct conn *conn, struct radioinfo *radioinfo,
|
||||
uint8_t buffer[CWMSG_MAX_SIZE];
|
||||
struct cwmsg cwmsg;
|
||||
|
||||
cwmsg_init(&cwmsg, buffer, CWMSG_DISCOVERY_REQUEST, conn_get_next_seqnum(conn),
|
||||
cwmsg_init(&cwmsg, buffer, CW_MSG_DISCOVERY_REQUEST, conn_get_next_seqnum(conn),
|
||||
radioinfo );
|
||||
cwmsg.capwap_mode = conn->capwap_mode;
|
||||
|
||||
@ -55,7 +55,7 @@ int cwsend_discovery_request(struct conn *conn, struct radioinfo *radioinfo,
|
||||
sizeof(uint8_t));
|
||||
|
||||
/* mac type */
|
||||
cwmsg_addelem(&cwmsg, CWMSGELEM_WTP_MAC_TYPE, &wtpinfo->mac_type, sizeof(uint8_t));
|
||||
cwmsg_addelem(&cwmsg, CW_ELEM_WTP_MAC_TYPE, &wtpinfo->mac_type, sizeof(uint8_t));
|
||||
|
||||
|
||||
/* radio infos */
|
||||
|
@ -36,7 +36,7 @@ void cwsend_discovery_response(struct conn *conn, int seqnum, struct radioinfo *
|
||||
seqnum);
|
||||
|
||||
struct cwmsg *cwmsg = &conn->resp_msg;
|
||||
cwmsg_init(cwmsg, conn->resp_buffer, CWMSG_DISCOVERY_RESPONSE, seqnum, NULL);
|
||||
cwmsg_init(cwmsg, conn->resp_buffer, CW_MSG_DISCOVERY_RESPONSE, seqnum, NULL);
|
||||
cwmsg->capwap_mode = conn->capwap_mode;
|
||||
|
||||
|
||||
|
@ -59,7 +59,7 @@ int cwsend_join_request(struct conn *conn, struct radioinfo *radioinfo, struct w
|
||||
cwmsg_addelem_wtp_descriptor(&cwmsg, wtpinfo);
|
||||
|
||||
/* wtp name */
|
||||
cwmsg_addelem(&cwmsg, CWMSGELEM_WTP_NAME, wtpinfo->name, strlen((char *) wtpinfo->name));
|
||||
cwmsg_addelem(&cwmsg, CW_ELEM_WTP_NAME, wtpinfo->name, strlen((char *) wtpinfo->name));
|
||||
|
||||
/* session id */
|
||||
cwmsg_addelem_session_id(&cwmsg, wtpinfo->session_id);
|
||||
@ -69,7 +69,7 @@ int cwsend_join_request(struct conn *conn, struct radioinfo *radioinfo, struct w
|
||||
sizeof(uint8_t));
|
||||
|
||||
/* WTP MAC type */
|
||||
cwmsg_addelem(&cwmsg, CWMSGELEM_WTP_MAC_TYPE, &wtpinfo->mac_type, sizeof(uint8_t));
|
||||
cwmsg_addelem(&cwmsg, CW_ELEM_WTP_MAC_TYPE, &wtpinfo->mac_type, sizeof(uint8_t));
|
||||
|
||||
|
||||
/* local ip address */
|
||||
|
@ -14,6 +14,9 @@ const char * lw_cisco_id_to_str(int elem_id)
|
||||
return "AP Username and Password";
|
||||
case LW_CISCO_AC_IP_ADDR_WITH_INDEX:
|
||||
return "AC IP Addr with Index";
|
||||
case LW_CISCO_AP_SUBMODE:
|
||||
return "AP Submode";
|
||||
|
||||
default:
|
||||
return "Unknown";
|
||||
|
||||
|
@ -44,7 +44,10 @@ const char * lw_elem_id_to_str(int elem_id)
|
||||
|
||||
|
||||
case LW_ELEM_80211_WTP_WLAN_RADIO_CONFIGURATION:
|
||||
return "80211 WTP Wlan Radio Configuration";
|
||||
return "80.211 WTP Wlan Radio Configuration";
|
||||
|
||||
case LW_ELEM_80211_WTP_MODE_AND_TYPE:
|
||||
return "802.11 WTP Mode and Type";
|
||||
|
||||
|
||||
|
||||
|
@ -109,17 +109,27 @@
|
||||
#define LW_ELEM_WTP_DESCRIPTOR 3
|
||||
#define LW_ELEM_WTP_NAME 5
|
||||
#define LW_ELEM_AC_DESCRIPTOR 6
|
||||
#define LW_ELEM_ADD_WLAN 7
|
||||
|
||||
#define LW_ELEM_MAC_OPERATION 11
|
||||
#define LW_ELEM_TX_POWER 12
|
||||
#define LW_ELEM_TX_POWER_LEVELS 13
|
||||
#define LW_ELEM_DIRECT_SEQUENCE_CONTROL 14
|
||||
|
||||
#define LW_ELEM_AC_NAME 31
|
||||
#define LW_ELEM_LOCATION_DATA 35
|
||||
#define LW_ELEM_STATISTICS_TIMER 37
|
||||
|
||||
|
||||
#define LW_ELEM_RATE_SET 16
|
||||
#define LW_ELEM_SUPPORTED_RATES 16
|
||||
|
||||
#define LW_ELEM_TEST 18
|
||||
|
||||
#define LW_ELEM_CERTIFICATE 44
|
||||
#define LW_ELEM_WTP_BOARD_DATA 50
|
||||
#define LW_ELEM_WTP_MODE_AND_TYPE 54
|
||||
|
||||
#define LW_ELEM_AC_IPV4_LIST 59
|
||||
#define LW_ELEM_AP_IP_ADDR 82
|
||||
|
||||
@ -129,9 +139,18 @@
|
||||
|
||||
/* LWAPP IEEE 802.11 bindings */
|
||||
|
||||
#define LW_ELEM_80211_ADD_WLAN LW_ELEM_ADD_WLAN
|
||||
#define LW_ELEM_80211_WTP_WLAN_RADIO_CONFIGURATION 8
|
||||
#define LW_ELEM_80211_MULTI_DOMAIN_CAPABILITY 10
|
||||
#define LW_ELEM_80211_WTP_MODE_AND_TYPE 54
|
||||
#define LW_ELEM_80211_MAC_OPERATION 11
|
||||
#define LW_ELEM_80211_TX_POWER LW_ELEM_TX_POWER /* 12 */
|
||||
#define LW_ELEM_80211_TX_POWER_LEVELS LW_ELEM_TX_POWER_LEVELS /* 13 */
|
||||
#define LW_ELEM_80211_DIRECT_SEQUENCE_CONTROL LW_ELEM_DIRECT_SEQUENCE_CONTROL /* 14 */
|
||||
|
||||
#define LW_ELEM_80211_RATE_SET LW_ELEM_RATE_SET /* 16 */
|
||||
|
||||
|
||||
#define LW_ELEM_80211_WTP_MODE_AND_TYPE LW_ELEM_WTP_MODE_AND_TYPE /* 54 */
|
||||
|
||||
|
||||
/* useful macros and inline functions */
|
||||
|
@ -28,11 +28,13 @@
|
||||
|
||||
/* Vendor specific message elements LWAPP Cisco */
|
||||
|
||||
#define LW_CISCO_AP_USERNAME_PASSWORD 20
|
||||
#define LW_CISCO_AP_USERNAME_PASSWORD 18
|
||||
|
||||
#define LW_CISCO_AC_IP_ADDR_WITH_INDEX 32
|
||||
#define LW_CISCO_AP_LOGHOST_CONFIG 36
|
||||
|
||||
#define LW_CISCO_AP_SUBMODE 67
|
||||
|
||||
#define LW_CISCO_PATH_MTU 73
|
||||
|
||||
#define LW_CISCO_ADD_WLAN 128
|
||||
|
@ -105,9 +105,9 @@ void process_join_request(struct wtpinfo * wtpinfo, uint8_t * msg, int len)
|
||||
CWMSGELEM_LOCATION_DATA,
|
||||
CWMSGELEM_WTP_BOARD_DATA,
|
||||
CWMSGELEM_WTP_DESCRIPTOR,
|
||||
CWMSGELEM_WTP_NAME,
|
||||
CW_ELEM_WTP_NAME,
|
||||
CWMSGELEM_WTP_FRAME_TUNNEL_MODE,
|
||||
CWMSGELEM_WTP_MAC_TYPE,
|
||||
CW_ELEM_WTP_MAC_TYPE,
|
||||
CWMSGELEM_ECN_SUPPORT,
|
||||
XCWMSGELEM_CAPWAP_LOCAL_IP_ADDRESS,
|
||||
XCWMSGELEM_CAPWAP_RADIO_INFO,
|
||||
@ -122,7 +122,7 @@ void process_join_request(struct wtpinfo * wtpinfo, uint8_t * msg, int len)
|
||||
cw_foreach_msgelem(msg, len, process_elem,
|
||||
&eparm);
|
||||
|
||||
cw_dbg_missing_mand_elems_(0, CWMSG_DISCOVERY_REQUEST, eparm.mand);
|
||||
cw_dbg_missing_mand_elems_(0, CWMSG_JOIN_REQUEST, eparm.mand);
|
||||
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
int wtpinfo_readelem_wtp_mac_type(struct wtpinfo * wtpinfo, int type, uint8_t * msgelem, int len)
|
||||
{
|
||||
if (type != CWMSGELEM_WTP_MAC_TYPE)
|
||||
if (type != CW_ELEM_WTP_MAC_TYPE)
|
||||
return 0;
|
||||
|
||||
if (len!=1){
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
int wtpinfo_readelem_wtp_name(struct wtpinfo * wtpinfo, int type, uint8_t * msgelem, int len)
|
||||
{
|
||||
if (type != CWMSGELEM_WTP_NAME)
|
||||
if (type != CW_ELEM_WTP_NAME)
|
||||
return 0;
|
||||
|
||||
if (len>512){
|
||||
|
@ -61,7 +61,7 @@ struct ac_info wtp_acinfo;
|
||||
|
||||
static int msg_cb(void *priv,struct cwrmsg * cwrmsg)
|
||||
{
|
||||
if (cwrmsg->type != CWMSG_DISCOVERY_RESPONSE){
|
||||
if (cwrmsg->type != CW_MSG_DISCOVERY_RESPONSE){
|
||||
cw_dbg(DBG_ERR,"Expected discovery response, but received %i",cwrmsg->type);
|
||||
return 1;
|
||||
}
|
||||
|
@ -1218,7 +1218,8 @@ int wtpdrv_get_radioinfo(int rid,struct radioinfo * radioinfo)
|
||||
radioinfo->rid=rid;
|
||||
//uint8_t rm[8]="12345600";
|
||||
// uint8_t rm[8]={0x00,0x19,0xdb,0xe0,0x93,0x27};
|
||||
uint8_t rm[8]={0x00,0x3a,0x99,0x02,0xfa,0xc0};
|
||||
// uint8_t rm[8]={0x00,0x3a,0x99,0x02,0xfa,0xc0};
|
||||
uint8_t rm[8]={0x00,0x4a,0x99,0x02,0xfa,0xc0};
|
||||
// uint8_t rm[8]={0x68,0x67,0x65,0x64,0x63,0x62};
|
||||
|
||||
radioinfo->rmac = bstr_create(rm,6);
|
||||
|
Loading…
Reference in New Issue
Block a user