moved local_cfg, remote_cfg ... to cw_ElemData struct

This commit is contained in:
2022-07-28 01:36:16 +02:00
parent 6ac1c87b2f
commit b894c00a7e
86 changed files with 360 additions and 243 deletions

View File

@ -22,7 +22,7 @@ capwap-control-ip-address/address.2 :IPAddress: 192.168.0.162
capwap-control-ip-address/wtps.0 :Word: 0
capwap-control-ip-address/wtps.1 :Word: 10
capwap-control-ip-address/wtps.2 :Word: 0
capwap-local-ip-address :IPAddress: 192.168.0.29
capwap-local-ip-address :IPAddress: 192.168.0.14
capwap-timers/echo-interval :Byte: 30
capwap-timers/max-discovery-interval :Byte: 10
capwap-timers/min-discovery-interval :Byte: 0
@ -53,18 +53,16 @@ cisco/ap-regulatory-domain.0/code0 :Byte: 0
cisco/ap-regulatory-domain.0/code1 :Byte: 1
cisco/ap-regulatory-domain.0/set :Bool: true
cisco/ap-regulatory-domain.0/slot :Byte: 0
cisco/ap-regulatory-domain.1/band-id :Byte: 0
cisco/ap-regulatory-domain.1/code0 :Byte: 0
cisco/ap-regulatory-domain.1/code1 :Byte: 1
cisco/ap-regulatory-domain.1/set :Bool: true
cisco/ap-regulatory-domain.1/slot :Byte: 0
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: 1585926286
cisco/ap-timesync/type :Byte: 1
cisco/ap-timesync/timestamp :Dword: 1469608260
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:
cisco/ap-username-and-password/802.1x-credentials/username :Str:
@ -79,6 +77,7 @@ cisco/ap-venue-settings/type :Byte: 1
cisco/board-data-options :Dword: 16777217
cisco/cisco-discovery-protocol/data :Word: 0
cisco/cisco-discovery-protocol/enabled :Bool: false
cisco/elem132 :Bstr16: .x0100000000
cisco/hash/hash :Bstr16: c4084177cd95ddbba1237bfcb3de6780fdf48214
cisco/hash/validate :Bool: true
cisco/loghost-config/last-joined-ap :Str:
@ -86,21 +85,21 @@ cisco/loghost-config/loghost.0 :IPAddress: 7.7.1.3
cisco/loghost-config/loghost.1 :IPAddress: 0.0.0.0
cisco/loghost-config/loghost.2 :IPAddress: 0.0.0.0
cisco/loghost-config/loghost.3 :IPAddress: 0.0.0.0
cisco/mcast-mgid-info :Bstr16: .x002100010000000000000000000000000000000101000000
cisco/mcast-mgid-info :Bstr16: .x000000010000000000000000000000000000000101000000
cisco/mwar-addr/address :IPAddress: 192.168.0.162
cisco/mwar-addr/mwar-type :Byte: 0
cisco/mwar-addr/unknown :Word: 0
cisco/mwar-hash-value :Bstr16: c4084177cd95ddbba1237bfcb3de6780fdf48214
cisco/mwar-type :Byte: 0
cisco/mwar-type :Byte: 1
cisco/rouge-and-mss/enable :Bool: false
cisco/rouge-and-mss/mss :Word: 666
cisco/rouge-and-mss/roge-detection :Bool: true
cisco/rouge-and-mss/tcp-adjust-mss :Word: 0
cisco/rouge-detection/rest :Bstr16: .x000aff800000
cisco/rouge-detection/rouge-detection :Bool: false
cisco/sig-toogle :Bool: true
cisco/sig-toogle :Bool: false
cisco/spam-domain-secret :Bstr16: .xe1ffd18a8f15b3b59c0a47a7f17a96e7cb36174f00
cisco/ssl-certfile :Str: ../../ssl/certs/wtpc.crt
#cisco/ssl-cipher :Str: ALL
cisco/ssl-cipher :Str: RSA:AES-128-CBC:SHA1
cisco/ssl-keyfile :Str: ../../ssl/certs/wtpc.key
cisco/vlan/id :Word: 0
@ -128,10 +127,29 @@ radio.0/cisco-multi-domain-capability/max-tx-power-level :Word: 65535
radio.0/cisco-multi-domain-capability/number-of-channels :Word: 13
radio.0/cisco-multi-domain-capability/reserved :Byte: 1
radio.0/cisco/air-space-capability :Byte: 0
radio.0/cisco/antenna-payload/802-11n-rx-antennas :Byte: 7
radio.0/cisco/antenna-payload/802-11n-tx-antennas :Byte: 0
radio.0/cisco/antenna-payload/antenna-1 :Byte: 1
radio.0/cisco/antenna-payload/antenna-2 :Byte: 1
radio.0/cisco/antenna-payload/antenna-mode :Byte: 3
radio.0/cisco/antenna-payload/diversity-selection :Byte: 255
radio.0/cisco/antenna-payload/number-of-antennas :Byte: 2
radio.0/cisco/antenna-payload/unknown :Byte: 3
radio.0/cisco/channel-power :Bstr16: .x08080d0108221c16100a04fefe0208221c16100a04fefe0308221c16100a04fefe0408221c16100a04fefe0508221c16100a04fefe0608221c16100a04fefe0708221c16100a04fefe0808221c16100a04fefe0908221c16100a04fefe0a08221c16100a04fefe0b08221c16100a04fefe0c08221c16100a04fefe0d08221c16100a04fefe
radio.0/cisco/direct-sequence-control/cfg-type :Byte: 1
radio.0/cisco/direct-sequence-control/current-cca-mode :Byte: 0
radio.0/cisco/direct-sequence-control/current-channel :Byte: 1
radio.0/cisco/direct-sequence-control/energy-detect-threshold :Dword: -50
radio.0/cisco/direct-sequence-control/unknown :Byte: 1
radio.0/cisco/elem19 :Bstr16: .xc0a800a10001000bc0a800a103000101003ccd774fc43bd27db633509934957d3acb000000000000000052464d000000000000000000000000000000000000000000000000000000000001060b010101
radio.0/cisco/elem22 :Bstr16: .x0d00b400320102030405060708090a0b0c0d
radio.0/cisco/elem24 :Bstr16: .x003c000c
radio.0/cisco/elem81 :Bstr16: .x00000000010101010a001e0a02051cbfffbfff0a00
radio.0/cisco/lwelem9 :Bstr16: .x0100000000000000000000000000000000
radio.0/cisco/mac-operation/byte75 :Byte: 0
radio.0/cisco/mac-operation/fragmentation-threshold :Word: 2346
radio.0/cisco/mac-operation/long-retry :Byte: 4
radio.0/cisco/mac-operation/reserved :Word: 1
radio.0/cisco/mac-operation/reserved :Byte: 0
radio.0/cisco/mac-operation/rts-threshold :Word: 2347
radio.0/cisco/mac-operation/rx-msdu-lifetime :Dword: 512
radio.0/cisco/mac-operation/short-retry :Byte: 7
@ -146,27 +164,42 @@ radio.0/cisco/rad-extended-config/c-ccat :Word: 0
radio.0/cisco/rad-extended-config/multicast-buffer :Word: 0
radio.0/cisco/rad-extended-config/multicast-data-range :Word: 0
radio.0/cisco/rad-extended-config/rx-sensop-threshold :Word: 0
radio.0/cisco/tx-power/current-tx-power :Word: 10
radio.0/cisco/tx-power-levels :Bstr16: .x070011000e000b000800050002ffff0000
radio.0/cisco/tx-power/current-tx-power :Word: 1
radio.0/cisco/tx-power/reserved :Byte: 1
radio.0/cisco/wtp-radio-config/beacon-period :Word: 0
radio.0/cisco/wtp-radio-config/beacon-period :Word: 100
radio.0/cisco/wtp-radio-config/bss-id :Bstr16: .x0800276edf58
radio.0/cisco/wtp-radio-config/cfg-period :Byte: 0
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: 0
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: 0
radio.0/cisco/wtp-radio-config/reg :Dword: 256
radio.0/cisco/wtp-radio-config/occupancy-limit :Word: 100
radio.0/cisco/wtp-radio-config/reg :Dword: 167772416
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
radio.0/wlan.0/add-lw-wlan/ssid :Str: TubeSSID
radio.0/wlan.0/add-wlan/broadcast-ssid :Bool: true
radio.0/wlan.0/add-wlan/dtim-period :Byte: 1
radio.0/wlan.0/add-wlan/encryption-policy :Dword: 4
radio.0/wlan.0/add-wlan/profile-name :Str: tubeC
radio.0/wlan.0/add-wlan/qos :Byte: 0
radio.0/wlan.0/add-wlan/radio-id :Byte: 0
radio.0/wlan.0/add-wlan/scan-defer-time :Word: 100
radio.0/wlan.0/add-wlan/session-timout :Word: 1800
radio.0/wlan.0/add-wlan/ssid :Str:
radio.0/wlan.0/add-wlan/wep-encryption :Bool: false
radio.0/wlan.0/add-wlan/wep-key :Bstr16: .x5b2a9f4c8b4d28d8f5dbbc0660
radio.0/wlan.0/add-wlan/wep-key-index :Byte: 1
radio.0/wlan.0/add-wlan/wlan-capability :Word: 1073
radio.0/wlan.0/add-wlan/wlan-id :Byte: 1
radio.0/wlan.0/allow-aaa-override :Byte: 0
radio.0/wlan.0/broadcast-ssid :Bool: true
radio.0/wlan.0/dtim-period :Byte: 1
@ -186,10 +219,26 @@ radio.1/cisco-multi-domain-capability/max-tx-power-level :Word: 65535
radio.1/cisco-multi-domain-capability/number-of-channels :Word: 16
radio.1/cisco-multi-domain-capability/reserved :Byte: 1
radio.1/cisco/air-space-capability :Byte: 0
radio.1/cisco/antenna-payload/802-11n-rx-antennas :Byte: 7
radio.1/cisco/antenna-payload/802-11n-tx-antennas :Byte: 0
radio.1/cisco/antenna-payload/antenna-1 :Byte: 1
radio.1/cisco/antenna-payload/antenna-2 :Byte: 1
radio.1/cisco/antenna-payload/antenna-mode :Byte: 3
radio.1/cisco/antenna-payload/diversity-selection :Byte: 255
radio.1/cisco/antenna-payload/number-of-antennas :Byte: 2
radio.1/cisco/antenna-payload/unknown :Byte: 3
radio.1/cisco/channel-power :Bstr16: .x0808102408221c16100a04fefe2808221c16100a04fefe2c08221c16100a04fefe3008221c16100a04fefe3408221c16100a04fefe3808221c16100a04fefe3c08221c16100a04fefe4008221c16100a04fefe6408221c16100a04fefe6808221c16100a04fefe6c08221c16100a04fefe7008221c16100a04fefe7408221c16100a04fefe8408221c16100a04fefe8808221c16100a04fefe8c08221c16100a04fefe
radio.1/cisco/elem15 :Bstr16: .x027007ffffffce010001
radio.1/cisco/elem19 :Bstr16: .xc0a800a10001000ac0a800a110000101003ccd774fc43bd27db633509934957d3acb000000000000000052464d000000000000000000000000000000000000000000000000000000000024282c3034383c4064686c707484888c01010101010101010101010101010101
radio.1/cisco/elem22 :Bstr16: .x1000b4003224282c3034383c4064686c707484888c
radio.1/cisco/elem24 :Bstr16: .x003c000c
radio.1/cisco/elem47 :Bstr16: .x01ccb0000c000f42401999ba1040000003
radio.1/cisco/elem81 :Bstr16: .x00000000010101010a001e0a02050fbfffbfff0a00
radio.1/cisco/lwelem9 :Bstr16: .x0100000000000000000000000000000000
radio.1/cisco/mac-operation/byte75 :Byte: 0
radio.1/cisco/mac-operation/fragmentation-threshold :Word: 2346
radio.1/cisco/mac-operation/long-retry :Byte: 4
radio.1/cisco/mac-operation/reserved :Word: 257
radio.1/cisco/mac-operation/reserved :Byte: 1
radio.1/cisco/mac-operation/rts-threshold :Word: 2347
radio.1/cisco/mac-operation/rx-msdu-lifetime :Dword: 512
radio.1/cisco/mac-operation/short-retry :Byte: 7
@ -198,56 +247,46 @@ radio.1/cisco/multi-domain-capability/first-channel :Word: 36
radio.1/cisco/multi-domain-capability/max-tx-power-level :Word: 20
radio.1/cisco/multi-domain-capability/number-of-channels :Word: 4
radio.1/cisco/multi-domain-capability/reserved :Byte: 1
radio.1/cisco/tx-power/current-tx-power :Word: 10
radio.1/cisco/tx-power-levels :Bstr16: .x070011000e000b000800050002ffff0000
radio.1/cisco/tx-power/current-tx-power :Word: 1
radio.1/cisco/tx-power/reserved :Byte: 1
radio.1/cisco/wtp-radio-config/beacon-period :Word: 100
radio.1/cisco/wtp-radio-config/bss-id :Bstr16: .x04fe7f499b90
radio.1/cisco/wtp-radio-config/cfg-period :Byte: 0
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: 0
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: 0
radio.1/cisco/wtp-radio-config/reg :Dword: 256
radio.1/cisco/wtp-radio-config/occupancy-limit :Word: 100
radio.1/cisco/wtp-radio-config/reg :Dword: 167772416
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/add-wlan/broadcast-ssid :Bool: true
radio.1/wlan.0/add-wlan/dtim-period :Byte: 1
radio.1/wlan.0/add-wlan/encryption-policy :Dword: 4
radio.1/wlan.0/add-wlan/profile-name :Str: tubeC
radio.1/wlan.0/add-wlan/qos :Byte: 0
radio.1/wlan.0/add-wlan/radio-id :Byte: 1
radio.1/wlan.0/add-wlan/scan-defer-time :Word: 100
radio.1/wlan.0/add-wlan/session-timout :Word: 1800
radio.1/wlan.0/add-wlan/ssid :Str:
radio.1/wlan.0/add-wlan/wep-encryption :Bool: false
radio.1/wlan.0/add-wlan/wep-key :Bstr16: .xf0571b63dc70fdf913e2bd0806
radio.1/wlan.0/add-wlan/wep-key-index :Byte: 1
radio.1/wlan.0/add-wlan/wlan-capability :Word: 17
radio.1/wlan.0/add-wlan/wlan-id :Byte: 1
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
#radio.2/cisco/rad-extended-config/c-ccat :Word: 1
#radio.2/cisco/rad-extended-config/multicast-buffer :Word: 0
#radio.2/cisco/rad-extended-config/multicast-data-range :Word: 0
#radio.2/cisco/rad-extended-config/rx-sensop-threshold :Word: 0
#radio.3/cisco/rad-extended-config/beacon-interval :Word: 59392
#radio.3/cisco/rad-extended-config/beacon-range :Word: 0
#radio.3/cisco/rad-extended-config/c-ccat :Word: 1
#radio.3/cisco/rad-extended-config/multicast-buffer :Word: 0
#radio.3/cisco/rad-extended-config/multicast-data-range :Word: 0
#radio.3/cisco/rad-extended-config/rx-sensop-threshold :Word: 0
radio.255/admin-state :Byte: reserved
radio.255/operational-state/cause :Byte: Normal
radio.255/operational-state/state :Byte: 0
radio/0/cisco/regulatory-domain/code0 :Byte: 0
radio/0/cisco/regulatory-domain/code1 :Byte: 1
radio/0/cisco/regulatory-domain/set :Bool: true
radio/0/cisco/regulatory-domain/slot :Byte: 0
radio/0/wtp-radio-information :Dword: 1
radio/1/cisco/regulatory-domain/code0 :Byte: 0
radio/1/cisco/regulatory-domain/code1 :Byte: 1
radio/1/cisco/regulatory-domain/set :Bool: true
radio/1/cisco/regulatory-domain/slot :Byte: 0
radio/1/wtp-radio-information :Dword: 1
radio.255/operational-state/state :Byte: enabled
radio/wlan/encryption-policy :Dword: 16777216
radio/wlan/radio-od :Byte: 1
radio/wlan/wlan-capability :Word: 17
@ -261,7 +300,7 @@ tube.1/main :Byte: 12
tube.1/zumsel :Byte: 12
wtp-board-data/board-id :Bstr16: .x0000
wtp-board-data/mac-address :Bstr16: .x0800276edf58
wtp-board-data/model-no :Bstr16: AIR-LAP1131AG-E-K9
wtp-board-data/model-no :Bstr16: AIR-LAP1131AG-E-K9
wtp-board-data/revision :Bstr16: B0
wtp-board-data/serial-no :Bstr16: FCZ1441Q0XZ
wtp-board-data/vendor :Dword: 4232704
@ -276,7 +315,7 @@ wtp-descriptor/software/version :Bstr16: .x07007400
wtp-fallback :Byte: 1
wtp-frame-tunnel-mode :Byte: 4
wtp-mac-type :Byte: 1
wtp-name :Bstr16: tube
wtp-name :Bstr16: Supertube
wtp-reboot-statistics/ac-initiated-count :Word: 2
wtp-reboot-statistics/hw-failure-count :Word: 0
wtp-reboot-statistics/last-failure-type :Byte: 0

