LED related elements and more added

FossilOrigin-Name: 4f6584c130ed3dd1e78f1706a19aa68bfa6720201f79a120e30d0155bd357139
This commit is contained in:
7u83@mail.ru 2016-04-11 01:29:06 +00:00
parent 6f54485db0
commit a3f03ed4bd
5 changed files with 120 additions and 11 deletions

View File

@ -22,7 +22,8 @@ OBJS=\
cisco80211_out_wtp_radio_configuration.o \
cisco_out_manager_ip_addr.o \
cisco_out_ac_ipv4_list.o \
cisco_out_capwap_up.o
cisco_out_capwap_up.o \
cisco_in_add_wlan.o

View File

@ -43,5 +43,8 @@ int cisco80211_out_wtp_radio_configuration(struct conn *conn, struct cw_action_o
int cisco_out_manager_ip_addr(struct conn *conn,struct cw_action_out * a,uint8_t *dst) ;
int cisco_out_ac_ipv4_list(struct conn *conn, struct cw_action_out *a, uint8_t * dst);
int cisco_in_add_wlan(struct conn *conn, struct cw_action_in *a, uint8_t * data, int len,
struct sockaddr *from);
#endif

View File

@ -188,6 +188,30 @@ static cw_action_in_t actions_in[] = {
,
/* LED State Config */
{
.capwap_state = CW_STATE_CONFIGURE,
.msg_id = CW_MSG_CONFIGURATION_STATUS_REQUEST,
.vendor_id = CW_VENDOR_ID_CISCO,
.elem_id = CW_CISCO_AP_LED_STATE_CONFIG,
.item_id = CISCO_ITEM_AP_LED_STATE_CONFIG,
.start = cw_in_generic2
}
,
/* LED Flash Config */
{
.capwap_state = CW_STATE_CONFIGURE,
.msg_id = CW_MSG_CONFIGURATION_STATUS_REQUEST,
.vendor_id = CW_VENDOR_ID_CISCO,
.elem_id = CW_CISCO_AP_LED_FLASH_CONFIG,
.item_id = CISCO_ITEM_AP_LED_FLASH_CONFIG,
.start = cw_in_generic2
}
,
{
@ -371,6 +395,42 @@ static cw_action_out_t actions_out[]={
}
,
/* LED State Config - OUT */
{
.msg_id = CW_MSG_CONFIGURATION_UPDATE_REQUEST,
.vendor_id = CW_VENDOR_ID_CISCO,
.elem_id = CW_CISCO_AP_LED_STATE_CONFIG,
.item_id = CISCO_ITEM_AP_LED_STATE_CONFIG,
.out = cw_out_generic,
.get = cw_out_get_outgoing,
.mand = 0
}
,
/* LED Flash Config - OUT */
{
.msg_id = CW_MSG_CONFIGURATION_UPDATE_REQUEST,
.vendor_id = CW_VENDOR_ID_CISCO,
.elem_id = CW_CISCO_AP_LED_FLASH_CONFIG,
.item_id = CISCO_ITEM_AP_LED_FLASH_CONFIG,
.out = cw_out_generic,
.get = cw_out_get_outgoing,
.mand = 0
}
,
/* AP Mode and Type - OUT */
{
.msg_id = CW_MSG_CONFIGURATION_UPDATE_REQUEST,
.vendor_id = CW_VENDOR_ID_CISCO,
.elem_id = CW_CISCO_AP_MODE_AND_TYPE,
.item_id = CISCO_ITEM_AP_MODE_AND_TYPE,
.out = cw_out_generic,
.get = cw_out_get_outgoing,
}
,

View File

@ -27,6 +27,7 @@
#include "cw/capwap80211.h"
#include "cw/capwap80211_items.h"
#include "cw/lwapp_cisco.h"
#include "cisco_items.h"
#include "include/cipwap_items.h"
@ -123,7 +124,7 @@ static cw_action_in_t actions_in[] = {
}
,
/* Radio Admin State - Config Status Request */
/* Radio Admin State - Config Update Request */
{
.capwap_state = CW_STATE_RUN,
.msg_id = CW_MSG_CONFIGURATION_UPDATE_REQUEST,
@ -134,6 +135,34 @@ static cw_action_in_t actions_in[] = {
}
,
/* AP Mode and Type */
{
.capwap_state = CW_STATE_RUN,
.msg_id = CW_MSG_CONFIGURATION_UPDATE_REQUEST,
.vendor_id = CW_VENDOR_ID_CISCO,
.elem_id = CW_CISCO_AP_MODE_AND_TYPE,
.item_id = CISCO_ITEM_AP_MODE_AND_TYPE,
.start = cw_in_generic2
}
,
/* Add WLAN */
{
.capwap_state = CW_STATE_RUN,
.msg_id = CW_MSG_CONFIGURATION_UPDATE_REQUEST,
.vendor_id = CW_VENDOR_ID_CISCO,
.elem_id = CW_CISCO_ADD_WLAN,
// .item_id = CISCO_ITEM_ADD_WLAN,
.start = cisco_in_add_wlan
}
,
/* Element Cisco 802.11 Radio Config - Config Update Resp */
{
.capwap_state = CW_STATE_RUN,
@ -293,6 +322,20 @@ static cw_action_out_t actions_out[]={
,
/* AP Mode and Type - Configuration Status Request OUT */
{
.msg_id = CW_MSG_CONFIGURATION_STATUS_REQUEST,
.vendor_id = CW_VENDOR_ID_CISCO,
.elem_id = CW_CISCO_AP_MODE_AND_TYPE,
.item_id = CISCO_ITEM_AP_MODE_AND_TYPE,
.out = cw_out_generic,
.get = cw_out_get_config,
.mand = 1
}
,
{0,0}
@ -395,6 +438,8 @@ int cisco_register_actions80211_wtp(struct cw_actiondef *def)
rc=0;
rc = cw_actionlist_in_register_actions(def->in, actions80211_in);
rc += cw_actionlist_out_register_actions(def->out, actions80211_out);
rc += cw_itemdefheap_register(def->items, cisco_itemdefs);
rc += cw_itemdefheap_register(def->radioitems, cisco_radioitemdefs);
/* rc += cw_strheap_register_strings(def->strmsg, capwap_strings_msg);
rc += cw_strheap_register_strings(def->strelem, cipwap_strings_elem);

View File

@ -1,12 +1,12 @@
#include "action.h"
#include "dbg.h"
#include "log.h"
#include "mbag.h"
#include "cw.h"
#include "capwap_items.h"
#include "cw/action.h"
#include "cw/dbg.h"
#include "cw/log.h"
#include "cw/mbag.h"
#include "cw/cw.h"
#include "cw/capwap_items.h"
#include "cisco_items.h"
int cw_cisco_get_wlan_legacy(mbag_t wlan, uint8_t *data, int len)
{
@ -108,7 +108,7 @@ int cw_cisco_get_wlan_(mbag_t wlan, uint8_t *data, int len)
int cw_in_cisco_add_wlan(struct conn *conn, struct cw_action_in *a, uint8_t * data, int len,
int cisco_in_add_wlan(struct conn *conn, struct cw_action_in *a, uint8_t * data, int len,
struct sockaddr *from)
{
@ -123,7 +123,7 @@ int cw_in_cisco_add_wlan(struct conn *conn, struct cw_action_in *a, uint8_t * da
mbag_set_byte(wlan,"radio_id",rid);
int mytype=mbag_get_byte(conn->config,CW_ITEM_AP_MODE_AND_TYPE,77) & 0xff;
int mytype=mbag_get_byte(conn->config,CISCO_ITEM_AP_MODE_AND_TYPE,77) & 0xff;
printf("My type: %d\n",mytype);
exit(0);