Work on join
FossilOrigin-Name: ecd57f521010c518e8f65a035772d34453de04ead23d85329b1afb8f886762db
This commit is contained in:
parent
3ae4f89bea
commit
d53b45ccb9
@ -82,7 +82,6 @@
|
||||
<File Name="src/cw/cw_get_mod_ac.c"/>
|
||||
<File Name="src/cw/lw_put_image_data.c"/>
|
||||
<File Name="src/cw/mod.c"/>
|
||||
<File Name="src/cw/cwmsg.h"/>
|
||||
<File Name="src/cw/cw_in_ac_name_with_priority.c"/>
|
||||
<File Name="src/cw/cw_in_check_disc_req.c"/>
|
||||
<File Name="src/cw/fragman.h"/>
|
||||
@ -183,7 +182,6 @@
|
||||
<File Name="src/cw/connlist.c"/>
|
||||
<File Name="src/cw/lw_put_80211_wtp_wlan_radio_configuration.c"/>
|
||||
<File Name="src/cw/cw_put_image_data.c"/>
|
||||
<File Name="src/cw/cw_util.c"/>
|
||||
<File Name="src/cw/conn_create_noq.c"/>
|
||||
<File Name="src/cw/mavl_del.c"/>
|
||||
<File Name="src/cw/mavl_create.c"/>
|
||||
@ -280,6 +278,9 @@
|
||||
<File Name="src/cw/cw_ktv_get_bstr16.c"/>
|
||||
<File Name="src/cw/cw_ktv_set_word.c"/>
|
||||
<File Name="src/cw/cw_ktv_set_dword.c"/>
|
||||
<File Name="src/cw/mlist_delete.c"/>
|
||||
<File Name="src/cw/cw_out_generic_struct.c"/>
|
||||
<File Name="src/cw/cw_ktv_write_struct.c"/>
|
||||
</VirtualDirectory>
|
||||
</VirtualDirectory>
|
||||
<Description/>
|
||||
|
@ -23,6 +23,7 @@
|
||||
<File Name="src/mod/capwap/capwap_out_capwap_control_ip_address.c"/>
|
||||
<File Name="src/mod/capwap/capwap_in_capwap_control_ip_address.c"/>
|
||||
<File Name="src/mod/capwap/capwap_in_ac_descriptor.c"/>
|
||||
<File Name="src/mod/capwap/capwap_out_capwap_local_ip_address.c"/>
|
||||
</VirtualDirectory>
|
||||
</VirtualDirectory>
|
||||
</VirtualDirectory>
|
||||
|
@ -35,6 +35,8 @@
|
||||
<File Name="src/mod/cisco/mod_cisco.h"/>
|
||||
<File Name="src/mod/cisco/capwap_cisco.h"/>
|
||||
<File Name="src/mod/cisco/cisco_out_radio_generic.c"/>
|
||||
<File Name="src/mod/cisco/cisco_out_capwap_local_ip_address.c"/>
|
||||
<File Name="src/mod/cisco/cisco_out_lw_path_mtu.c"/>
|
||||
</VirtualDirectory>
|
||||
</VirtualDirectory>
|
||||
</VirtualDirectory>
|
||||
|
@ -200,7 +200,7 @@ ssl_cert="../../ssl/certs/ac-cisco.pem"
|
||||
dbg += msg_in # Incomming CAPWAP messages
|
||||
dbg += msg_out # Outgoing CAPWAP messages
|
||||
dbg += msg_err # Be verbose about capwap message errors like re-transmission
|
||||
dbg += msg_dmp
|
||||
# dbg += msg_dmp
|
||||
dbg += elem_in # CAPWAP message elements
|
||||
dbg += elem_out
|
||||
dbg += subelem #
|
||||
@ -210,10 +210,10 @@ ssl_cert="../../ssl/certs/ac-cisco.pem"
|
||||
dbg += pkt_in # CAPWAP packets received
|
||||
dbg += pkt_out # CAPWAP packets sent
|
||||
dbg += pkt # CAPWAP packets both sent and received
|
||||
dbg += pkt_dmp # Hex dump CAPWAP packets.
|
||||
# dbg += pkt_dmp # Hex dump CAPWAP packets.
|
||||
dbg += pkt_err # Show messages about malformed packets when detected
|
||||
dbg += dtls # Messages concerning DTLS
|
||||
dbg += -dtls_detail # DTLS in more detail
|
||||
# dbg += dtls_detail # DTLS in more detail
|
||||
dbg += dtls_bio # DTLS BIO operations
|
||||
# dbg += dtls_bio_dmp # HeXy dump data in BIO operations
|
||||
dbg += warn # misc warnings
|
||||
|
@ -2,28 +2,38 @@
|
||||
|
||||
capwap/ac-descriptor/hardware/version:Bstr16: "ACTube 1.0"
|
||||
capwap/ac-descriptor/hardware/vendor:Bstr16: 12346
|
||||
ac-descriptor/stations:Word:05
|
||||
ac-descriptor/station-limit:Word:6
|
||||
ac-descriptor/active-wtps:Word:7
|
||||
ac-descriptor/max-wtps:Word:8
|
||||
ac-descriptor/security:Byte:2
|
||||
|
||||
ac-descriptor/software/version:Bstr16:.x090103
|
||||
ac-descriptor/software/vendor:Dword:.1234
|
||||
ac-descriptor/hardware/vendor:Dword:1234567
|
||||
ac-descriptor/hardware/version:Bstr16:"1.7.3"
|
||||
|
||||
ac-descriptor/avtive-wtps :Word: 0
|
||||
ac-descriptor/dtls-policy :Byte: 0
|
||||
ac-descriptor/hardware/vendor :Dword: 4232704
|
||||
ac-descriptor/hardware/version :Bstr16: .x01000001
|
||||
ac-descriptor/max-wtps :Word: 200
|
||||
ac-descriptor/r-mac-field :Byte: 1
|
||||
ac-descriptor/reserved1 :Byte: 0
|
||||
ac-descriptor/security :Byte: 2
|
||||
ac-descriptor/software/vendor :Dword: 4232704
|
||||
ac-descriptor/software/version :Bstr16: .x07056600
|
||||
ac-descriptor/station-limit :Word: 1000
|
||||
ac-descriptor/stations :Word: 0
|
||||
|
||||
|
||||
|
||||
|
||||
ac-name:Bstr16:"TubesAC"
|
||||
|
||||
#capwap-control-ip-address/address.0:IPAddress:1192.168.0.14
|
||||
capwap-control-ip-address/address.0:IPAddress:172.16.66.229
|
||||
capwap-control-ip-address/address.0:IPAddress:192.168.0.14
|
||||
#capwap-control-ip-address/address.0:IPAddress:192.168.0.131
|
||||
#capwap-control-ip-address/address.1:IPAddress:2a00:c1a0:48c6:4a00:9965:1b6e:aca3:1398
|
||||
capwap-control-ip-address/wtps.0:Word:0
|
||||
#capwap-control-ip-address/wtps.1:Word:11
|
||||
|
||||
|
||||
#capwap/ssl-keyfile:Str:"../../ssl/certs/ac-cisco.key"
|
||||
#capwap/ssl-certfile:Str:"../../ssl/certs/ac-cisco.pem"
|
||||
cisco/ssl-keyfile:Str:"../../ssl/certs/ac-cisco.key"
|
||||
cisco/ssl-certfile:Str:"../../ssl/certs/ac-cisco.pem"
|
||||
cisco/ssl-cipher:Str:+DHE-RSA:+AES-256-CBC:+AES-128-CBC:+SHA1:+PSK
|
||||
cisco/ssl-dhbits:Word:2048
|
||||
|
||||
capwap/ssl-cipher:Str:+DHE-RSA:+RSA:+AES-256-CBC:+AES-128-CBC:+SHA1:+PSK
|
||||
capwap/ssl-psk-enable:Bool:true
|
||||
|
@ -15,7 +15,8 @@ OBJS=\
|
||||
capwap_in_vendor_specific_payload.o \
|
||||
capwap_in_mtu_discovery_padding.o \
|
||||
capwap_out_capwap_control_ip_address.o \
|
||||
capwap_in_capwap_control_ip_address.o
|
||||
capwap_in_capwap_control_ip_address.o \
|
||||
capwap_out_capwap_local_ip_address.o\
|
||||
|
||||
|
||||
LIBDIR := ../../../lib
|
||||
|
@ -215,7 +215,41 @@ static struct cw_ElemHandler handlers[] = {
|
||||
}
|
||||
,
|
||||
|
||||
{
|
||||
"Maximum Message Length", /* name */
|
||||
CAPWAP_ELEM_MAXIMUM_MESSAGE_LENGTH, /* Element ID */
|
||||
0,0, /* Vendor / Proto */
|
||||
2,2, /* min/max length */
|
||||
CW_TYPE_WORD, /* type */
|
||||
"maximum-message-length", /* Key */
|
||||
cw_in_generic, /* get */
|
||||
cw_out_generic /* put */
|
||||
}
|
||||
,
|
||||
|
||||
{
|
||||
"CAPWAP Local IPv4 Address", /* name */
|
||||
CAPWAP_ELEM_CAPWAP_LOCAL_IPV4_ADDRESS, /* Element ID */
|
||||
0,0, /* Vendor / Proto */
|
||||
4,4, /* min/max length */
|
||||
CW_TYPE_IPADDRESS, /* type */
|
||||
"capwap-local-ip-address", /* Key */
|
||||
cw_in_generic, /* get */
|
||||
capwap_out_capwap_local_ip_address /* put */
|
||||
}
|
||||
,
|
||||
{
|
||||
"CAPWAP Local IPv6 Address", /* name */
|
||||
CAPWAP_ELEM_CAPWAP_LOCAL_IPV6_ADDRESS, /* Element ID */
|
||||
0,0, /* Vendor / Proto */
|
||||
16,16, /* min/max length */
|
||||
CW_TYPE_IPADDRESS, /* type */
|
||||
"capwap-local-ip-address", /* Key */
|
||||
cw_in_generic, /* get */
|
||||
capwap_out_capwap_local_ip_address /* put */
|
||||
}
|
||||
|
||||
,
|
||||
{0,0,0,0,0,0,0,0}
|
||||
|
||||
};
|
||||
@ -254,6 +288,12 @@ static struct cw_ElemDef join_request_elements[] ={
|
||||
{0,0,CAPWAP_ELEM_SESSION_ID, 1, 0},
|
||||
{0,0,CAPWAP_ELEM_WTP_FRAME_TUNNEL_MODE, 1, 0},
|
||||
{0,0,CAPWAP_ELEM_WTP_MAC_TYPE, 1, 0},
|
||||
{0,0,CAPWAP_ELEM_ECN_SUPPORT, 1, 0},
|
||||
{0,0,CAPWAP_ELEM_CAPWAP_LOCAL_IPV4_ADDRESS, 1, 0},
|
||||
{0,0,CAPWAP_ELEM_CAPWAP_LOCAL_IPV6_ADDRESS, 1, 0},
|
||||
|
||||
{0,0,CAPWAP_ELEM_MAXIMUM_MESSAGE_LENGTH, 0, 0},
|
||||
{0,0,CAPWAP_ELEM_VENDOR_SPECIFIC_PAYLOAD, 0, CW_IGNORE},
|
||||
|
||||
/* {0,0,CAPWAP_ELEM_DISCOVERY_TYPE, 1, 0},
|
||||
|
||||
|
@ -190,7 +190,7 @@ static cw_action_in_t actions_in[] = {
|
||||
{
|
||||
.capwap_state = CAPWAP_STATE_JOIN,
|
||||
.msg_id = CAPWAP_MSG_JOIN_RESPONSE,
|
||||
.elem_id = CW_ELEM_MAXIMUM_MESSAGE_LENGTH,
|
||||
.elem_id = CAPWAP_ELEM_MAXIMUM_MESSAGE_LENGTH,
|
||||
.start = cw_in_generic2,
|
||||
.item_id = CW_ITEM_MAXIMUM_MESSAGE_LENGTH,
|
||||
.min_len = 2,
|
||||
|
@ -101,7 +101,7 @@ static void readsubelems_wtp_board_data(mavl_t cfg, uint8_t * msgelem,
|
||||
}
|
||||
if (key != NULL){
|
||||
char add_key[256];
|
||||
sprintf(add_key,"wtp_board_data/%s",key);
|
||||
sprintf(add_key,"wtp-board-data/%s",key);
|
||||
cw_ktv_add(cfg,add_key,CW_TYPE_BSTR16,msgelem+i,sublen);
|
||||
|
||||
}
|
||||
|
@ -15,7 +15,6 @@
|
||||
static int put_ac_status(mavl_t global, mavl_t local, uint8_t *dst, const char * parent_key){
|
||||
|
||||
uint8_t *d = dst;
|
||||
uint8_t security;
|
||||
|
||||
char key[CW_KTV_MAX_KEY_LEN];
|
||||
|
||||
|
@ -0,0 +1,16 @@
|
||||
#include "mod_capwap.h"
|
||||
#include "cw/cw.h"
|
||||
|
||||
int capwap_out_capwap_local_ip_address(struct cw_ElemHandler * eh,
|
||||
struct cw_ElemHandlerParams * params, uint8_t * dst)
|
||||
{
|
||||
cw_KTV_t * ip;
|
||||
ip = cw_ktv_get(params->conn->local_cfg,eh->key,CW_TYPE_IPADDRESS);
|
||||
if (ip==NULL){
|
||||
return 0;
|
||||
}
|
||||
return cw_put_local_ip_address(dst,eh->id,
|
||||
CAPWAP_ELEM_CAPWAP_LOCAL_IPV4_ADDRESS,
|
||||
CAPWAP_ELEM_CAPWAP_LOCAL_IPV6_ADDRESS,
|
||||
ip->type->data(ip),ip->type->len(ip));
|
||||
}
|
@ -31,6 +31,9 @@ int capwap_in_ac_descriptor(struct cw_ElemHandler *eh,
|
||||
struct cw_ElemHandlerParams *params,
|
||||
uint8_t * data, int len);
|
||||
|
||||
int capwap_out_capwap_local_ip_address(struct cw_ElemHandler * eh,
|
||||
struct cw_ElemHandlerParams * params, uint8_t * dst);
|
||||
|
||||
|
||||
/*
|
||||
extern int capwap_in_wtp_board_data(struct conn *conn, struct cw_ElemHandler *a,
|
||||
|
@ -29,13 +29,21 @@ static struct cw_ElemHandler handlers[] = {
|
||||
};
|
||||
|
||||
static int discovery_request_states[] = { CAPWAP_STATE_DISCOVERY, 0 };
|
||||
|
||||
static struct cw_ElemDef discovery_request_elements[] = {
|
||||
{0, 0, CAPWAP80211_ELEM_WTP_RADIO_INFORMATION, 1, 0},
|
||||
{0, 0, 0, 0, 0}
|
||||
|
||||
};
|
||||
|
||||
|
||||
static int join_request_states[] = { CAPWAP_STATE_JOIN, 0 };
|
||||
static struct cw_ElemDef join_request_elements[] = {
|
||||
{0, 0, CAPWAP80211_ELEM_WTP_RADIO_INFORMATION, 1, 0},
|
||||
{0, 0, 0, 0, 0}
|
||||
|
||||
};
|
||||
|
||||
|
||||
static struct cw_MsgDef messages[] = {
|
||||
{
|
||||
"Discovery Request",
|
||||
@ -45,6 +53,14 @@ static struct cw_MsgDef messages[] = {
|
||||
discovery_request_elements
|
||||
}
|
||||
,
|
||||
{
|
||||
"Join Request",
|
||||
CAPWAP_MSG_JOIN_REQUEST,
|
||||
CW_ROLE_AC,
|
||||
join_request_states,
|
||||
join_request_elements
|
||||
}
|
||||
,
|
||||
{0, 0, 0, 0, 0}
|
||||
};
|
||||
|
||||
|
@ -195,7 +195,7 @@ static cw_action_out_t actions_out[]={
|
||||
{
|
||||
.msg_id = CW_MSG_JOIN_REQUEST,
|
||||
.vendor_id = CW_VENDOR_ID_CISCO,
|
||||
.elem_id = CW_CISCO_AP_GROUP_NAME,
|
||||
.elem_id = CISCO_ELEM_AP_GROUP_NAME,
|
||||
.item_id = CW_ITEM_WTP_GROUP_NAME,
|
||||
.out = cw_out_generic,
|
||||
.get = cw_out_get_config,
|
||||
|
@ -2,25 +2,23 @@
|
||||
|
||||
|
||||
|
||||
#capwap/ssl-certfile:Str:"../../ssl/certs/wtp.crt"
|
||||
#capwap/ssl-keyfile:Str:"../../ssl/certs/wtp.key"
|
||||
capwap/ssl-certfile:Str:"../../ssl/certs/wtp.crt"
|
||||
capwap/ssl-keyfile:Str:"../../ssl/certs/wtp.key"
|
||||
#capwap/ssl-cipher:Str: +RSA:+AES-128-CBC:+SHA1
|
||||
|
||||
#capwap/ssl-cipher:Str:ALL
|
||||
|
||||
capwap/ssl-cipher:Str: +DHE-RSA:+RSA:+AES-256-CBC:+AES-128-CBC:+SHA1:+PSK
|
||||
capwap/ssl-psk:Bstr16:"HalloWelt"
|
||||
capwap/ssl-psk-enable:Bool:true
|
||||
|
||||
|
||||
cisco/ssl-certfile:Str:"../../ssl/certs/wtp-cisco.crt"
|
||||
cisco/ssl-keyfile:Str:"../../ssl/certs/wtp-cisco.key"
|
||||
#capwap/ssl-cipher:Str: +RSA:+AES-128-CBC:+SHA1
|
||||
#capwap/ssl-cipher:Str: +DHE-RSA:+RSA:+AES-256-CBC:+AES-128-CBC:+SHA1:+PSK
|
||||
#capwap/ssl-psk:Bstr16:"HalloWelt"
|
||||
#capwap/ssl-psk-enable:Bool:true
|
||||
cisco/ssl-certfile:Str:"../../ssl/certs/wtpc.crt"
|
||||
cisco/ssl-keyfile:Str:"../../ssl/certs/wtpc.key"
|
||||
cisco/ssl-cipher:Str:ALL
|
||||
|
||||
|
||||
|
||||
#cisco/ssl-certfile:Str:"../../ssl/certs/wtp.crt"
|
||||
#cisco/ssl-keyfile:Str:"../../ssl/certs/wtp.key"
|
||||
|
||||
discovery-type:Byte:0
|
||||
wtp-frame-tunnel-mode:Byte:1
|
||||
@ -34,14 +32,30 @@ wtp-board-data/board-id:Bstr16:Boardi177
|
||||
wtp-board-data/board-revision:Bstr16:Rev 0.1
|
||||
wtp-board-data/mac-address:Bstr16:0cff00aa34
|
||||
|
||||
wtp-descriptor/hardware/vendor:Dword:906090
|
||||
wtp-descriptor/hardware/version:Bstr16:.x171312
|
||||
wtp-descriptor/software/vendor:Dword:906090
|
||||
wtp-descriptor/software/version:Bstr16:.x171312
|
||||
wtp-descriptor/bootloader/vendor:Dword:906090
|
||||
wtp-descriptor/bootloader/version:Bstr16:.x171312
|
||||
wtp-descriptor/hardware/vendor:Dword:4232704
|
||||
wtp-descriptor/hardware/version:Bstr16: .x01000000
|
||||
wtp-descriptor/software/vendor:Dword:4232704
|
||||
wtp-descriptor/software/version:Bstr16: .x07036500
|
||||
wtp-descriptor/bootloader/vendor:Dword:4232704
|
||||
wtp-descriptor/bootloader/version:Bstr16: .x0C030800
|
||||
wtp-descriptor/max-radios:Byte:2
|
||||
|
||||
|
||||
|
||||
|
||||
cisco/board-data-options :Dword: 16777217
|
||||
discovery-type :Byte: 0
|
||||
wtp-descriptor/bootloader/vendor :Dword: 4232704
|
||||
wtp-descriptor/bootloader/version :Bstr16: .x0c041200
|
||||
wtp-descriptor/hardware/vendor :Dword: 4232704
|
||||
wtp-descriptor/hardware/version :Bstr16: .x01000000
|
||||
wtp-descriptor/max-radios :Byte: 2
|
||||
wtp-descriptor/radios-in-use :Byte: 2
|
||||
wtp-descriptor/software/vendor :Dword: 4232704
|
||||
wtp-descriptor/software/version :Bstr16: .x07036500
|
||||
wtp-frame-tunnel-mode :Byte: 4
|
||||
wtp-mac-type :Byte: 1
|
||||
|
||||
radio/0/wtp-radio-information:Dword:3
|
||||
radio/1/wtp-radio-information:Dword:1
|
||||
#NGAB
|
||||
|
@ -23,6 +23,13 @@ struct bootcfg{
|
||||
};
|
||||
|
||||
|
||||
bstr_t get_base_rmac()
|
||||
{
|
||||
|
||||
static uint8_t rm[8]={0x00,0x3a,0x99,0x04,0xfa,0xc0};
|
||||
return bstr_create(rm, 6);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static int parse_args (int argc, char *argv[], struct bootcfg * bootcfg)
|
||||
@ -168,6 +175,8 @@ int main (int argc, char **argv)
|
||||
|
||||
dtls_init();
|
||||
|
||||
conn->base_rmac = get_base_rmac();
|
||||
|
||||
|
||||
cw_discovery_init_results(&dis);
|
||||
cw_run_discovery(conn, "255.255.255.255",NULL, &dis);
|
||||
|
@ -50,7 +50,7 @@
|
||||
</Compiler>
|
||||
<Linker Options="" Required="yes"/>
|
||||
<ResourceCompiler Options="" Required="no"/>
|
||||
<General OutputFile="" IntermediateDirectory="./Debug" Command="$(WorkspacePath)/src/wtp/wtp" CommandArguments="-dall " UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="$(WorkspacePath)/src/wtp/" PauseExecWhenProcTerminates="yes" IsGUIProgram="no" IsEnabled="yes"/>
|
||||
<General OutputFile="" IntermediateDirectory="./Debug" Command="$(WorkspacePath)/src/wtp/wtp" CommandArguments="-dall -mcisco -ccisco.ktv" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="$(WorkspacePath)/src/wtp/" PauseExecWhenProcTerminates="yes" IsGUIProgram="no" IsEnabled="yes"/>
|
||||
<Environment EnvVarSetName="<Use Defaults>" DbgSetName="<Use Defaults>">
|
||||
<![CDATA[LD_LIBRARY_PATH=../../lib]]>
|
||||
</Environment>
|
||||
|
Loading…
Reference in New Issue
Block a user