View File

@ -38,6 +38,6 @@ 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);
/*exit(0);*/
return 1;
}

View File

@ -27,7 +27,7 @@
#include "cw/dbg.h"
#include "cfg.h"
int update =0;
int update =1;
/*
int handle_update_req(struct conn *conn, struct cw_action_in *a, uint8_t * data,
@ -167,13 +167,15 @@ int run(struct conn * conn)
if ( !cw_result_is_ok(rc))
break;
clean_cfg(conn->remote_cfg);
printf("Saving Config\n");
mavl_merge(conn->local_cfg,conn->remote_cfg);
cw_ktv_save(conn->local_cfg,"cisco.ktv");
clean_cfg(conn->remote_cfg);
/*cw_dbg(DBG_X,"We hav a message processed");*/
update=1;
do_update(conn);

View File

@ -159,7 +159,7 @@ int main (int argc, char **argv)
/* conn->mod=mod;*/
conn->detected = 1;
conn->dtls_verify_peer=0;
conn->dtls_mtu = 12000;
conn->dtls_mtu = 1200;
conn->msgset=msgset;
conn->local_cfg = global_cfg;
conn->remote_cfg = NULL;
@ -196,7 +196,6 @@ exit(0);
/*cw_run_discovery(conn, "255.255.255.255","192.168.56.1", &dis);*/
/* cw_run_discovery(conn, "255.255.255.255",NULL, &dis);*/
cw_run_discovery(conn, "192.168.0.162","192.168.0.14", &dis);
cw_dbg_ktv_dump(dis.prio_ip, DBG_INFO, "=== IP list ===", "IP", "=== END IP List ===");