mesh: Parse mesh-related information elements
Add support for parsing mesh id, mesh config, mesh peering, AMPE and MIC information elements. Signed-off-by: Bob Copeland <me@bobcopeland.com>
This commit is contained in:
parent
3e7b032f83
commit
6293f9ed07
2 changed files with 32 additions and 0 deletions
|
@ -249,6 +249,18 @@ ParseRes ieee802_11_parse_elems(const u8 *start, size_t len,
|
|||
elems->ht_operation = pos;
|
||||
elems->ht_operation_len = elen;
|
||||
break;
|
||||
case WLAN_EID_MESH_CONFIG:
|
||||
elems->mesh_config = pos;
|
||||
elems->mesh_config_len = elen;
|
||||
break;
|
||||
case WLAN_EID_MESH_ID:
|
||||
elems->mesh_id = pos;
|
||||
elems->mesh_id_len = elen;
|
||||
break;
|
||||
case WLAN_EID_PEER_MGMT:
|
||||
elems->peer_mgmt = pos;
|
||||
elems->peer_mgmt_len = elen;
|
||||
break;
|
||||
case WLAN_EID_VHT_CAP:
|
||||
elems->vht_capabilities = pos;
|
||||
elems->vht_capabilities_len = elen;
|
||||
|
@ -290,6 +302,16 @@ ParseRes ieee802_11_parse_elems(const u8 *start, size_t len,
|
|||
elems->ssid_list = pos;
|
||||
elems->ssid_list_len = elen;
|
||||
break;
|
||||
case WLAN_EID_AMPE:
|
||||
elems->ampe = pos;
|
||||
elems->ampe_len = elen;
|
||||
break;
|
||||
case WLAN_EID_MIC:
|
||||
elems->mic = pos;
|
||||
elems->mic_len = elen;
|
||||
/* after mic everything is encrypted, so stop. */
|
||||
left = elen;
|
||||
break;
|
||||
default:
|
||||
unknown++;
|
||||
if (!show_errors)
|
||||
|
|
|
@ -28,6 +28,9 @@ struct ieee802_11_elems {
|
|||
const u8 *timeout_int;
|
||||
const u8 *ht_capabilities;
|
||||
const u8 *ht_operation;
|
||||
const u8 *mesh_config;
|
||||
const u8 *mesh_id;
|
||||
const u8 *peer_mgmt;
|
||||
const u8 *vht_capabilities;
|
||||
const u8 *vht_operation;
|
||||
const u8 *vht_opmode_notif;
|
||||
|
@ -42,6 +45,8 @@ struct ieee802_11_elems {
|
|||
const u8 *bss_max_idle_period;
|
||||
const u8 *ssid_list;
|
||||
const u8 *osen;
|
||||
const u8 *ampe;
|
||||
const u8 *mic;
|
||||
|
||||
u8 ssid_len;
|
||||
u8 supp_rates_len;
|
||||
|
@ -60,6 +65,9 @@ struct ieee802_11_elems {
|
|||
u8 timeout_int_len;
|
||||
u8 ht_capabilities_len;
|
||||
u8 ht_operation_len;
|
||||
u8 mesh_config_len;
|
||||
u8 mesh_id_len;
|
||||
u8 peer_mgmt_len;
|
||||
u8 vht_capabilities_len;
|
||||
u8 vht_operation_len;
|
||||
u8 vendor_ht_cap_len;
|
||||
|
@ -71,6 +79,8 @@ struct ieee802_11_elems {
|
|||
u8 ext_capab_len;
|
||||
u8 ssid_list_len;
|
||||
u8 osen_len;
|
||||
u8 ampe_len;
|
||||
u8 mic_len;
|
||||
};
|
||||
|
||||
typedef enum { ParseOK = 0, ParseUnknown = 1, ParseFailed = -1 } ParseRes;
|
||||
|
|
Loading…
Reference in a new issue