Cisco AP Timesyn added
FossilOrigin-Name: 3f96b2b7c402a1b314c88a9573b26bd5296faa27a3ad50bf37fda9021b83f120
This commit is contained in:
parent
11ee224d78
commit
d420f572ee
@ -4,8 +4,8 @@
|
||||
<Project Name="wtp" Path="wtp.project" Active="No"/>
|
||||
<Project Name="mod_cipwap" Path="mod_cipwap.project" Active="No"/>
|
||||
<Project Name="mod_capwap" Path="mod_capwap.project" Active="No"/>
|
||||
<Project Name="mod_cisco" Path="mod_cisco.project" Active="Yes"/>
|
||||
<Project Name="libcw" Path="libcw.project" Active="No"/>
|
||||
<Project Name="mod_cisco" Path="mod_cisco.project" Active="No"/>
|
||||
<Project Name="libcw" Path="libcw.project" Active="Yes"/>
|
||||
<Project Name="mod_capwap80211" Path="mod_capwap80211.project" Active="No"/>
|
||||
<Project Name="mod_fortinet" Path="mod_fortinet.project" Active="No"/>
|
||||
<BuildMatrix>
|
||||
|
@ -40,6 +40,11 @@ struct cw_ElemHandlerParams {
|
||||
char * debug_details;
|
||||
};
|
||||
|
||||
union handlerType{
|
||||
const struct cw_Type type;
|
||||
int x;
|
||||
};
|
||||
|
||||
struct cw_ElemHandler {
|
||||
const char * name;
|
||||
int id;
|
||||
@ -48,6 +53,7 @@ struct cw_ElemHandler {
|
||||
int min_len;
|
||||
int max_len;
|
||||
const struct cw_Type * type;
|
||||
/* union handlerType type; */
|
||||
const char * key;
|
||||
int (*get)(struct cw_ElemHandler * handler, struct cw_ElemHandlerParams * params,
|
||||
uint8_t*data, int len);
|
||||
|
@ -7,6 +7,7 @@ OBJS=\
|
||||
cisco_actions_ac.o \
|
||||
cisco_in_wtp_descriptor.o \
|
||||
cisco_out_wtp_descriptor.o \
|
||||
cisco_in_ac_descriptor.o\
|
||||
|
||||
# cisco80211.o \
|
||||
# cisco_out_radio_administrative_state.o \
|
||||
@ -17,7 +18,6 @@ OBJS=\
|
||||
# cisco_out_ac_descriptor.o \
|
||||
# cisco_out_telnet_ssh.o \
|
||||
cisco_in_telnet_ssh.o \
|
||||
cisco_in_ac_descriptor.o\
|
||||
cisco80211_in_mac_operation.o \
|
||||
cisco80211_in_wtp_radio_configuration.o \
|
||||
cisco80211_out_wtp_radio_configuration.o \
|
||||
|
@ -90,7 +90,7 @@
|
||||
#define CW_CISCO_AP_POWER_INJECTOR_CONFIG 138
|
||||
|
||||
#define CW_CISCO_AP_MINIOS_VERSION 149
|
||||
#define CW_CISCO_AP_TIMESYNC 151
|
||||
#define CISCO_ELEM_AP_TIMESYNC 151
|
||||
#define CW_CISCO_AP_DOMAIN 169
|
||||
#define CW_CISCO_AP_DNS 170
|
||||
|
||||
|
@ -50,6 +50,17 @@ static struct cw_ElemHandler handlers[] = {
|
||||
cisco_out_wtp_descriptor /* put */
|
||||
}
|
||||
,
|
||||
{
|
||||
"AC Descriptor (Cisco)", /* name */
|
||||
CAPWAP_ELEM_AC_DESCRIPTOR, /* Element ID */
|
||||
0,0, /* Vendor / Proto */
|
||||
4,128, /* min/max length */
|
||||
NULL, /* type */
|
||||
"ac-descriptor", /* Key */
|
||||
cisco_in_ac_descriptor, /* get */
|
||||
NULL, /*cisco_out_ac_descriptor */ /* put */
|
||||
}
|
||||
,
|
||||
{
|
||||
"RAD Name -> CAPWAP WTP Name", /* name */
|
||||
CW_CISCO_RAD_NAME, /* Element ID */
|
||||
@ -60,7 +71,6 @@ static struct cw_ElemHandler handlers[] = {
|
||||
cw_in_generic, /* get */
|
||||
cw_out_generic /* put */
|
||||
}
|
||||
|
||||
,
|
||||
{
|
||||
"Board Data Options", /* name */
|
||||
@ -73,6 +83,18 @@ static struct cw_ElemHandler handlers[] = {
|
||||
cw_out_generic /* put */
|
||||
}
|
||||
,
|
||||
{
|
||||
"AP Time Sync", /* name */
|
||||
CISCO_ELEM_AP_TIMESYNC, /* Element ID */
|
||||
CW_VENDOR_ID_CISCO,0, /* Vendor / Proto */
|
||||
4,4, /* min/max length */
|
||||
CW_TYPE_DWORD, /* type */
|
||||
"cisco/ap-timesync", /* Key */
|
||||
cw_in_generic, /* handler */
|
||||
cw_out_generic /* put */
|
||||
}
|
||||
,
|
||||
|
||||
{0,0,0,0,0,0,0,0}
|
||||
|
||||
};
|
||||
@ -88,6 +110,14 @@ static struct cw_ElemDef discovery_request_elements[] ={
|
||||
|
||||
};
|
||||
|
||||
static int discovery_response_states[] = {CAPWAP_STATE_DISCOVERY,0};
|
||||
static struct cw_ElemDef discovery_response_elements[] ={
|
||||
{0,CW_VENDOR_ID_CISCO, CISCO_ELEM_AP_TIMESYNC, 1, 0},
|
||||
{0,0,0,00}
|
||||
|
||||
};
|
||||
|
||||
|
||||
static struct cw_MsgDef messages[] = {
|
||||
{
|
||||
"Discovery Request",
|
||||
@ -96,11 +126,15 @@ static struct cw_MsgDef messages[] = {
|
||||
discovery_request_states,
|
||||
discovery_request_elements
|
||||
},
|
||||
|
||||
{
|
||||
"Discovery Response",
|
||||
CAPWAP_MSG_DISCOVERY_RESPONSE,
|
||||
CW_RECEIVER_WTP,
|
||||
discovery_response_states,
|
||||
discovery_response_elements
|
||||
},
|
||||
{0,0,0,0}
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -5,16 +5,19 @@
|
||||
|
||||
#include "cw/vendors.h"
|
||||
|
||||
int cisco_in_ac_descriptor(struct conn *conn, struct cw_action_in *a, uint8_t * data,
|
||||
int len, struct sockaddr *from)
|
||||
int cisco_in_ac_descriptor(struct cw_ElemHandler *eh,
|
||||
struct cw_ElemHandlerParams *params,
|
||||
uint8_t * data, int len)
|
||||
{
|
||||
static struct cw_DescriptorSubelemDef allowed[] = {
|
||||
{CW_VENDOR_ID_CISCO,0, CW_ITEM_AC_HARDWARE_VERSION, 1024,1},
|
||||
{CW_VENDOR_ID_CISCO,1, CW_ITEM_AC_SOFTWARE_VERSION, 1024,1},
|
||||
{CW_VENDOR_ID_CISCO,0, "hardware", 1024,1},
|
||||
{CW_VENDOR_ID_CISCO,1, "software", 1024,1},
|
||||
{0,0, NULL,0, 0}
|
||||
};
|
||||
|
||||
return cw_read_ac_descriptor(params->conn->remote_cfg,eh,params,data,len,allowed);
|
||||
|
||||
return cw_read_ac_descriptor(conn->config,data,len,allowed);
|
||||
|
||||
/*return cw_read_ac_descriptor(conn->config,data,len,allowed);*/
|
||||
|
||||
}
|
||||
|
@ -8,4 +8,8 @@ int cisco_in_wtp_descriptor(struct cw_ElemHandler *eh, struct cw_ElemHandlerPara
|
||||
int cisco_out_wtp_descriptor(struct cw_ElemHandler * handler, struct cw_ElemHandlerParams * params
|
||||
, uint8_t * dst);
|
||||
|
||||
int cisco_in_ac_descriptor(struct cw_ElemHandler *eh,
|
||||
struct cw_ElemHandlerParams *params,
|
||||
uint8_t * data, int len);
|
||||
|
||||
#endif
|
||||
|
@ -185,7 +185,7 @@ static cw_action_out_t actions_out[]={
|
||||
.msg_id = CAPWAP_MSG_DISCOVERY_RESPONSE,
|
||||
.item_id = CW_ITEM_AC_TIMESTAMP,
|
||||
.vendor_id = CW_VENDOR_ID_CISCO,
|
||||
.elem_id = CW_CISCO_AP_TIMESYNC,
|
||||
.elem_id = CISCO_ELEM_AP_TIMESYNC,
|
||||
.out = cisco_out_ap_timesync,
|
||||
.mand = 1
|
||||
}
|
||||
@ -229,7 +229,7 @@ static cw_action_out_t actions_out[]={
|
||||
.msg_id = CAPWAP_MSG_ECHO_RESPONSE,
|
||||
.vendor_id = CW_VENDOR_ID_CISCO,
|
||||
.item_id = CW_ITEM_AC_TIMESTAMP,
|
||||
.elem_id = CW_CISCO_AP_TIMESYNC,
|
||||
.elem_id = CISCO_ELEM_AP_TIMESYNC,
|
||||
.out = cisco_out_ap_timesync,
|
||||
.mand = 1
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user