2014-08-14 18:23:17 +02:00
|
|
|
/*
|
|
|
|
This file is part of libcapwap.
|
|
|
|
|
|
|
|
libcapwap is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
libcapwap is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with Foobar. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2015-03-16 02:41:35 +01:00
|
|
|
/**
|
|
|
|
* @file
|
2015-03-23 19:40:39 +01:00
|
|
|
* @brief Cisco specific CAPWAP definitions
|
2015-03-16 02:41:35 +01:00
|
|
|
*/
|
|
|
|
|
2014-08-14 17:18:19 +02:00
|
|
|
#ifndef __CAPWAP_CISCO_H
|
|
|
|
#define __CAPWAP_CISCO_H
|
|
|
|
|
2015-03-14 10:15:12 +01:00
|
|
|
#include <string.h>
|
2015-03-23 19:40:39 +01:00
|
|
|
#include <time.h>
|
2015-03-14 10:15:12 +01:00
|
|
|
|
2015-03-15 20:53:21 +01:00
|
|
|
#include "lwapp.h"
|
2016-03-11 22:23:00 +01:00
|
|
|
#include "cw.h"
|
2016-03-13 01:56:14 +01:00
|
|
|
#include "vendors.h"
|
2015-03-14 10:15:12 +01:00
|
|
|
|
2015-03-29 15:36:23 +02:00
|
|
|
#define CW_CISCO_MWAR_ADDR LW_ELEM_AC_ADDRESS /* 2 */
|
2015-03-28 18:32:03 +01:00
|
|
|
#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 */
|
2015-03-29 15:36:23 +02:00
|
|
|
#define CW_CISCO_ADD_WLAN LW_ELEM_80211_ADD_WLAN /* 7 */
|
2015-03-29 01:55:06 +01:00
|
|
|
#define CW_CISCO_WTP_RADIO_CFG 8
|
2014-08-14 17:18:19 +02:00
|
|
|
|
2015-03-28 18:32:03 +01:00
|
|
|
#define CW_CISCO_MULTI_DOMAIN_CAPAB LW_ELEM_80211_MULTI_DOMAIN_CAPABILITY /* 10 */
|
2015-03-29 15:36:23 +02:00
|
|
|
#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 */
|
|
|
|
|
2015-04-28 10:23:03 +02:00
|
|
|
#define CW_CISCO_80211_DELETE_WLAN LW_ELEM_80211_DELETE_WLAN /* 28 */
|
|
|
|
|
2015-04-05 20:27:17 +02:00
|
|
|
#define CW_CISCO_MWAR_NAME LW_ELEM_AC_NAME /* 31 */
|
2015-03-29 15:36:23 +02:00
|
|
|
|
2015-03-29 01:55:06 +01:00
|
|
|
#define CW_CISCO_LOCATION_DATA LW_ELEM_LOCATION_DATA /* 35 */
|
|
|
|
#define CW_CISCO_STATISTICS_TIMER LW_ELEM_STATISTICS_TIMER /* 37 */
|
2015-03-15 20:53:21 +01:00
|
|
|
|
2015-03-29 15:36:23 +02:00
|
|
|
#define CW_CISCO_ANTENNA_PAYLOAD 41
|
|
|
|
|
2015-03-28 18:32:03 +01:00
|
|
|
#define CW_CISCO_CERTIFICATE LW_ELEM_CERTIFICATE /* 44 */
|
|
|
|
#define CW_CISCO_WTP_BOARD_DATA LW_ELEM_WTP_BOARD_DATA /* 50 */
|
2016-04-07 08:01:14 +02:00
|
|
|
#define CW_CISCO_BCAST_SSID_MODE LW_BCAST_SSID_MODE
|
2015-03-28 18:32:03 +01:00
|
|
|
#define CW_CISCO_AP_MODE_AND_TYPE LW_ELEM_80211_WTP_MODE_AND_TYPE /* 54 */
|
2015-04-28 15:29:27 +02:00
|
|
|
#define CW_CISCO_AP_QOS LW_ELEM_QOS /* 57 */
|
2015-03-16 02:41:35 +01:00
|
|
|
|
2015-03-29 01:55:06 +01:00
|
|
|
#define CW_CISCO_AC_IPV4_LIST LW_ELEM_AC_IPV4_LIST /* 59 */
|
|
|
|
|
2016-03-20 21:54:36 +01:00
|
|
|
#define CW_CISCO_CAPWAP_TIMERS LW_ELEM_LWAPP_TIMERS /* 68 */
|
2015-03-29 01:55:06 +01:00
|
|
|
#define CW_CISCO_AP_STATIC_IP_ADDR 83
|
2015-04-28 10:23:03 +02:00
|
|
|
#define CW_CISCO_SIG_PAYLOAD 84
|
|
|
|
#define CW_CISCO_SIG_TOGGLE 87
|
2016-04-07 08:01:14 +02:00
|
|
|
#define CW_CISCO_AIRSPACE_CAPABILITY 88
|
2015-03-29 01:55:06 +01:00
|
|
|
|
|
|
|
#define CW_CISCO_AC_NAME_WITH_INDEX 91
|
2015-04-19 16:44:20 +02:00
|
|
|
#define CW_CISCO_SPAM_DOMAIN_SECRET 96
|
2015-03-15 20:53:21 +01:00
|
|
|
|
2015-03-28 18:32:03 +01:00
|
|
|
#define CW_CISCO_SPAM_VENDOR_SPECIFIC 104
|
2015-03-15 20:53:21 +01:00
|
|
|
|
2015-04-28 22:50:29 +02:00
|
|
|
#define CW_CISCO_AP_UPTIME 108
|
|
|
|
|
2015-03-28 18:32:03 +01:00
|
|
|
#define CW_CISCO_AP_GROUP_NAME 123
|
2016-04-11 03:19:45 +02:00
|
|
|
#define CW_CISCO_AP_LED_STATE_CONFIG 125
|
2015-03-29 15:36:23 +02:00
|
|
|
#define CW_CISCO_AP_MODEL 127
|
|
|
|
#define CW_CISCO_AP_RESET_BUTTON_STATE 128
|
2015-03-15 20:53:21 +01:00
|
|
|
|
2015-03-28 18:32:03 +01:00
|
|
|
#define CW_CISCO_AP_REGULATORY_DOMAIN 126
|
2015-03-15 20:53:21 +01:00
|
|
|
|
2015-03-29 15:36:23 +02:00
|
|
|
#define CW_CISCO_LWAPP_CHANNEL_POWER 134
|
2016-04-05 08:35:35 +02:00
|
|
|
#define CW_CISCO_AP_CORE_DUMP 135
|
2015-03-28 18:32:03 +01:00
|
|
|
#define CW_CISCO_AP_PRE_STD_SWITCH_CONFIG 137
|
|
|
|
#define CW_CISCO_AP_POWER_INJECTOR_CONFIG 138
|
|
|
|
|
2015-03-29 15:36:23 +02:00
|
|
|
#define CW_CISCO_AP_MINIOS_VERSION 149
|
2015-03-28 18:32:03 +01:00
|
|
|
#define CW_CISCO_AP_TIMESYNC 151
|
2015-03-29 01:55:06 +01:00
|
|
|
#define CW_CISCO_AP_DOMAIN 169
|
|
|
|
#define CW_CISCO_AP_DNS 170
|
|
|
|
|
2015-04-28 22:50:29 +02:00
|
|
|
#define CW_CISCO_AP_BACKUP_SOFTWARE_VERSION 183
|
2015-03-28 18:32:03 +01:00
|
|
|
#define CW_CISCO_BOARD_DATA_OPTIONS 207
|
|
|
|
#define CW_CISCO_MWAR_TYPE 208
|
2015-04-28 14:31:25 +02:00
|
|
|
#define CW_CISCO_80211_ASSOC_LIMIT 213
|
2015-04-28 15:29:27 +02:00
|
|
|
#define CW_CISCO_TLV_PAYLOAD 215
|
2015-04-28 22:50:29 +02:00
|
|
|
#define CW_CISCO_AP_LOG_FACILITY 224
|
2015-04-28 14:31:25 +02:00
|
|
|
|
2016-04-18 23:18:10 +02:00
|
|
|
#define CW_CISCO_OPER_STATE_DETAIL_CAUSE 235
|
|
|
|
|
|
|
|
|
2015-04-21 08:24:59 +02:00
|
|
|
#define CW_CISCO_AP_RETRANSMIT_PARAM 240
|
2016-04-18 23:18:10 +02:00
|
|
|
|
|
|
|
#define CW_CISCO_DOT11_CONFIG_CHECKER 242
|
|
|
|
|
2015-04-24 07:13:54 +02:00
|
|
|
#define CW_CISCO_AP_VENUE_SETTINGS 249
|
2016-04-09 11:59:39 +02:00
|
|
|
#define CW_CISCO_AP_LED_FLASH_CONFIG 254
|
|
|
|
|
2015-03-16 02:41:35 +01:00
|
|
|
|
2015-03-14 21:41:50 +01:00
|
|
|
|
2018-03-02 13:36:03 +01:00
|
|
|
int cw_put_cisco_ap_timesync(uint8_t * dst, time_t time, uint8_t type);
|
2015-04-05 20:27:17 +02:00
|
|
|
|
2015-03-23 19:40:39 +01:00
|
|
|
|
2015-04-05 20:27:17 +02:00
|
|
|
|
2018-03-02 13:36:03 +01:00
|
|
|
int cw_out_cisco_ap_timesync(struct conn *conn,struct cw_action_out * a,uint8_t *dst);
|
2015-04-05 20:27:17 +02:00
|
|
|
|
|
|
|
|
2015-03-28 08:29:59 +01:00
|
|
|
|
|
|
|
|
2018-03-02 13:36:03 +01:00
|
|
|
int cw_addelem_cisco_ap_regulatory_domain(uint8_t *dst, struct radioinfo * ri);
|
2015-03-28 08:29:59 +01:00
|
|
|
|
|
|
|
|
2015-03-23 19:40:39 +01:00
|
|
|
/**
|
|
|
|
* Add a Cisco MWAR message element.
|
|
|
|
* @param dst destinnation buffer
|
|
|
|
* @param acinfo AC data
|
|
|
|
* @return number of bytes put
|
|
|
|
*
|
|
|
|
* This message elemet is basically an LWAPP AC Descriptor
|
|
|
|
* encapsulated in a CAPWAP vendor specific payload message
|
|
|
|
*/
|
2015-04-12 19:19:29 +02:00
|
|
|
|
|
|
|
/*
|
2015-03-23 19:40:39 +01:00
|
|
|
static inline int cw_addelem_cisco_mwar(uint8_t *dst, struct ac_info *acinfo){
|
|
|
|
int l = lw_put_ac_descriptor(dst+10,acinfo);
|
|
|
|
return l+cw_put_elem_vendor_hdr(dst,CW_VENDOR_ID_CISCO,CW_CISCO_MWAR,l);
|
|
|
|
}
|
2015-04-12 19:19:29 +02:00
|
|
|
*/
|
2015-03-23 19:40:39 +01:00
|
|
|
|
2018-03-02 13:36:03 +01:00
|
|
|
int cw_readelem_cisco_station_cfg(uint8_t *src,int len);
|
|
|
|
int cw_addelem_cisco_certificate(uint8_t*dst,uint8_t*src,int len);
|
2015-03-28 08:29:59 +01:00
|
|
|
|
2015-03-28 18:32:03 +01:00
|
|
|
|
2015-03-29 01:55:06 +01:00
|
|
|
extern const char * cw_cisco_id_to_str(int elem_id);
|
|
|
|
|
|
|
|
int cw_readelem_cisco_wtp_radio_cfg(int elem_id,uint8_t *elem, int len,struct radioinfo *ri);
|
|
|
|
int cw_addelem_cisco_wtp_radio_cfg(uint8_t*dst,struct radioinfo * ri);
|
2015-03-28 18:32:03 +01:00
|
|
|
|
2015-04-05 20:27:17 +02:00
|
|
|
extern int cw_out_cisco_ac_descriptor(struct conn *conn,struct cw_action_out * a,uint8_t *dst) ;
|
2015-04-12 23:28:55 +02:00
|
|
|
int cw_in_cisco_image_identifier(struct conn *conn,struct cw_action_in * a,uint8_t *data,int len,struct sockaddr *from);
|
2015-04-05 20:27:17 +02:00
|
|
|
|
2015-04-13 11:00:46 +02:00
|
|
|
int cw_in_cipwap_wtp_descriptor(struct conn *conn, struct cw_action_in *a, uint8_t * data,
|
|
|
|
int len,struct sockaddr *from);
|
|
|
|
int cw_in_check_cipwap_join_req(struct conn *conn, struct cw_action_in *a, uint8_t * data,
|
|
|
|
int len,struct sockaddr *from);
|
|
|
|
|
|
|
|
|
2015-03-23 19:40:39 +01:00
|
|
|
|
2015-04-19 16:44:20 +02:00
|
|
|
int cw_out_cisco_wtp_radio_cfg(struct conn *conn, struct cw_action_out *a, uint8_t * dst);
|
|
|
|
|
2015-04-26 08:41:12 +02:00
|
|
|
int cw_in_cisco_radio_administrative_state(struct conn *conn, struct cw_action_in *a, uint8_t * data, int len,
|
|
|
|
struct sockaddr *from);
|
|
|
|
|
2015-04-28 10:23:03 +02:00
|
|
|
int cw_in_cisco_radio_administrative_state_wtp(struct conn *conn, struct cw_action_in *a, uint8_t * data, int len,
|
|
|
|
struct sockaddr *from);
|
2015-04-26 08:41:12 +02:00
|
|
|
|
2015-03-23 19:40:39 +01:00
|
|
|
|
2015-04-28 10:23:03 +02:00
|
|
|
int cw_in_cisco_radio_cfg(struct conn *conn, struct cw_action_in *a, uint8_t * data, int len,
|
|
|
|
struct sockaddr *from);
|
2015-03-14 10:15:12 +01:00
|
|
|
|
2015-04-19 16:44:20 +02:00
|
|
|
|
2015-05-11 21:58:17 +02:00
|
|
|
int cw_in_cisco_add_wlan(struct conn *conn, struct cw_action_in *a, uint8_t * data, int len,
|
|
|
|
struct sockaddr *from);
|
2015-03-14 10:15:12 +01:00
|
|
|
|
2014-08-14 17:18:19 +02:00
|
|
|
#endif
|