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

@ -19,6 +19,8 @@ const char CW_RADIOITEM80211_RX_MSDU_LIFETIME[]="rx_msdu_lifetime";
/* Radio Config Items */
const char CW_RADIOITEM80211_SHORT_PREAMBLE[]="short_preamble";
const char CW_RADIOITEM80211_NUM_BSS_IDS[]="num_bss_ids";
const char CW_RADIOITEM80211_DTIM_PERIOD[]="dtim_period";
const char CW_RADIOITEM80211_BSSID[]="bssid";
const char CW_RADIOITEM80211_BEACON_PERIOD[]="beacon_period";
const char CW_RADIOITEM80211_COUNTRY_STRING[]="country_string";
@ -51,6 +53,8 @@ struct cw_itemdef capwap80211_radioitemdefs[] = {
/* Radio Config Items */
{CW_RADIOITEM80211_SHORT_PREAMBLE,CW_ITEM_NONE,MBAG_BYTE},
{CW_RADIOITEM80211_NUM_BSS_IDS,CW_ITEM_NONE,MBAG_BYTE},
{CW_RADIOITEM80211_DTIM_PERIOD,CW_ITEM_NONE,MBAG_BYTE},
{CW_RADIOITEM80211_BSSID,CW_ITEM_NONE,MBAG_BYTE},
{CW_RADIOITEM80211_BEACON_PERIOD,CW_ITEM_NONE,MBAG_WORD},
{CW_RADIOITEM80211_COUNTRY_STRING,CW_ITEM_NONE,MBAG_BSTR16},

View File

@ -19,6 +19,14 @@ extern const char CW_RADIOITEM80211_LONG_RETRY[];
extern const char CW_RADIOITEM80211_TX_MSDU_LIFETIME[];
extern const char CW_RADIOITEM80211_RX_MSDU_LIFETIME[];
/* Radio Config Items */
extern const char CW_RADIOITEM80211_SHORT_PREAMBLE[];
extern const char CW_RADIOITEM80211_NUM_BSS_IDS[];
extern const char CW_RADIOITEM80211_DTIM_PERIOD[];
extern const char CW_RADIOITEM80211_BSSID[];
extern const char CW_RADIOITEM80211_BEACON_PERIOD[];
extern const char CW_RADIOITEM80211_COUNTRY_STRING[];
#endif

View File

@ -36,8 +36,32 @@ static struct mbag_item * from_str(const char *src)
}
static struct mbag_item * get(const uint8_t *src,int len)
{
mbag_item_t * item = mbag_item_new(MBAG_DATA);
if (!item)
return NULL;
uint8_t *data = malloc(len+1);
if (!data){
free (item);
return NULL;
}
*data=len;
memcpy(data+1,src,len);
item->data=data;
return item;
}
const struct mbag_typedef mbag_type_data = {
"Data",free,to_str,from_str
.name = "Binary Data",
.del = free,
.from_str = from_str,
.to_str = to_str,
.get = get
};