Some more details are parsed.
FossilOrigin-Name: 6387dba0007371fc314da462dbc4183fa71165d7c7b9c3a8928bc8222640a0a1
This commit is contained in:
parent
d2fdc7264a
commit
b618b23a29
@ -4,6 +4,7 @@
|
|||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "mbag.h"
|
#include "mbag.h"
|
||||||
#include "capwap.h"
|
#include "capwap.h"
|
||||||
|
#include "capwap_items.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -55,6 +56,57 @@ int cw_cisco_get_wlan_legacy(mbag_t wlan, uint8_t *data, int len)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int cw_cisco_get_wlan_(mbag_t wlan, uint8_t *data, int len)
|
||||||
|
{
|
||||||
|
mbag_set_word(wlan,"enc_capab", cw_get_word(data+1));
|
||||||
|
|
||||||
|
int wlan_id=cw_get_word(data+3);
|
||||||
|
mbag_set_word(wlan,"wlan_id",wlan_id);
|
||||||
|
|
||||||
|
mbag_set_dword(wlan,"enc_policy",cw_get_dword(data+5));
|
||||||
|
mbag_set_bstr16n(wlan,"key",data+9,32);
|
||||||
|
|
||||||
|
mbag_set_byte(wlan,"key_index",cw_get_byte(data+41));
|
||||||
|
mbag_set_byte(wlan,"key_shared",cw_get_byte(data+42));
|
||||||
|
|
||||||
|
mbag_set_byte(wlan,"wpa_len",cw_get_byte(data+43));
|
||||||
|
mbag_set_bstr16n(wlan,"wpa_data",data+44,32);
|
||||||
|
|
||||||
|
mbag_set_byte(wlan,"rsn_len",cw_get_byte(data+76));
|
||||||
|
mbag_set_bstr16n(wlan,"rsn_data",data+77,64);
|
||||||
|
|
||||||
|
mbag_set_bstr16n(wlan,"reserved",data+141,49);
|
||||||
|
|
||||||
|
mbag_set_byte(wlan,"wme_len",cw_get_byte(data+190));
|
||||||
|
mbag_set_bstr16n(wlan,"wme_data",data+191,32);
|
||||||
|
|
||||||
|
mbag_set_byte(wlan,"dot11e_len",cw_get_byte(data+223));
|
||||||
|
mbag_set_bstr16n(wlan,"dot11e_data",data+224,32);
|
||||||
|
|
||||||
|
mbag_set_byte(wlan,"qos",cw_get_byte(data+256));
|
||||||
|
|
||||||
|
// mbag_set_byte(wlan,"ssid_broadcast",cw_get_byte(data+257));
|
||||||
|
mbag_set_byte(wlan,"ssid_broadcast",cw_get_byte(data+435));
|
||||||
|
mbag_set_byte(wlan,"aironet_ie",cw_get_byte(data+436));
|
||||||
|
|
||||||
|
mbag_set_bstr16n(wlan,"reserved2",data+258,40);
|
||||||
|
|
||||||
|
|
||||||
|
mbag_set_byte(wlan,"dtim_period",cw_get_byte(data+554));
|
||||||
|
mbag_set_bstr16n(wlan,"wlan_name",data+558,32);
|
||||||
|
mbag_set_byte(wlan,"allow_aaa_override",cw_get_byte(data+591));
|
||||||
|
mbag_set_byte(wlan,"max_clients",cw_get_byte(data+593));
|
||||||
|
|
||||||
|
|
||||||
|
mbag_set_bstr16n(wlan,"ssid",data+622,len-622);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int cw_in_cisco_add_wlan(struct conn *conn, struct cw_action_in *a, uint8_t * data, int len,
|
int cw_in_cisco_add_wlan(struct conn *conn, struct cw_action_in *a, uint8_t * data, int len,
|
||||||
struct sockaddr *from)
|
struct sockaddr *from)
|
||||||
@ -71,9 +123,15 @@ int cw_in_cisco_add_wlan(struct conn *conn, struct cw_action_in *a, uint8_t * da
|
|||||||
mbag_set_byte(wlan,"radio_id",rid);
|
mbag_set_byte(wlan,"radio_id",rid);
|
||||||
|
|
||||||
|
|
||||||
|
int mytype=mbag_get_byte(conn->config,CW_ITEM_AP_MODE_AND_TYPE,77) & 0xff;
|
||||||
|
|
||||||
|
printf("My type: %d\n",mytype);
|
||||||
|
exit(0);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cw_cisco_get_wlan_legacy(wlan,data,len);
|
cw_cisco_get_wlan_legacy(wlan,data,len);
|
||||||
|
|
||||||
printf("Add WLAN %d\n",rid);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user