ac name is snet

FossilOrigin-Name: cc5cf0810cb667e257e9178f2770599066ebdb5bf18321f4ea6ee8c77678cb28
This commit is contained in:
7u83@mail.ru 2018-03-20 06:09:09 +00:00
parent ac0abb4a17
commit 9ee3decdfe
11 changed files with 43 additions and 25 deletions

View File

@ -3,9 +3,9 @@
<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_capwap" Path="mod_capwap.project" Active="No"/>
<Project Name="mod_cisco" Path="mod_cisco.project" Active="No"/>
<Project Name="libcw" Path="libcw.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>

View File

@ -35,8 +35,6 @@
#include "db.h"
#include "cw/capwap_cisco.h"
//#include "cw/capwap_80211.h"
#include "cw/capwap_crypto.h"

View File

@ -704,6 +704,9 @@ struct wtpman *wtpman_create(int socklistindex, struct sockaddr *srcaddr)
wtpman->conn->local_cfg = cw_ktv_create();
wtpman->conn->global_cfg = actube_global_cfg;
wtpman->conn->local_cfg = actube_global_cfg;
return wtpman;
}

View File

@ -1,4 +1,4 @@
#include "capwap_cisco.h"
/**
* Add a Cisco AP Timesync message element to a buffer
@ -7,6 +7,7 @@
* @param type of time
* @return number of bytes put (5)
*/
/*
int cw_put_cisco_ap_timesync(uint8_t * dst, time_t time, uint8_t type)
{
cw_put_dword(dst , time);
@ -14,18 +15,19 @@ int cw_put_cisco_ap_timesync(uint8_t * dst, time_t time, uint8_t type)
return 5;
}
*/
/*
int cw_addelem_cisco_ap_regulatory_domain(uint8_t *dst, struct radioinfo * ri){
uint8_t *d=dst+10;
d+=cw_put_byte(d,ri->rid); /* Band ID */
d+=cw_put_byte(d,1); /* Set True/False */
d+=cw_put_byte(d,ri->rid); /* Slot ID */
d+=cw_put_byte(d,ri->rid); // Band ID
d+=cw_put_byte(d,1); // Set True/False
d+=cw_put_byte(d,ri->rid); // Slot ID
d+=cw_put_word(d,ri->regDomain);
return 5 + cw_put_elem_vendor_hdr(dst, CW_VENDOR_ID_CISCO, CW_CISCO_AP_REGULATORY_DOMAIN, 5);
}
*/
/**
* Add a Cisco Certificate payload message element
@ -34,11 +36,12 @@ int cw_addelem_cisco_ap_regulatory_domain(uint8_t *dst, struct radioinfo * ri){
* @param len length of certificate
* @return number of bytes put
*/
/*
int cw_addelem_cisco_certificate(uint8_t*dst,uint8_t*src,int len){
int l = lw_put_certificate(dst+10,src,len);
return l+cw_put_elem_vendor_hdr(dst,CW_VENDOR_ID_CISCO,CW_CISCO_CERTIFICATE,l);
}
*/
/*
int cw_addelem_cisco_wtp_radio_cfg(uint8_t * dst,struct radioinfo *ri){
@ -47,10 +50,10 @@ int cw_addelem_cisco_wtp_radio_cfg(uint8_t * dst,struct radioinfo *ri){
}
*/
/*
int cw_readelem_cisco_station_cfg(uint8_t *src,int len){
// lw_readelem_
return 0;
}
*/

View File

@ -1,5 +1,5 @@
#include "capwap.h"
#include "capwap_cisco.h"
#include "radio.h"

View File

