diff --git a/src/cw/capwap80211_items.c b/src/cw/capwap80211_items.c new file mode 100644 index 00000000..13640fb1 --- /dev/null +++ b/src/cw/capwap80211_items.c @@ -0,0 +1,16 @@ +#include "item.h" +#include "capwap80211_items.h" +#include "capwap80211_types.h" + + + +const char CW_ITEM_80211_SUPPORTED_RATES[]="supported_rates"; + + +struct cw_itemdef capwap80211_itemdefs[] = { + + {CW_ITEM_80211_SUPPORTED_RATES,CW_ITEM_NONE,CAPWAP80211_TYPE_RATESET}, + +}; + + diff --git a/src/cw/capwap80211_items.h b/src/cw/capwap80211_items.h new file mode 100644 index 00000000..97d1e32a --- /dev/null +++ b/src/cw/capwap80211_items.h @@ -0,0 +1,8 @@ +#ifndef __CAPWAP80211_H +#define __CAPWAP80211_H + +extern const char CW_ITEM_80211_SUPPORTED_RATES[]; + + +#endif + diff --git a/src/cw/capwap80211_type_rateset.c b/src/cw/capwap80211_type_rateset.c new file mode 100644 index 00000000..6e2ae910 --- /dev/null +++ b/src/cw/capwap80211_type_rateset.c @@ -0,0 +1,100 @@ +#include + +#include "capwap80211_types.h" +#include "dot11.h" + + + + + +static int to_str(void *item,char *dst) +{ + mbag_item_t *it= item; + + uint8_t *data = (uint8_t*)it->data; + int n=*data; + data++; + + char *d=dst; + char *space=""; + int i; + for (i=0; idata=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 +}; diff --git a/src/cw/capwap80211_types.h b/src/cw/capwap80211_types.h new file mode 100644 index 00000000..fd29ad2e --- /dev/null +++ b/src/cw/capwap80211_types.h @@ -0,0 +1,10 @@ +#ifndef __CAPWAP80211_TYPES_H +#define __CAPWAP80211_TYPES_H + +#include "mbag.h" + +extern const struct mbag_typedef capwap80211_type_rateset; + +#define CAPWAP80211_TYPE_RATESET (&capwap80211_type_rateset) + +#endif