cisco_wtp_admini_state added.
FossilOrigin-Name: 2aa60df00b3a48d1911ec2114ef89b7c5cd2167a02e748e73f09560137723406
This commit is contained in:
parent
009bc16908
commit
6620a5e8d6
@ -173,7 +173,6 @@ CAPWAPOBJS= \
|
|||||||
cw_in_capwap_local_ipv6_address.o \
|
cw_in_capwap_local_ipv6_address.o \
|
||||||
cw_in_radio_administrative_state.o \
|
cw_in_radio_administrative_state.o \
|
||||||
cw_in_radio_administrative_state_wtp.o \
|
cw_in_radio_administrative_state_wtp.o \
|
||||||
cw_in_radio_operational_state.o\
|
|
||||||
cw_radio_set_admin_state.o \
|
cw_radio_set_admin_state.o \
|
||||||
cw_put_elem_radio_administrative_state.o\
|
cw_put_elem_radio_administrative_state.o\
|
||||||
cw_put_elem_radio_operational_state.o \
|
cw_put_elem_radio_operational_state.o \
|
||||||
@ -184,6 +183,7 @@ CAPWAPOBJS= \
|
|||||||
format.o \
|
format.o \
|
||||||
# action_sources.o \
|
# action_sources.o \
|
||||||
# cw_in_cisco_add_wlan.o
|
# cw_in_cisco_add_wlan.o
|
||||||
|
# cw_in_radio_operational_state.o\
|
||||||
|
|
||||||
DOT11OBJS = \
|
DOT11OBJS = \
|
||||||
dot11.o \
|
dot11.o \
|
||||||
|
@ -554,7 +554,7 @@ extern int cw_put_radio_operational_states(mbag_t radios, uint8_t * dst, int *ne
|
|||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
extern int cw_radio_set_admin_state(mbag_t radios,int rid, int state, int cause);
|
extern int cw_radio_set_admin_state(mbag_t radios,int rid, int state, int cause);
|
||||||
extern int cw_put_elem_radio_administrative_state(uint8_t *dst,int radio_id,mbag_t radio);
|
//extern int cw_put_elem_radio_administrative_state(uint8_t *dst,int radio_id,mbag_t radio);
|
||||||
//extern int cw_put_elem_radio_operational_state(uint8_t * dst, int rid, int os, int d7mode);
|
//extern int cw_put_elem_radio_operational_state(uint8_t * dst, int rid, int os, int d7mode);
|
||||||
|
|
||||||
|
|
||||||
@ -565,6 +565,13 @@ static inline int cw_put_elem_radio_operational_state(uint8_t * dst, int rid, in
|
|||||||
return 3+cw_put_elem_hdr(dst,CW_ELEM_RADIO_OPERATIONAL_STATE,3);
|
return 3+cw_put_elem_hdr(dst,CW_ELEM_RADIO_OPERATIONAL_STATE,3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline int cw_put_elem_radio_administrative_state(uint8_t * dst, int rid, int state) {
|
||||||
|
cw_put_byte(dst+4,rid);
|
||||||
|
cw_put_byte(dst+5,state);
|
||||||
|
return 2+cw_put_elem_hdr(dst,CW_ELEM_RADIO_ADMINISTRATIVE_STATE,2);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
uint8_t *cw_init_data_keep_alive_msg(uint8_t * buffer,uint8_t *rmac);
|
uint8_t *cw_init_data_keep_alive_msg(uint8_t * buffer,uint8_t *rmac);
|
||||||
|
|
||||||
static inline int cw_put_elem_session_id(uint8_t *dst, uint8_t *session_id, int len){
|
static inline int cw_put_elem_session_id(uint8_t *dst, uint8_t *session_id, int len){
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
|
|
||||||
#include "action.h"
|
|
||||||
#include "dbg.h"
|
|
||||||
#include "log.h"
|
|
||||||
#include "mbag.h"
|
|
||||||
#include "capwap.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int cw_in_radio_operational_state(struct conn *conn, struct cw_action_in *a, uint8_t * data,
|
|
||||||
int len, struct sockaddr *from)
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
#include "cw.h"
|
#include "cw.h"
|
||||||
#include "capwap_items.h"
|
#include "capwap_items.h"
|
||||||
|
|
||||||
int cw_put_elem_radio_administrative_state(uint8_t *dst,int radio_id,mbag_t radio)
|
int xcw_put_elem_radio_administrative_state(uint8_t *dst,int radio_id,mbag_t radio)
|
||||||
{
|
{
|
||||||
cw_put_byte(dst+4,radio_id);
|
cw_put_byte(dst+4,radio_id);
|
||||||
cw_put_byte(dst+5,mbag_get_byte(radio,CW_RADIOITEM_ADMIN_STATE,CW_RADIO_ADMIN_STATE_DISABLED));
|
cw_put_byte(dst+5,mbag_get_byte(radio,CW_RADIOITEM_ADMIN_STATE,CW_RADIO_ADMIN_STATE_DISABLED));
|
||||||
|
@ -337,13 +337,12 @@ static cw_action_in_t actions_in[] = {
|
|||||||
}
|
}
|
||||||
,
|
,
|
||||||
|
|
||||||
/* Radio Admin State - Config Status Request */
|
/* Radio Admin State (IN) - Config Status Request */
|
||||||
{
|
{
|
||||||
.capwap_state = CW_STATE_CONFIGURE,
|
.capwap_state = CW_STATE_CONFIGURE,
|
||||||
.msg_id = CW_MSG_CONFIGURATION_STATUS_REQUEST,
|
.msg_id = CW_MSG_CONFIGURATION_STATUS_REQUEST,
|
||||||
.elem_id = CW_ELEM_RADIO_ADMINISTRATIVE_STATE,
|
.elem_id = CW_ELEM_RADIO_ADMINISTRATIVE_STATE,
|
||||||
.item_id = CW_RADIOITEM_ADMIN_STATE,
|
.item_id = CW_RADIOITEM_ADMIN_STATE,
|
||||||
// .start = cw_in_radio_administrative_state,
|
|
||||||
.start = cw_in_radio_generic,
|
.start = cw_in_radio_generic,
|
||||||
.mand = 1
|
.mand = 1
|
||||||
|
|
||||||
@ -755,8 +754,6 @@ static cw_action_out_t actions_out[]={
|
|||||||
.msg_id = CW_MSG_CONFIGURATION_UPDATE_REQUEST,
|
.msg_id = CW_MSG_CONFIGURATION_UPDATE_REQUEST,
|
||||||
.elem_id = CW_ELEM_RADIO_ADMINISTRATIVE_STATE,
|
.elem_id = CW_ELEM_RADIO_ADMINISTRATIVE_STATE,
|
||||||
.item_id = CW_RADIOITEM_ADMIN_STATE,
|
.item_id = CW_RADIOITEM_ADMIN_STATE,
|
||||||
// .out = cw_out_radio_administrative_states,
|
|
||||||
// .get = cw_out_get_outgoing,
|
|
||||||
.out = cw_out_radio_generic,
|
.out = cw_out_radio_generic,
|
||||||
.mand = 0
|
.mand = 0
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,8 @@ OBJS=\
|
|||||||
cisco_out_manager_ip_addr.o \
|
cisco_out_manager_ip_addr.o \
|
||||||
cisco_out_ac_ipv4_list.o \
|
cisco_out_ac_ipv4_list.o \
|
||||||
cisco_out_capwap_up.o \
|
cisco_out_capwap_up.o \
|
||||||
cisco_in_add_wlan.o
|
cisco_in_add_wlan.o \
|
||||||
|
cisco_out_wtp_administrative_state.o
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ extern int cisco_out_board_data_options(struct conn *conn, struct cw_action_out
|
|||||||
extern int cisco_in_ac_descriptor(struct conn *conn, struct cw_action_in *a,
|
extern int cisco_in_ac_descriptor(struct conn *conn, struct cw_action_in *a,
|
||||||
uint8_t * data, int len, struct sockaddr *from);
|
uint8_t * data, int len, struct sockaddr *from);
|
||||||
|
|
||||||
extern int cisco_in_radio_administrative_state_wtp(struct conn *conn,
|
extern int cisco_in_radio_administrative_state(struct conn *conn,
|
||||||
struct cw_action_in *a, uint8_t * data,
|
struct cw_action_in *a, uint8_t * data,
|
||||||
int len, struct sockaddr *from);
|
int len, struct sockaddr *from);
|
||||||
int cisco_in_spam_vendor_specific(struct conn *conn, struct cw_action_in *a, uint8_t * data, int len,
|
int cisco_in_spam_vendor_specific(struct conn *conn, struct cw_action_in *a, uint8_t * data, int len,
|
||||||
@ -46,5 +46,6 @@ int cisco_out_ac_ipv4_list(struct conn *conn, struct cw_action_out *a, uint8_t *
|
|||||||
int cisco_in_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);
|
struct sockaddr *from);
|
||||||
|
|
||||||
|
int cisco_out_wtp_administrative_state(struct conn *conn, struct cw_action_out *a, uint8_t * dst);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -493,6 +493,20 @@ static cw_action_in_t actions80211_in[] = {
|
|||||||
|
|
||||||
,
|
,
|
||||||
|
|
||||||
|
|
||||||
|
/* Radio Admin State (IN) - Config Status Request */
|
||||||
|
{
|
||||||
|
.capwap_state = CW_STATE_CONFIGURE,
|
||||||
|
.msg_id = CW_MSG_CONFIGURATION_STATUS_REQUEST,
|
||||||
|
.elem_id = CW_ELEM_RADIO_ADMINISTRATIVE_STATE,
|
||||||
|
.item_id = CW_RADIOITEM_ADMIN_STATE,
|
||||||
|
.start = cisco_in_radio_administrative_state,
|
||||||
|
.mand = 1
|
||||||
|
}
|
||||||
|
,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{0,0}
|
{0,0}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,24 +2,20 @@
|
|||||||
#include "cw/action.h"
|
#include "cw/action.h"
|
||||||
#include "cw/cw.h"
|
#include "cw/cw.h"
|
||||||
|
|
||||||
|
#include "cisco_items.h"
|
||||||
|
|
||||||
|
int cisco_in_radio_administrative_state(struct conn *conn, struct cw_action_in *a, uint8_t * data, int len,
|
||||||
int cisco_in_radio_administrative_state_wtp(struct conn *conn, struct cw_action_in *a, uint8_t * data, int len,
|
|
||||||
struct sockaddr *from)
|
struct sockaddr *from)
|
||||||
{
|
{
|
||||||
|
|
||||||
int rid = cw_get_byte(data);
|
int rid = cw_get_byte(data);
|
||||||
int state = cw_get_byte(data+1);
|
|
||||||
|
|
||||||
printf("Set admin state for %d = %d\n",rid,state);
|
|
||||||
|
|
||||||
|
|
||||||
if (rid != 255)
|
if (rid != 255)
|
||||||
return cw_radio_set_admin_state(conn->radios,rid,state,3);
|
return cw_in_radio_generic(conn,a,data,len,from);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return cw_radio_set_all_admin_states(conn->radios,state,3);
|
int state = cw_get_byte(data+1);
|
||||||
|
mbag_set_byte(conn->incomming,CISCO_ITEM_WTP_ADMIN_STATE,state);
|
||||||
|
return 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
22
src/mod/cisco/cisco_in_radio_operational_state.c
Normal file
22
src/mod/cisco/cisco_in_radio_operational_state.c
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
|
||||||
|
#include "action.h"
|
||||||
|
#include "dbg.h"
|
||||||
|
#include "log.h"
|
||||||
|
#include "mbag.h"
|
||||||
|
#include "capwap.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int cisco_in_radio_operational_state(struct conn *conn, struct cw_action_in *a, uint8_t * data,
|
||||||
|
int len, struct sockaddr *from)
|
||||||
|
{
|
||||||
|
int rid = cw_get_byte(data);
|
||||||
|
int state = cw_get_byte(data+1);
|
||||||
|
int cause = cw_ get_byte(data+3);
|
||||||
|
|
||||||
|
if (state
|
||||||
|
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
@ -4,12 +4,17 @@
|
|||||||
const char CISCO_ITEM_AP_MODE_AND_TYPE[]="cisco_ap_mode_and_type";
|
const char CISCO_ITEM_AP_MODE_AND_TYPE[]="cisco_ap_mode_and_type";
|
||||||
const char CISCO_ITEM_AP_LED_STATE_CONFIG[]="cisco_ap_led_state";
|
const char CISCO_ITEM_AP_LED_STATE_CONFIG[]="cisco_ap_led_state";
|
||||||
const char CISCO_ITEM_AP_LED_FLASH_CONFIG[]="cisco_ap_led_flash";
|
const char CISCO_ITEM_AP_LED_FLASH_CONFIG[]="cisco_ap_led_flash";
|
||||||
|
const char CISCO_ITEM_WTP_OPER_STATE[]="cisco_wtp_oper_state";
|
||||||
|
const char CISCO_ITEM_WTP_ADMIN_STATE[]="cisco_wtp_admin_state";
|
||||||
|
|
||||||
|
|
||||||
struct cw_itemdef cisco_itemdefs[] = {
|
struct cw_itemdef cisco_itemdefs[] = {
|
||||||
|
|
||||||
{CISCO_ITEM_AP_MODE_AND_TYPE,CW_ITEM_NONE,MBAG_WORD},
|
{CISCO_ITEM_AP_MODE_AND_TYPE,CW_ITEM_NONE,MBAG_WORD},
|
||||||
{CISCO_ITEM_AP_LED_STATE_CONFIG,CW_ITEM_NONE,MBAG_WORD},
|
{CISCO_ITEM_AP_LED_STATE_CONFIG,CW_ITEM_NONE,MBAG_WORD},
|
||||||
{CISCO_ITEM_AP_LED_FLASH_CONFIG,CW_ITEM_NONE,MBAG_BIN},
|
{CISCO_ITEM_AP_LED_FLASH_CONFIG,CW_ITEM_NONE,MBAG_BIN},
|
||||||
|
{CISCO_ITEM_WTP_OPER_STATE,CW_ITEM_NONE,MBAG_WORD},
|
||||||
|
{CISCO_ITEM_WTP_ADMIN_STATE,CW_ITEM_NONE,MBAG_BYTE},
|
||||||
|
|
||||||
{CW_ITEM_NONE}
|
{CW_ITEM_NONE}
|
||||||
};
|
};
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
extern const char CISCO_ITEM_AP_MODE_AND_TYPE[];
|
extern const char CISCO_ITEM_AP_MODE_AND_TYPE[];
|
||||||
extern const char CISCO_ITEM_AP_LED_STATE_CONFIG[];
|
extern const char CISCO_ITEM_AP_LED_STATE_CONFIG[];
|
||||||
extern const char CISCO_ITEM_AP_LED_FLASH_CONFIG[];
|
extern const char CISCO_ITEM_AP_LED_FLASH_CONFIG[];
|
||||||
|
extern const char CISCO_ITEM_WTP_OPER_STATE[];
|
||||||
|
extern const char CISCO_ITEM_WTP_ADMIN_STATE[];
|
||||||
|
|
||||||
extern struct cw_itemdef cisco_itemdefs[];
|
extern struct cw_itemdef cisco_itemdefs[];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user