@ -415,7 +415,7 @@ static int process_elements(struct conn *conn, uint8_t * rawmsg, int len,
cw_dbg_ktv_dump(conn->remote_cfg,DBG_CFG_DMP,
" *** Remote CFG dump ***", "CFG:", " *** End of remote CFG dump");
{
/* {
{
mlistelem_t *e;
@ -429,7 +429,7 @@ static int process_elements(struct conn *conn, uint8_t * rawmsg, int len,
}
}
*/
/** int rct = cw_in_check_generic(conn, afm, rawmsg, len, from); */
@ -474,7 +474,7 @@ exit(0);
cw_send_error_response(conn, rawmsg, result_code);
} else if (result_code == 0) {
/* All ok, send regular response message */
/* All is ok, send regular response message */
cw_send_response(conn, rawmsg, len);
} else {
/* the request message is ignored, no response

View File

@ -1,5 +1,5 @@
#include "capwap.h"
#include "capwap_cisco.h"
int cw_addelem_cisco_wtp_radio_cfg(uint8_t*dst,struct radioinfo *ri)
{
@ -21,6 +21,6 @@ int cw_addelem_cisco_wtp_radio_cfg(uint8_t*dst,struct radioinfo *ri)
cw_put_dword(dst+10+22,0x3538); // ?
return 28+cw_put_elem_vendor_hdr(dst,CW_VENDOR_ID_CISCO,CW_CISCO_WTP_RADIO_CFG,28);
/* return 28+cw_put_elem_vendor_hdr(dst,CW_VENDOR_ID_CISCO,CW_CISCO_WTP_RADIO_CFG,28);*/
}

View File

@ -3,7 +3,7 @@
#include "dbg.h"
#include "capwap.h"
#include "capwap_cisco.h"
/*
int cw_in_cisco_image_identifier(struct conn *conn,struct cw_action_in * a,uint8_t *data,int len,struct sockaddr *from)

View File

@ -43,6 +43,9 @@ int cw_put_msg(struct conn *conn, uint8_t * rawout)
struct cw_MsgData * msg;
struct mlistelem * elem;
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");
/* rawout is already initialized, so we can get
* msg type from buffer */

View File

@ -120,6 +120,17 @@ static struct cw_ElemHandler handlers[] = {
}
,
{
"AC Name", /* name */
CAPWAP_ELEM_AC_NAME, /* Element ID */
0,0, /* Vendor / Proto */
0,0, /* min/max length */
CW_TYPE_BSTR16, /* type */
"ac-name", /* Key */
cw_in_generic, /* get */
cw_out_generic /* put */
}
,
{0,0,0,0,0,0,0,0}

View File

@ -21,10 +21,10 @@ static int put_ac_status(mavl_t global, mavl_t local, uint8_t *dst, const char *
char key[CW_KTV_MAX_KEY_LEN];
d += cw_put_word(d,cw_ktv_get_word(global,"ac/ac-descriptor/stations",0));
d += cw_put_word(d,cw_ktv_get_word(global,"ac/ac-descriptor/station-limit",0));
d += cw_put_word(d,cw_ktv_get_word(global,"ac/ac-descriptor/active-wtps",0));
d += cw_put_word(d,cw_ktv_get_word(global,"ac/ac-descriptor/max-wtps",0));
d += cw_put_word(d,cw_ktv_get_word(global,"ac-descriptor/stations",0));
d += cw_put_word(d,cw_ktv_get_word(global,"ac-descriptor/station-limit",0));
d += cw_put_word(d,cw_ktv_get_word(global,"ac-descriptor/active-wtps",0));
d += cw_put_word(d,cw_ktv_get_word(global,"ac-descriptor/max-wtps",0));
security = 0;
if (cw_ktv_get(local,"dtls-cert-file",CW_TYPE_BSTR16))
@ -34,7 +34,7 @@ static int put_ac_status(mavl_t global, mavl_t local, uint8_t *dst, const char *
security |= CAPWAP_FLAG_AC_SECURITY_S;
if (security == 0){
cw_log(LOG_WARNING,"Attention: no AC security selected");
cw_log(LOG_WARNING,"No AC security selected");
}
d += cw_put_byte(dst,security);