Changed defs/function names from ..IEEE80211.. to ...80211...

Shorter names...

FossilOrigin-Name: e494b45b4f03db8638cbcb2c437e2fe168dbdce0d11fd9f8a56db7767ac0aaf7
This commit is contained in:
7u83@mail.ru 2015-03-19 20:51:28 +00:00
parent e40c67a002
commit 60dac37081
13 changed files with 116 additions and 32 deletions

View File

@ -11,7 +11,7 @@
#include "conf.h"
#include "capwap.h"
#include "capwap_ieee80211.h"
#include "capwap_80211.h"
ACIPLIST * get_aciplist()
{
@ -109,10 +109,10 @@ struct ac_info * get_acinfo()
int i;
for (i=1; i<=4; i++){
acinfo->radioinfos[i].type=
CW_IEEE80211_RADIO_TYPE_B |
CW_IEEE80211_RADIO_TYPE_A |
CW_IEEE80211_RADIO_TYPE_G |
CW_IEEE80211_RADIO_TYPE_N;
CW_80211_RADIO_TYPE_B |
CW_80211_RADIO_TYPE_A |
CW_80211_RADIO_TYPE_G |
CW_80211_RADIO_TYPE_N;
// acinfo->radioinfos[i].type=0xffffffff;
acinfo->radioinfos[i].rid=i;
}

View File

@ -590,6 +590,11 @@ int read_config(const char * filename){
CFG_SIMPLE_STR("ac_name",&conf_acname),
CFG_SIMPLE_STR("hardware_version",&conf_hardware_version),
CFG_SIMPLE_STR("software_version",&conf_software_version),
CFG_SIMPLE_STR("cisco_hardware_version",&conf_cisco_hardware_version),
CFG_SIMPLE_STR("cisco_software_version",&conf_cisco_software_version),
CFG_SIMPLE_STR("ssl_cert",&conf_sslcertfilename),
CFG_SIMPLE_STR("ssl_key",&conf_sslkeyfilename),

View File

@ -102,7 +102,8 @@ CAPWAPOBJS= \
wtpinfo_readelem_wtp_board_data.o \
wtpinfo_readelem_wtp_mac_type.o \
wtpinfo_readelem_wtp_radio_info.o \
cw_readelem_ieee80211_wtp_radio_info.o \
cw_readelem_80211_wtp_radio_info.o \
cwmsg_addelem_80211_add_wlan.o \
wtpinfo_readelem_wtp_descriptor.o \
wtpinfo_readelem_discovery_type.o \
wtpinfo_readelem_wtp_frame_tunnel_mode.o \

View File

@ -1,6 +1,7 @@
#define CWMSGELEM_IEEE80211_ADD_WLAN 1024
/* IEEE 802.11 Antenna 1025
#define CWMSGELEM_80211_ADD_WLAN 1024
#define CWMSGELEM_80211_ANTENNA 1025
/*
IEEE 802.11 Assigned WTP BSSID 1026
IEEE 802.11 Delete WLAN 1027
IEEE 802.11 Direct Sequence Control 1028
@ -25,7 +26,16 @@
IEEE 802.11 WTP Radio Fail Alarm Indication 1047
*/
#define CWMSGELEM_IEEE80211_WTP_RADIO_INFO 1048
#define CWMSGELEM_80211_WTP_RADIO_INFO 1048
/*
* Messages
*/
#define CWMSG_80211_WLAN_CONFIGURATION_REQUEST 3398913
#define CWMSG_80211_WLAN_CONFIGURATION_REPONSE 3398914
@ -36,12 +46,40 @@
#define CW_IEEE80211_RADIO_TYPE_N (8<<24)
*/
#define CW_IEEE80211_RADIO_TYPE_B (1)
#define CW_IEEE80211_RADIO_TYPE_A (2)
#define CW_IEEE80211_RADIO_TYPE_G (4)
#define CW_IEEE80211_RADIO_TYPE_N (8)
#define CW_80211_RADIO_TYPE_B (1)
#define CW_80211_RADIO_TYPE_A (2)
#define CW_80211_RADIO_TYPE_G (4)
#define CW_80211_RADIO_TYPE_N (8)
struct cwwlan {
uint8_t rid; /* Radio ID */
uint8_t wid; /* WLAN ID */
uint16_t capab;
uint8_t key_index;
uint8_t key_status;
uint16_t key_length;
uint8_t * key;
uint8_t group_tsc[6];
uint8_t qos;
uint8_t auth_type;
uint8_t mac_mode;
uint8_t tunnel_mode;
uint8_t suppress_ssid;
bstr_t ssid;
};
extern int cw_readelem_ieee80211_wtp_radio_info(void *dst,int type,uint8_t *msgelem, int len);

View File

@ -18,7 +18,7 @@
#include "capwap.h"
#include "capwap_ieee80211.h"
#include "capwap_80211.h"
const char * cw_msgelemtostr(int elem)
@ -148,7 +148,7 @@ const char * cw_msgelemtostr(int elem)
case CWMSGELEM_IEEE80211_WTP_RADIO_INFO:
case CWMSGELEM_80211_WTP_RADIO_INFO:
return "802.11: wtp radio info";

View File

@ -19,18 +19,18 @@
#include <arpa/inet.h>
#include "wtpinfo.h"
#include "capwap_ieee80211.h"
#include "capwap_80211.h"
#include "cw_log.h"
int cw_readelem_ieee80211_wtp_radio_info(void *dst,int type,uint8_t *msgelem, int len)
int cw_readelem_80211_wtp_radio_info(void *dst,int type,uint8_t *msgelem, int len)
{
if (type != CWMSGELEM_IEEE80211_WTP_RADIO_INFO)
if (type != CWMSGELEM_80211_WTP_RADIO_INFO)
return 0;
if (len!=5){
cw_dbg(DBG_CW_MSG_ERR,"Discarding msgelem IEEE80211_WTP_RADIO_INFO, wrong size, len=%d\n",len);
cw_dbg(DBG_CW_MSG_ERR,"Discarding msgelem 80211_WTP_RADIO_INFO, wrong size, len=%d\n",len);
return 0;
}

View File

@ -0,0 +1,40 @@
/**
* @file
* @brief add wlan msg element implementation
*/
#include "capwap.h"
#include "capwap_80211.h"
#include "cwmsg.h"
#include "bstr.h"
void cwmsg_addelem_80211_add_wlan(struct cwmsg *cwmsg,struct cwwlan *wlan)
{
uint16_t capab=htons(wlan->capab);
uint16_t keylen=htons(wlan->key_length);
cwmsg_vaddelem(cwmsg,CWMSGELEM_80211_ADD_WLAN,
&wlan->rid,1,
&wlan->wid,1,
&capab,2,
&wlan->key_index,1,
&wlan->key_status,1,
&keylen,2,
wlan->key,wlan->key_length,
wlan->group_tsc,6,
&wlan->qos,1,
&wlan->auth_type,1,
&wlan->mac_mode,1,
&wlan->tunnel_mode,1,
&wlan->suppress_ssid,1,
bstr_data(wlan->ssid),bstr_len(wlan->ssid),
NULL
);
}

View File

@ -17,7 +17,7 @@
*/
#include "capwap.h"
#include "capwap_ieee80211.h"
#include "capwap_80211.h"
#include "radioinfo.h"
void cwmsg_addelem_wtp_radio_info(struct cwmsg * msg,struct radioinfo *radioinfo)
@ -27,7 +27,7 @@ void cwmsg_addelem_wtp_radio_info(struct cwmsg * msg,struct radioinfo *radioinfo
*ri = radioinfo->rid;
*((uint32_t*)(ri+1))=htonl(radioinfo->type);
cwmsg_addelem(msg,CWMSGELEM_IEEE80211_WTP_RADIO_INFO,ri,5);
cwmsg_addelem(msg,CWMSGELEM_80211_WTP_RADIO_INFO,ri,5);
}

View File

@ -20,7 +20,7 @@
#include <string.h>
#include "capwap.h"
#include "capwap_ieee80211.h"
#include "capwap_80211.h"
#include "cw_log.h"
#include "cw_util.h"
@ -85,7 +85,7 @@ void cwread_discovery_request(struct wtpinfo *wtpinfo, uint8_t * msg,
CWMSGELEM_WTP_DESCRIPTOR,
CWMSGELEM_WTP_FRAME_TUNNEL_MODE,
CWMSGELEM_WTP_MAC_TYPE,
CWMSGELEM_IEEE80211_WTP_RADIO_INFO,
CWMSGELEM_80211_WTP_RADIO_INFO,
-1
};

View File

@ -18,7 +18,7 @@
#include "capwap.h"
#include "capwap_ieee80211.h"
#include "capwap_80211.h"
#include <stdio.h>
#include <stdlib.h>

View File

@ -17,7 +17,7 @@
*/
#include "capwap.h"
#include "capwap_ieee80211.h"
#include "capwap_80211.h"
#include <stdio.h>
#include <stdlib.h>

View File

@ -20,7 +20,7 @@
#include <stdlib.h>
#include "capwap.h"
#include "capwap_ieee80211.h"
#include "capwap_80211.h"
#include "cw_util.h"
@ -33,16 +33,16 @@ int radioinfo_print(char * str, struct radioinfo * radioinfo)
s += sprintf(s,"\t RID %d ",radioinfo->rid);
s += sprintf(s,"modes: ");
if(radioinfo->type & CW_IEEE80211_RADIO_TYPE_B){
if(radioinfo->type & CW_80211_RADIO_TYPE_B){
s+=sprintf(s,"B");
}
if(radioinfo->type & CW_IEEE80211_RADIO_TYPE_G){
if(radioinfo->type & CW_80211_RADIO_TYPE_G){
s+=sprintf(s,"G");
}
if(radioinfo->type & CW_IEEE80211_RADIO_TYPE_A){
if(radioinfo->type & CW_80211_RADIO_TYPE_A){
s+=sprintf(s,"A");
}
if(radioinfo->type & CW_IEEE80211_RADIO_TYPE_N){
if(radioinfo->type & CW_80211_RADIO_TYPE_N){
s+=sprintf(s,"N");
}

View File

@ -19,14 +19,14 @@
#include <arpa/inet.h>
#include "wtpinfo.h"
#include "capwap_ieee80211.h"
#include "capwap_80211.h"
#include "cw_log.h"
int wtpinfo_readelem_wtp_radio_info(struct wtpinfo * wtpinfo,int type,uint8_t *msgelem, int len)
{
if (type != CWMSGELEM_IEEE80211_WTP_RADIO_INFO)
if (type != CWMSGELEM_80211_WTP_RADIO_INFO)
return 0;
if (len!=5){