2018-03-17 17:29:09 +01:00
|
|
|
|
2018-03-25 08:34:32 +02:00
|
|
|
#include "cw.h"
|
2016-03-15 00:33:17 +01:00
|
|
|
#include "dbg.h"
|
2022-07-31 17:15:32 +02:00
|
|
|
#include "val.h"
|
2016-03-15 00:33:17 +01:00
|
|
|
|
2018-03-24 07:56:05 +01:00
|
|
|
static struct cw_DescriptorSubelemDef allowed_default[] = {
|
2018-03-25 08:34:32 +02:00
|
|
|
{0,CAPWAP_SUBELEM_AC_HARDWARE_VERSION, "hardware", 1024,1},
|
|
|
|
{0,CAPWAP_SUBELEM_AC_SOFTWARE_VERSION, "software", 1024,1},
|
2018-03-24 07:56:05 +01:00
|
|
|
{0,0, NULL,0, 0}
|
|
|
|
};
|
|
|
|
|
2022-07-31 17:15:32 +02:00
|
|
|
cw_ValStruct_t acstatus [] = {
|
2018-03-25 08:34:32 +02:00
|
|
|
/* type key len, pos */
|
|
|
|
{CW_TYPE_WORD, "stations", 2, -1},
|
|
|
|
{CW_TYPE_WORD, "station-limit", 2, -1},
|
2018-04-09 09:27:38 +02:00
|
|
|
{CW_TYPE_WORD, "active-wtps", 2, -1},
|
2018-03-25 08:34:32 +02:00
|
|
|
{CW_TYPE_WORD, "max-wtps", 2, -1},
|
|
|
|
{CW_TYPE_BYTE, "security", 1, -1},
|
|
|
|
{CW_TYPE_BYTE, "r-mac-field", 1, -1},
|
|
|
|
{CW_TYPE_BYTE, "reserved1", 1, -1},
|
|
|
|
{CW_TYPE_BYTE, "dtls-policy", 1, -1},
|
|
|
|
{NULL,NULL,0,0}
|
|
|
|
};
|
2018-03-24 07:56:05 +01:00
|
|
|
|
|
|
|
|
2016-03-15 00:33:17 +01:00
|
|
|
|
|
|
|
|
2022-08-22 01:59:23 +02:00
|
|
|
int cw_read_ac_descriptor(cw_Cfg_t * store,
|
2018-03-25 08:34:32 +02:00
|
|
|
struct cw_ElemHandler *eh,
|
|
|
|
struct cw_ElemHandlerParams * params,
|
|
|
|
uint8_t *data, int len,
|
|
|
|
struct cw_DescriptorSubelemDef *allowed)
|
|
|
|
{
|
2022-08-13 09:47:12 +02:00
|
|
|
|
|
|
|
CW_TYPE_STRUCT->read(params->cfg,eh->key,data,len,acstatus);
|
2016-03-15 00:33:17 +01:00
|
|
|
|
|
|
|
if (!allowed)
|
|
|
|
allowed=allowed_default;
|
|
|
|
|
2018-03-25 08:34:32 +02:00
|
|
|
return cw_read_descriptor_subelems(store, eh->key, data + 12, len - 12, allowed);
|
2016-03-15 00:33:17 +01:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2018-03-24 07:56:05 +01:00
|
|
|
|