From bf7abd2daf5c27f8bc3e42ac2d8a1c7d064ac31c Mon Sep 17 00:00:00 2001 From: "7u83@mail.ru" <7u83@mail.ru@noemail.net> Date: Sun, 27 May 2018 09:27:41 +0000 Subject: [PATCH] Allows adminstate FossilOrigin-Name: 6b3c43e926b1629ca30ab948afdc98bf5c0c61012aaade107211562349df2f68 --- actube.workspace | 4 +-- src/mod/cisco/cisco_actions_ac.c | 24 ++++++++++++++++-- src/mod/cisco/lwapp_cisco.h | 2 +- src/wtp/cisco.ktv | 42 +++++++++++--------------------- src/wtp/configure.c | 2 ++ 5 files changed, 41 insertions(+), 33 deletions(-) diff --git a/actube.workspace b/actube.workspace index e0162c79..c63c2d68 100644 --- a/actube.workspace +++ b/actube.workspace @@ -4,8 +4,8 @@ - - + + diff --git a/src/mod/cisco/cisco_actions_ac.c b/src/mod/cisco/cisco_actions_ac.c index 64edfea0..dd215c28 100644 --- a/src/mod/cisco/cisco_actions_ac.c +++ b/src/mod/cisco/cisco_actions_ac.c @@ -1370,6 +1370,18 @@ static struct cw_ElemHandler handlers73[] = { cw_out_radio_generic /* put */ } , + + { + "MCAST MGID Info", /* name */ + CISCO_LWELEM_MCAST_MGID_INFO, /* Element ID */ + CW_VENDOR_ID_CISCO, CW_PROTO_LWAPP, /* Vendor / Proto */ + 4, 334, /* min/max length */ + CW_TYPE_BSTR16, /* type */ + "cisco/mcast-mgid-info", /* Key */ + cw_in_generic, /* get */ + cw_out_generic /* put */ + } + , {0,0,0,0,0,0,0,0} }; @@ -1428,7 +1440,14 @@ static struct cw_ElemDef join_response_elements[] ={ }; -/*static uint16_t configuration_status_request_states[] = {CAPWAP_STATE_JOIN,0};*/ +/*static uint16_t configuration_status_request_states[] = {CAPWAP_STATE_JOIN,CAPWAP_STATE_RUN,0};*/ + +static cw_State_t configuration_status_request_states[] = { + {CAPWAP_STATE_JOIN, CAPWAP_STATE_CONFIGURE}, + {CAPWAP_STATE_RUN, CAPWAP_STATE_RUN}, + {0,0} +}; + static struct cw_ElemDef configuration_status_request_elements[] ={ {0, CW_VENDOR_ID_CISCO, CISCO_ELEM_SPAM_VENDOR_SPECIFIC,0, CW_IGNORE}, @@ -1529,6 +1548,7 @@ static struct cw_ElemDef configuration_update_request_elements[] ={ {0, CW_VENDOR_ID_CISCO, CISCO_ELEM_ADD_WLAN, 0, CW_IGNORE}, + {CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_MCAST_MGID_INFO, 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}, @@ -1639,7 +1659,7 @@ static struct cw_MsgDef messages[] = { NULL, /* name */ CAPWAP_MSG_CONFIGURATION_STATUS_REQUEST, /* type */ CW_ROLE_AC, - NULL, /* states */ + configuration_status_request_states, /* states */ configuration_status_request_elements, NULL /* postprocess */ }, diff --git a/src/mod/cisco/lwapp_cisco.h b/src/mod/cisco/lwapp_cisco.h index fb3b9643..b8f9ab41 100644 --- a/src/mod/cisco/lwapp_cisco.h +++ b/src/mod/cisco/lwapp_cisco.h @@ -35,7 +35,7 @@ #define CISCO_LWELEM_AC_IP_ADDR_WITH_INDEX 32 #define CISCO_LWELEM_AP_ETHERNET_PORT_SUBTYPE 34 #define CISCO_LWELEM_AP_LOGHOST_CONFIG 36 -#define LW_CISCO_MCAST_MGID_INFO 39 +#define CISCO_LWELEM_MCAST_MGID_INFO 39 #define CISCO_LWELEM_AP_TELNET_SSH 44 #define CISCO_LWELEM_AP_SUBMODE 67 diff --git a/src/wtp/cisco.ktv b/src/wtp/cisco.ktv index d854c6ac..420aadfc 100644 --- a/src/wtp/cisco.ktv +++ b/src/wtp/cisco.ktv @@ -10,17 +10,17 @@ ac-descriptor/software/vendor :Dword: 4232704 ac-descriptor/software/version :Bstr16: .x08007900 ac-descriptor/station-limit :Word: 1000 ac-descriptor/stations :Word: 0 -ac-name :Bstr16: X1 +ac-name :Bstr16: CisAC ac-name-with-index.0 :Bstr16: tabbe88 ac-name-with-index.1 :Bstr16: nudelnudel ac-name-with-index.2 :Bstr16: nadelnalde ac-name-with-priority/X1 :Byte: 3 ac-name-with-priority/ac2 :Byte: 5 -capwap-control-ip-address/address.0 :IPAddress: 192.168.0.14 -capwap-control-ip-address/address.1 :IPAddress: 192.168.0.14 +capwap-control-ip-address/address.0 :IPAddress: 192.168.0.180 +capwap-control-ip-address/address.1 :IPAddress: 192.168.0.180 capwap-control-ip-address/address.2 :IPAddress: 192.168.0.173 -capwap-control-ip-address/wtps.0 :Word: 2 -capwap-control-ip-address/wtps.1 :Word: 2 +capwap-control-ip-address/wtps.0 :Word: 1 +capwap-control-ip-address/wtps.1 :Word: 1 capwap-control-ip-address/wtps.2 :Word: 1 capwap-local-ip-address :IPAddress: 192.168.0.14 capwap-timers/echo-interval :Byte: 30 @@ -61,7 +61,7 @@ cisco/ap-regulatory-domain.1/slot :Byte: 1 cisco/ap-sub-mode :Byte: 0 cisco/ap-telnet-ssh/ssh :Bool: false cisco/ap-telnet-ssh/telnet :Bool: false -cisco/ap-timesync/timestamp :Dword: 1526887622 +cisco/ap-timesync/timestamp :Dword: 1527274666 cisco/ap-timesync/type :Byte: 0 cisco/ap-username-and-password/802.1x-credentials/option :Word: 2 cisco/ap-username-and-password/802.1x-credentials/password :Str: @@ -86,6 +86,7 @@ cisco/loghost-config/loghost.2 :IPAddress: 0.0.0.0 cisco/loghost-config/loghost.3 :IPAddress: 0.0.0.0 cisco/lw_path_mtu/len :Word: 1095 cisco/lw_path_mtu/max :Word: 1485 +cisco/mcast-mgid-info :Bstr16: .x002100010000000000000000000000000000000101000000 cisco/mwar-addr/address :IPAddress: 192.168.0.180 cisco/mwar-addr/mwar-type :Byte: 1 cisco/mwar-addr/unknown :Word: 0 @@ -117,10 +118,10 @@ cisco/wtp-board-data/wtp-serial-number :Str: FCZ1406W232 cisco/wtp-use-ac-version :Bool: true discovery-type :Byte: 0 idle-timeout :Dword: 300 -location-data :Bstr16: "superposition\"tobias" +location-data :Bstr16: Berlin lwapp20 :Bstr16: .x000001 maximum-message-length :Word: 4096 -radio.0/admin-state :Byte: reserved +radio.0/admin-state :Byte: enabled radio.0/cisco-multi-domain-capability/first-channel :Word: 1 radio.0/cisco-multi-domain-capability/max-tx-power-level :Word: 65535 radio.0/cisco-multi-domain-capability/number-of-channels :Word: 13 @@ -152,7 +153,7 @@ radio.0/cisco/wtp-radio-config/cfg-period :Byte: 4 radio.0/cisco/wtp-radio-config/cfg-type :Byte: 1 radio.0/cisco/wtp-radio-config/cfp-maximum-duration :Word: 60 radio.0/cisco/wtp-radio-config/country-str1 :Str: DE -radio.0/cisco/wtp-radio-config/country-str2 :Str: DE +radio.0/cisco/wtp-radio-config/country-str2 :Str: DE radio.0/cisco/wtp-radio-config/gpr-period :Byte: 10 radio.0/cisco/wtp-radio-config/max-stations :Byte: 200 radio.0/cisco/wtp-radio-config/occupancy-limit :Word: 100 @@ -160,7 +161,7 @@ radio.0/cisco/wtp-radio-config/reg :Dword: 65536 radio.0/cisco/wtp-radio-config/unknown75 :Byte: 0 radio.0/decryption-error-report-period :Word: 120 radio.0/operational-state/cause :Byte: Normal -radio.0/operational-state/state :Byte: 0 +radio.0/operational-state/state :Byte: enabled radio.0/rate_set :Bstr16: .x82848b960c1218243048606c radio.0/wlan.0/add-lw-wlan/misc :Bstr16: .x3e9904fac0000100 radio.0/wlan.0/add-lw-wlan/misc2 :Word: 4 @@ -178,7 +179,7 @@ radio.0/wlan.0/wep-key :Bstr16: .xaa0c0a02000000000000000000 radio.0/wlan.0/wlan-capability :Word: 1057 radio.0/wlan.0/wlan-id :Byte: 0 radio.0/wtp-radio-information :Dword: 1 -radio.1/admin-state :Byte: reserved +radio.1/admin-state :Byte: enabled radio.1/cisco-multi-domain-capability/first-channel :Word: 36 radio.1/cisco-multi-domain-capability/max-tx-power-level :Word: 65535 radio.1/cisco-multi-domain-capability/number-of-channels :Word: 16 @@ -204,7 +205,7 @@ radio.1/cisco/wtp-radio-config/cfg-period :Byte: 4 radio.1/cisco/wtp-radio-config/cfg-type :Byte: 1 radio.1/cisco/wtp-radio-config/cfp-maximum-duration :Word: 60 radio.1/cisco/wtp-radio-config/country-str1 :Str: DE -radio.1/cisco/wtp-radio-config/country-str2 :Str: DE +radio.1/cisco/wtp-radio-config/country-str2 :Str: DE radio.1/cisco/wtp-radio-config/gpr-period :Byte: 10 radio.1/cisco/wtp-radio-config/max-stations :Byte: 200 radio.1/cisco/wtp-radio-config/occupancy-limit :Word: 100 @@ -212,26 +213,11 @@ radio.1/cisco/wtp-radio-config/reg :Dword: 65536 radio.1/cisco/wtp-radio-config/unknown75 :Byte: 1 radio.1/decryption-error-report-period :Word: 120 radio.1/operational-state/cause :Byte: Normal -radio.1/operational-state/state :Byte: 0 +radio.1/operational-state/state :Byte: enabled radio.1/rate_set :Bstr16: .x8c129824b048606c radio.1/wlan.0/add-lw-wlan/misc :Bstr16: .x3e9904fac0000100 radio.1/wlan.0/add-lw-wlan/misc2 :Word: 4 radio.1/wlan.0/add-lw-wlan/ssid :Str: TubeSSID -radio.1/wlan.0/allow-aaa-override :Byte: 0 -radio.1/wlan.0/broadcast-ssid :Bool: true -radio.1/wlan.0/dtim-period :Byte: 1 -radio.1/wlan.0/encryption :Byte: 0 -radio.1/wlan.0/encryption-policy :Dword: 16777216 -radio.1/wlan.0/max-stations :Byte: 200 -radio.1/wlan.0/misc :Bstr16: .x3e9904fac0000100 -radio.1/wlan.0/misc2 :Word: 4 -radio.1/wlan.0/radio-id :Byte: 1 -radio.1/wlan.0/session-timout :Word: 1800 -radio.1/wlan.0/ssid :Str: TubeSSID -radio.1/wlan.0/ssid-a :Str: Schlosspark -radio.1/wlan.0/wep-key :Bstr16: .xaa0c0a02000000000000000000 -radio.1/wlan.0/wlan-capability :Word: 1 -radio.1/wlan.0/wlan-id :Byte: 0 radio.1/wtp-radio-information :Dword: 2 radio.2/cisco/rad-extended-config/beacon-interval :Word: 48128 radio.2/cisco/rad-extended-config/beacon-range :Word: 0 diff --git a/src/wtp/configure.c b/src/wtp/configure.c index ba7f0975..ae0334ef 100644 --- a/src/wtp/configure.c +++ b/src/wtp/configure.c @@ -37,5 +37,7 @@ int configure(struct conn * conn) cw_dbg_ktv_dump(conn->remote_cfg,DBG_INFO,"Config ***","CFG: ", "End config ***"); + cw_ktv_set_byte(conn->remote_cfg," +exit(0); return 1; }