2014-07-11 22:12:11 +02:00
|
|
|
#ifndef __ACINFO_H
|
|
|
|
#define __ACINFO_H
|
|
|
|
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <sys/socket.h>
|
|
|
|
|
|
|
|
#include "avltree.h"
|
|
|
|
|
2014-07-28 06:52:52 +02:00
|
|
|
#include "radioinfo.h"
|
|
|
|
|
2014-07-11 22:12:11 +02:00
|
|
|
struct acip{
|
|
|
|
struct sockaddr_storage ip;
|
|
|
|
int wtp_count;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct acip ACIP;
|
|
|
|
typedef struct avltree ACIPLIST;
|
|
|
|
|
|
|
|
ACIPLIST * aciplist_create();
|
|
|
|
#define aciplist_destroy(l) avltree_destroy(l)
|
|
|
|
#define aciplist_add(l,elem) avltree_add(l,elem)
|
|
|
|
#define aciplist_foreach(l,callback,cbpriv) avltree_foreach(l,callback,cbpriv,1)
|
|
|
|
|
|
|
|
|
2014-08-24 15:03:27 +02:00
|
|
|
/**
|
|
|
|
* Structure to hold info about an AC
|
|
|
|
*/
|
2014-07-11 22:12:11 +02:00
|
|
|
struct ac_info{
|
|
|
|
int stations;
|
|
|
|
int limit;
|
|
|
|
int active_wtps;
|
|
|
|
int max_wtps;
|
|
|
|
uint8_t * ac_name;
|
|
|
|
int ac_name_len;
|
|
|
|
int security;
|
|
|
|
int rmac;
|
|
|
|
int dtls_policy;
|
|
|
|
int vendor_id;
|
|
|
|
uint8_t * hardware_version;
|
2014-08-23 22:19:35 +02:00
|
|
|
int hardware_version_len;
|
2014-07-11 22:12:11 +02:00
|
|
|
uint8_t * software_version;
|
2014-08-23 22:19:35 +02:00
|
|
|
int software_version_len;
|
|
|
|
|
2014-07-11 22:12:11 +02:00
|
|
|
// const char * acname;
|
|
|
|
|
|
|
|
struct sockaddr * salist;
|
|
|
|
int salist_len;
|
|
|
|
|
|
|
|
ACIPLIST * aciplist;
|
|
|
|
uint8_t ecn_support;
|
|
|
|
|
|
|
|
struct sockaddr_storage local_ip;
|
|
|
|
|
2014-07-28 06:52:52 +02:00
|
|
|
/* wireless bindings */
|
2015-03-14 21:41:50 +01:00
|
|
|
|
|
|
|
|
2014-07-28 06:52:52 +02:00
|
|
|
struct radioinfo radioinfos[32];
|
|
|
|
|
2015-03-14 21:41:50 +01:00
|
|
|
uint32_t result_code;
|
|
|
|
|
2014-07-11 22:12:11 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct ac_info ACINFO;
|
|
|
|
|
|
|
|
extern int acinfo_readelem_ac_name(struct ac_info * acinfo,int type, uint8_t *msgelem, int len);
|
|
|
|
extern int acinfo_readelem_ac_descriptor(struct ac_info * acinfo,int type, uint8_t *msgelem, int len);
|
|
|
|
extern int acinfo_readelem_ctrl_ip_addr(struct ac_info * acinfo, int type, uint8_t*msgelem,int len);
|
|
|
|
extern int acinfo_print(char *str,const struct ac_info *acinfo);
|
|
|
|
|
|
|
|
#define acinfo_readelem_ecn_support(acinfo,type,msg,len) cw_readelem_ecn_support(&acinfo->ecn_support,type,msg,len)
|
|
|
|
#define acinfo_readelem_cw_local_ip_addr(acinfo,type,msg,len) cw_readelem_cw_local_ip_addr(&acinfo->local_ip,type,msg,len)
|
2014-08-15 01:30:20 +02:00
|
|
|
#define acinfo_readelem_ac_name(acinfo,type,msg,len) cw_readelem_ac_name(&acinfo->ac_name,type,msg,len)
|
2014-07-11 22:12:11 +02:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|