Put and get method added.

FossilOrigin-Name: 7a2570d7c1fe99eb685c1f994631e39519eb949401c13e11637ffd67d174b7c2
This commit is contained in:
7u83@mail.ru 2016-04-03 07:49:34 +00:00
parent eaa57a65e5
commit 48a23c9e89
1 changed files with 9 additions and 2 deletions

View File

@ -107,12 +107,19 @@ static struct mbag_item * get(const uint8_t *src,int len)
return item;
}
static int put(struct mbag_item *i,uint8_t *dst)
{
int l=*((uint8_t*)(i->data));
memcpy(dst,i->data+1,l);
return l;
}
const struct mbag_typedef capwap80211_type_rateset = {
.name = "802.11 Rate Set",
.del = free,
.from_str = from_str,
.to_str = to_str,
.get = get
.get = get,
.put = put
};