More cisco elementx
FossilOrigin-Name: 374448849e7b9a25b7132d511f5b1c7a7b862bda2957ea41547ecca1af282846
This commit is contained in:
parent
25776eaacf
commit
17ae762117
@ -3,8 +3,8 @@
|
||||
<Project Name="ac" Path="ac.project" Active="No"/>
|
||||
<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="Yes"/>
|
||||
<Project Name="mod_cisco" Path="mod_cisco.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_capwap80211" Path="mod_capwap80211.project" Active="No"/>
|
||||
<Project Name="mod_fortinet" Path="mod_fortinet.project" Active="No"/>
|
||||
|
@ -419,7 +419,7 @@ static void * wtpman_run(void *arg)
|
||||
|
||||
|
||||
|
||||
conn->capwap_state = CW_STATE_RUN;
|
||||
conn->capwap_state = CAPWAP_STATE_RUN;
|
||||
/*
|
||||
// XXX testing ...
|
||||
// DBGX("Cofig to sql", "");
|
||||
@ -432,7 +432,7 @@ static void * wtpman_run(void *arg)
|
||||
reset_echointerval_timer(wtpman);
|
||||
|
||||
rc = 0;
|
||||
while (wtpman->conn->capwap_state == CW_STATE_RUN) {
|
||||
while (wtpman->conn->capwap_state == CAPWAP_STATE_RUN) {
|
||||
rc = cw_read_messages(wtpman->conn);
|
||||
if (rc < 0) {
|
||||
if (errno != EAGAIN)
|
||||
|
@ -425,9 +425,9 @@ static int process_elements(struct conn *conn, uint8_t * rawmsg, int len,
|
||||
|
||||
mavl_destroy(mand_found);
|
||||
|
||||
cw_dbg_ktv_dump(conn->remote_cfg,DBG_CFG_DMP,
|
||||
/* cw_dbg_ktv_dump(conn->remote_cfg,DBG_CFG_DMP,
|
||||
" *** Remote CFG dump ***", "CFG:", " *** End of remote CFG dump");
|
||||
|
||||
*/
|
||||
|
||||
|
||||
if (message->postprocess){
|
||||
|
@ -46,7 +46,7 @@ int cw_put_msg(struct conn *conn, uint8_t * rawout)
|
||||
int len,l;
|
||||
|
||||
cw_dbg(DBG_INFO, "Number of elements in ktv: %d",conn->local_cfg->count);
|
||||
cw_dbg_ktv_dump(conn->local_cfg,DBG_CFG_DMP,"Local CFG","LOCAL:","End Local CFG");
|
||||
/* cw_dbg_ktv_dump(conn->local_cfg,DBG_CFG_DMP,"Local CFG","LOCAL:","End Local CFG");*/
|
||||
|
||||
/* rawout is already initialized, so we can get
|
||||
* msg type from buffer */
|
||||
|
@ -464,10 +464,10 @@ static struct cw_ElemDef configuration_status_response_elements[] ={
|
||||
|
||||
static int configuration_update_request_states[] = {CAPWAP_STATE_RUN,0};
|
||||
static struct cw_ElemDef configuration_update_request_elements[] ={
|
||||
{0,0,CAPWAP_ELEM_AC_NAME, 1, 0},
|
||||
{0,0,CAPWAP_ELEM_RADIO_ADMINISTRATIVE_STATE, 1, 0},
|
||||
{0,0,CAPWAP_ELEM_STATISTICS_TIMER, 1, 0},
|
||||
{0,0,CAPWAP_ELEM_WTP_REBOOT_STATISTICS, 1, 0},
|
||||
|
||||
{0,0,CAPWAP_ELEM_RADIO_ADMINISTRATIVE_STATE, 0, 0},
|
||||
{0,0,CAPWAP_ELEM_STATISTICS_TIMER, 0, 0},
|
||||
|
||||
|
||||
{0,0,CAPWAP_ELEM_VENDOR_SPECIFIC_PAYLOAD, 0, CW_IGNORE},
|
||||
{0,0,0,0,0}
|
||||
@ -477,18 +477,12 @@ static struct cw_ElemDef configuration_update_request_elements[] ={
|
||||
|
||||
static int echo_request_states[] = {CAPWAP_STATE_RUN,0};
|
||||
static struct cw_ElemDef echo_request_elements[] ={
|
||||
{0,0,CAPWAP_ELEM_AC_NAME, 1, 0},
|
||||
{0,0,CAPWAP_ELEM_RADIO_ADMINISTRATIVE_STATE, 1, 0},
|
||||
{0,0,CAPWAP_ELEM_STATISTICS_TIMER, 1, 0},
|
||||
{0,0,CAPWAP_ELEM_WTP_REBOOT_STATISTICS, 1, 0},
|
||||
|
||||
{0,0,CAPWAP_ELEM_VENDOR_SPECIFIC_PAYLOAD, 0, CW_IGNORE},
|
||||
{0,0,0,0,0}
|
||||
};
|
||||
|
||||
static int echo_response_states[] = {CAPWAP_STATE_RUN,0};
|
||||
static struct cw_ElemDef echo_response_elements[] ={
|
||||
|
||||
{0,0,0,0,0}
|
||||
};
|
||||
|
||||
|
@ -51,8 +51,8 @@
|
||||
|
||||
#define CW_CISCO_MWAR_NAME LW_ELEM_AC_NAME /* 31 */
|
||||
|
||||
#define CW_CISCO_LOCATION_DATA LW_ELEM_LOCATION_DATA /* 35 */
|
||||
#define CW_CISCO_STATISTICS_TIMER LW_ELEM_STATISTICS_TIMER /* 37 */
|
||||
#define CISCO_ELEM_LOCATION_DATA LW_ELEM_LOCATION_DATA /* 35 */
|
||||
#define CISCO_ELEM_STATISTICS_TIMER LW_ELEM_STATISTICS_TIMER /* 37 */
|
||||
|
||||
#define CW_CISCO_ANTENNA_PAYLOAD 41
|
||||
|
||||
@ -86,7 +86,7 @@
|
||||
|
||||
|
||||
#define CW_CISCO_LWAPP_CHANNEL_POWER 134
|
||||
#define CW_CISCO_AP_CORE_DUMP 135
|
||||
#define CISCO_ELEM_AP_CORE_DUMP 135
|
||||
#define CISCO_ELEM_AP_PRE_STD_SWITCH_CONFIG 137
|
||||
#define CISCO_ELEM_AP_POWER_INJECTOR_CONFIG 138
|
||||
|
||||
|
@ -300,6 +300,15 @@ static cw_KTVStruct_t cisco_ap_qos[]={
|
||||
{NULL,NULL,0,0}
|
||||
};
|
||||
|
||||
static cw_KTVStruct_t cisco_ap_core_dump[]={
|
||||
{CW_TYPE_IPADDRESS,"tftp-server",4,-1},
|
||||
{CW_TYPE_BOOL,"enable",1,16},
|
||||
{CW_TYPE_STR,"filename",100,17},
|
||||
{NULL,NULL,0,0}
|
||||
};
|
||||
|
||||
|
||||
|
||||
static struct cw_ElemHandler handlers[] = {
|
||||
|
||||
{
|
||||
@ -764,6 +773,27 @@ static struct cw_ElemHandler handlers[] = {
|
||||
cw_out_radio_generic /* put */
|
||||
},
|
||||
|
||||
{
|
||||
"Location Data", /* name */
|
||||
CISCO_ELEM_LOCATION_DATA, /* Element ID */
|
||||
CW_VENDOR_ID_CISCO,0, /* Vendor / Proto */
|
||||
0,1024, /* min/max length */
|
||||
CW_TYPE_BSTR16, /* type */
|
||||
"location-data", /* Key */
|
||||
cw_in_generic, /* get */
|
||||
cw_out_generic /* put */
|
||||
},
|
||||
|
||||
{
|
||||
"AP Core Dump", /* name */
|
||||
CISCO_ELEM_AP_CORE_DUMP, /* Element ID */
|
||||
CW_VENDOR_ID_CISCO,0, /* Vendor / Proto */
|
||||
0,1024, /* min/max length */
|
||||
cisco_ap_core_dump, /* type */
|
||||
"cisco/ap-core-dump", /* Key */
|
||||
cw_in_generic_struct, /* get */
|
||||
cw_out_generic_struct /* put */
|
||||
},
|
||||
|
||||
{0,0,0,0,0,0,0,0}
|
||||
|
||||
@ -825,7 +855,7 @@ static struct cw_ElemDef join_response_elements[] ={
|
||||
|
||||
static int configuration_status_request_states[] = {CAPWAP_STATE_JOIN,0};
|
||||
static struct cw_ElemDef configuration_status_request_elements[] ={
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_SPAM_VENDOR_SPECIFIC,1, CW_IGNORE},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_SPAM_VENDOR_SPECIFIC,0, CW_IGNORE},
|
||||
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_AP_UPTIME, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_AP_LED_STATE_CONFIG, 0, 0},
|
||||
@ -859,7 +889,7 @@ static struct cw_ElemDef configuration_status_response_elements[] ={
|
||||
{0,0, CAPWAP_ELEM_RADIO_ADMINISTRATIVE_STATE, 1,0},
|
||||
{0,0, CAPWAP_ELEM_RADIO_OPERATIONAL_STATE, 1,0},
|
||||
|
||||
{0,CW_VENDOR_ID_CISCO, CISCO_ELEM_SPAM_VENDOR_SPECIFIC,1, CW_IGNORE},
|
||||
{0,CW_VENDOR_ID_CISCO, CISCO_ELEM_SPAM_VENDOR_SPECIFIC,0, CW_IGNORE},
|
||||
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_MULTI_DOMAIN_CAPABILITY, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_WTP_RADIO_CONFIGURATION, 1, 0},
|
||||
@ -875,6 +905,42 @@ static struct cw_ElemDef configuration_status_response_elements[] ={
|
||||
{0,0,0,0}
|
||||
};
|
||||
|
||||
|
||||
static int configuration_update_request_states[] = {CAPWAP_STATE_RUN,0};
|
||||
static struct cw_ElemDef configuration_update_request_elements[] ={
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_SPAM_VENDOR_SPECIFIC,0, CW_IGNORE},
|
||||
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_AP_UPTIME, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_AP_LED_STATE_CONFIG, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_AP_LOG_FACILITY, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_MULTI_DOMAIN_CAPABILITY, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_WTP_BOARD_DATA, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_AP_LED_FLASH_CONFIG, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_AP_PRE_STD_SWITCH_CONFIG, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_AP_POWER_INJECTOR_CONFIG, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_AP_MODE_AND_TYPE, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_AP_STATIC_IP_ADDR, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_AP_MIN_IOS_VERSION, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_AP_BACKUP_SOFTWARE_VERSION, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_AP_REGULATORY_DOMAIN, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_AP_MODEL, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_RESET_BUTTON_STATE, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_WTP_RADIO_CONFIGURATION, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_LOCATION_DATA, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_AP_CORE_DUMP, 0, 0},
|
||||
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_AP_USERNAME_PASSWORD, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_AP_LOGHOST_CONFIG, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_AP_TELNET_SSH, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_AP_SUBMODE, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_AP_ETHERNET_PORT_SUBTYPE, 0, 0},
|
||||
|
||||
{0,0,0,00}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
static struct cw_MsgDef messages[] = {
|
||||
{
|
||||
NULL, /* name */
|
||||
@ -927,6 +993,17 @@ static struct cw_MsgDef messages[] = {
|
||||
NULL /* postprocess */
|
||||
},
|
||||
|
||||
{
|
||||
NULL, /* name */
|
||||
CAPWAP_MSG_CONFIGURATION_UPDATE_REQUEST, /* type */
|
||||
CW_ROLE_WTP,
|
||||
configuration_update_request_states,
|
||||
configuration_update_request_elements,
|
||||
NULL /* postprocess */
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
{0,0,0,0}
|
||||
|
||||
|
@ -90,6 +90,13 @@ static void update_radios(struct conn * conn, mbag_t result)
|
||||
static void do_update(struct conn * conn)
|
||||
{
|
||||
int rc;
|
||||
|
||||
cw_dbg_ktv_dump(conn->remote_cfg,DBG_INFO,"KTV DUMP ----------------","Remote:", "DUMP done -------");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (!update)
|
||||
return;
|
||||
update=0;
|
||||
@ -117,7 +124,7 @@ int run(struct conn * conn)
|
||||
|
||||
|
||||
|
||||
conn->capwap_state = CW_STATE_RUN;
|
||||
conn->capwap_state = CAPWAP_STATE_RUN;
|
||||
|
||||
/* conn->msg_end=handle_update_req;*/
|
||||
|
||||
@ -133,7 +140,8 @@ int run(struct conn * conn)
|
||||
|
||||
|
||||
|
||||
while (!cw_timer_timeout(timer) && conn->capwap_state == CW_STATE_RUN) {
|
||||
while (!cw_timer_timeout(timer) && conn->capwap_state == CAPWAP_STATE_RUN) {
|
||||
mavl_del_all(conn->remote_cfg);
|
||||
rc = cw_read_messages(conn);
|
||||
if (rc < 0 && errno == EAGAIN) {
|
||||
continue;
|
||||
@ -167,7 +175,7 @@ int run(struct conn * conn)
|
||||
|
||||
|
||||
|
||||
} while (conn->capwap_state == CW_STATE_RUN);
|
||||
} while (conn->capwap_state == CAPWAP_STATE_RUN);
|
||||
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user