get function added.
FossilOrigin-Name: 43f0690533106e0c195cbace0380407747c0bbd4b261f4daf133345c0cbd73a7
This commit is contained in:
parent
1a718edfc7
commit
3769539bd8
@ -89,12 +89,26 @@ static struct mbag_item * from_str(const char *src)
|
||||
return item;
|
||||
}
|
||||
|
||||
static struct mbag_item * get(const uint8_t *src,int len)
|
||||
{
|
||||
|
||||
mbag_item_t * item = mbag_item_new(CAPWAP80211_TYPE_RATESET);
|
||||
if (!item)
|
||||
return NULL;
|
||||
|
||||
uint8_t *data = malloc(len+1);
|
||||
*data=len;
|
||||
memcpy(data+1,src,len);
|
||||
item->data=data;
|
||||
return item;
|
||||
}
|
||||
|
||||
|
||||
const struct mbag_typedef capwap80211_type_rateset = {
|
||||
.name = "802.11 Rate Set",
|
||||
.del = free,
|
||||
.from_str = from_str,
|
||||
.to_str = to_str
|
||||
.to_str = to_str,
|
||||
.get = get
|
||||
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user