| // Copyright 2021 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| library fuchsia.wlan.ieee80211; |
| |
| /// IEEE Std 802.11-2016, 9.4.2.2 |
| /// The maximum length of an SSID is 32 bytes, even when the SSID should be |
| /// interpreted using UTF-8 encoding (see Table 9-135). While every length in |
| /// the 802.11 standard is byte oriented, the word BYTE is included in the |
| /// name of this constant to emphasize the importance that it not be applied |
| /// to the length of a UTF-8 encoded string. |
| @namespaced |
| const MAX_SSID_BYTE_LEN uint8 = 32; |
| |
| /// The limit on the number of SSIDs is 84 because an SSID List IE can contain no |
| /// more than 84 one byte SSIDs. (Specifying a zero byte SSID in an SSID List with |
| /// more than one SSID is valid but unnecessary since it is the wildcard SSID.) |
| @namespaced |
| const SSID_LIST_MAX uint8 = 84; |
| |
| /// The limit on the number of channels in a list of unique channel numbers is 256 |
| /// since a channel number in IEEE 802.11-2016 cannot exceed one octet. See |
| /// IEEE 802.11-2016 9.4.2.18 Supported Channels element for an example element |
| /// that assumes a channel number does not exceed one octet. |
| @namespaced |
| const MAX_UNIQUE_CHANNEL_NUMBERS uint16 = 256; |
| |
| @namespaced |
| const MAC_ADDR_LEN uint8 = 6; |
| alias MacAddr = array<uint8, MAC_ADDR_LEN>; |
| |
| /// IEEE Std 802.11-2016, 9.4.2.99 |
| @namespaced |
| const MAX_MESH_ID_BYTE_LEN uint8 = 32; |
| |
| /// IEEE Std 802.11-2016, 9.2.4.7 |
| @namespaced |
| const MAX_MMPDU_BYTE_LEN uint16 = 2304; |
| @namespaced |
| const MAX_VHT_MPDU_BYTE_LEN_0 uint16 = 3895; |
| @namespaced |
| const MAX_VHT_MPDU_BYTE_LEN_1 uint16 = 7991; |
| @namespaced |
| const MAX_VHT_MPDU_BYTE_LEN_2 uint16 = 11454; |
| |
| /// IEEE Std 802.11-2016, 9.3.3.2 |
| @namespaced |
| const MAX_MGMT_FRAME_MAC_HEADER_BYTE_LEN uint8 = 28; |
| |
| /// IEEE Std 802.11-2016, Table 9-19 |
| @namespaced |
| const WLAN_MSDU_MAX_LEN uint32 = 2304; |
| |
| /// IEEE Std 802.11-2016, 9.4.2.25.1 |
| /// IEEE mentions that an element body maximum length is 255 octets in the RSN element |
| /// section, but not in a dedicated section. |
| /// Since the IE header is two octets, the whole IE max length is 257 octets. |
| @namespaced |
| const WLAN_IE_MAX_LEN uint32 = 257; |
| @namespaced |
| const WLAN_IE_BODY_MAX_LEN uint32 = 255; |
| |
| /// IEEE Std 802.11-2016, 9.2.4.5 |
| @namespaced |
| const TIDS_MAX uint32 = 16; |
| |
| /// IEEE Std 802.11-2016 12.5.3.2 |
| @namespaced |
| const CCMP_HDR_LEN uint32 = 8; |
| @namespaced |
| const CCMP_PN_LEN uint32 = 6; |
| @namespaced |
| const CCMP_128_MIC_LEN uint32 = 8; |
| @namespaced |
| const CCMP_256_MIC_LEN uint32 = 16; |
| |
| |
| // IEEE Std 802.11-2016 9.4.2.56 |
| @namespaced |
| const HT_CAP_LEN uint8 = 26; |
| |
| // IEEE Std 802.11-2016 9.4.2.57 |
| @namespaced |
| const HT_OP_LEN uint8 = 22; |
| |
| // IEEE Std 802.11-2016 9.5.2.158 |
| @namespaced |
| const VHT_CAP_LEN uint8 = 12; |
| |
| // IEEE Std 802.11-2016 9.5.2.159 |
| @namespaced |
| const VHT_OP_LEN uint8 = 5; |