cisco_in_wtp_radio_cofniguration mostly completed.

FossilOrigin-Name: d6429b618eff398c654ae935a822fc37f5cb066247abb33415324aef972ccad6
This commit is contained in:
7u83@mail.ru
2016-04-02 16:44:56 +00:00
parent 99ce56872c
commit 63608bb031
11 changed files with 74 additions and 3 deletions

View File

@ -23,11 +23,13 @@ struct cw_itemdef cipwap_itemdefs[] = {
const char CIPWAP_RADIOITEM80211_OCCUPANCY_LIMIT[]="occupancy_limit";
const char CIPWAP_RADIOITEM80211_CFP_PERIOD[]="cfp_period";
const char CIPWAP_RADIOITEM80211_CFP_MAXIMUM_DURATION[]="cfp_max_duration";
struct cw_itemdef cipwap_radioitemdefs[] = {
{CIPWAP_RADIOITEM80211_OCCUPANCY_LIMIT,CW_ITEM_NONE,MBAG_WORD},
{CIPWAP_RADIOITEM80211_CFP_PERIOD,CW_ITEM_NONE,MBAG_BYTE},
{CIPWAP_RADIOITEM80211_CFP_MAXIMUM_DURATION,CW_ITEM_NONE,MBAG_WORD},
{CW_ITEM_NONE}

View File

@ -7,6 +7,7 @@ extern const char CIPWAP_ITEM_AP_HASH_VALUE[];
extern const char CIPWAP_RADIOITEM80211_OCCUPANCY_LIMIT[];
extern const char CIPWAP_RADIOITEM80211_CFP_PERIOD[];
extern const char CIPWAP_RADIOITEM80211_CFP_MAXIMUM_DURATION[];
extern struct cw_itemdef cipwap_itemdefs[];
extern struct cw_itemdef cipwap_radioitemdefs[];

View File

@ -36,5 +36,7 @@ int cisco_out_radio_administrative_states(struct conn *conn, struct cw_action_ou
int cisco80211_in_mac_operation(struct conn *conn, struct cw_action_in *a, uint8_t * data,
int len, struct sockaddr *from);
int cisco80211_in_wtp_radio_configuration(struct conn *conn, struct cw_action_in *a, uint8_t * data,
int len, struct sockaddr *from);
#endif

View File

@ -5,6 +5,7 @@
#include "cw/dbg.h"
#include "include/cipwap_items.h"
#include "cw/capwap80211_items.h"
#include "cisco_items.h"
@ -21,7 +22,16 @@ int cisco80211_in_wtp_radio_configuration(struct conn *conn, struct cw_action_in
mbag_set_byte(r,CISCO_RADIOITEM80211_CFG_TYPE,cw_get_byte(data+1));
mbag_set_word(r,CIPWAP_RADIOITEM80211_OCCUPANCY_LIMIT,cw_get_word(data+2));
mbag_set_byte(r,CIPWAP_RADIOITEM80211_CFP_PERIOD,cw_get_byte(data+4));
mbag_set_word(r,CIPWAP_RADIOITEM80211_CFP_MAXIMUM_DURATION,cw_get_word(data+5));
struct mbag_item * bssid = MBAG_DATA->get(data+7,6);
bssid->id=CW_RADIOITEM80211_BSSID;
mbag_set(r,bssid);
mbag_set_word(r,CW_RADIOITEM80211_BEACON_PERIOD,cw_get_word(data+13));
mbag_set_bstr16n(r,CW_RADIOITEM80211_COUNTRY_STRING,data+15,3);
mbag_set_bstr16n(r,CISCO_RADIOITEM80211_COUNTRY_STR1,data+15,3);
mbag_set_bstr16n(r,CISCO_RADIOITEM80211_COUNTRY_STR2,data+18,3);
return 1;

View File

@ -141,6 +141,20 @@ static cw_action_in_t actions_in[] = {
*/
/* Element Cisco 802.11 Radio Conffig - Config Status Resp */
{
.capwap_state = CW_STATE_CONFIGURE,
.msg_id = CW_MSG_CONFIGURATION_STATUS_RESPONSE,
.vendor_id = CW_VENDOR_ID_CISCO,
.elem_id = CW_CISCO_WTP_RADIO_CFG,
.start=cisco80211_in_wtp_radio_configuration,
.item_id = "cisco_radio_cfg",
}
,
{
/* Cisco's Vendor specific encapsulation
* of LWAPP elements */

View File

@ -13,10 +13,14 @@ struct cw_itemdef cisco_itemdefs[] = {
const char CISCO_RADIOITEM80211_CFG_TYPE[]="cisco_radio_cfg_type";
const char CISCO_RADIOITEM80211_COUNTRY_STR1[]="cisco_country_str1";
const char CISCO_RADIOITEM80211_COUNTRY_STR2[]="cisco_country_str2";
struct cw_itemdef cisco_iradioitemdefs[] = {
struct cw_itemdef cisco_radioitemdefs[] = {
{CISCO_RADIOITEM80211_CFG_TYPE,CW_ITEM_NONE,MBAG_BYTE},
{CISCO_RADIOITEM80211_COUNTRY_STR1,CW_ITEM_NONE,MBAG_BSTR},
{CISCO_RADIOITEM80211_COUNTRY_STR2,CW_ITEM_NONE,MBAG_BSTR},
{CW_ITEM_NONE}
};

View File

@ -6,6 +6,8 @@ extern const char CISCO_ITEM_AP_MODE_AND_TYPE[];
extern struct cw_itemdef cisco_itemdefs[];
extern const char CISCO_RADIOITEM80211_CFG_TYPE[];
extern const char CISCO_RADIOITEM80211_COUNTRY_STR1[];
extern const char CISCO_RADIOITEM80211_COUNTRY_STR2[];
extern struct cw_itemdef cisco_radioitemdefs[];