|
libtins
4.0
|
Class that models the RSN information structure. More...
#include <rsn_information.h>
Public Types | |
| enum | CypherSuites { WEP_40 = 0x01ac0f00, TKIP = 0x02ac0f00, CCMP = 0x04ac0f00, WEP_104 = 0x05ac0f00, BIP_CMAC_128 = 0x06ac0f00, GCMP_128 = 0x08ac0f00, GCMP_256 = 0x09ac0f00, CCMP_256 = 0x10ac0f00, BIP_GMAC_128 = 0x11ac0f00, BIP_GMAC_256 = 0x12ac0f00, BIP_CMAC_256 = 0x13ac0f00 } |
| Enum that represents the different cypher suites. | |
| enum | AKMSuites { EAP = 0x01ac0f00, PSK = 0x02ac0f00, EAP_FT = 0x03ac0f00, PSK_FT = 0x04ac0f00, EAP_SHA256 = 0x05ac0f00, PSK_SHA256 = 0x06ac0f00, TDLS = 0x07ac0f00, SAE_SHA256 = 0x08ac0f00, SAE_FT = 0x09ac0f00, APPEERKEY = 0x10ac0f00, EAP_SHA256_FIPSB = 0x11ac0f00, EAP_SHA384_FIPSB = 0x12ac0f00, EAP_SHA384 = 0x13ac0f00 } |
| Enum that represents the different akm suites. | |
| typedef std::vector< CypherSuites > | cyphers_type |
| typedef std::vector< AKMSuites > | akm_type |
| typedef std::vector< uint8_t > | serialization_type |
Public Member Functions | |
| RSNInformation () | |
| Constructs an RSNInformation object. More... | |
| RSNInformation (const serialization_type &buffer) | |
| Constructs an RSNInformation object from a serialization_type object. More... | |
| RSNInformation (const uint8_t *buffer, uint32_t total_sz) | |
| Constructs a RSNInformation from a buffer. More... | |
| void | add_pairwise_cypher (CypherSuites cypher) |
| Adds a pairwise cypher suite. More... | |
| void | add_akm_cypher (AKMSuites akm) |
| Adds an akm suite. More... | |
| void | group_suite (CypherSuites group) |
| Sets the group suite cypher. More... | |
| void | version (uint16_t ver) |
| Sets the version. More... | |
| void | capabilities (uint16_t cap) |
| Sets the capabilities field. More... | |
| CypherSuites | group_suite () const |
| Getter for the group suite field. More... | |
| uint16_t | version () const |
| Getter for the version field. More... | |
| uint16_t | capabilities () const |
| Getter for the capabilities field. More... | |
| const cyphers_type & | pairwise_cyphers () const |
| Getter for the pairwise cypher suite list. More... | |
| const akm_type & | akm_cyphers () const |
| Getter for the akm suite list. More... | |
| serialization_type | serialize () const |
| Serializes this object. More... | |
Static Public Member Functions | |
| static RSNInformation | wpa2_psk () |
| Helper function to create a WPA2-PSK RSNInformation. More... | |
| static RSNInformation | from_option (const PDUOption< uint8_t, Dot11 > &opt) |
Class that models the RSN information structure.
| typedef std::vector<AKMSuites> Tins::RSNInformation::akm_type |
The type used to store the AKM suites.
| typedef std::vector<CypherSuites> Tins::RSNInformation::cyphers_type |
The type used to store the cypher suites.
| typedef std::vector<uint8_t> Tins::RSNInformation::serialization_type |
The type returned on serialization.
| Tins::RSNInformation::RSNInformation | ( | ) |
Constructs an RSNInformation object.
By default, the version is set to 1.
| Tins::RSNInformation::RSNInformation | ( | const serialization_type & | buffer | ) |
Constructs an RSNInformation object from a serialization_type object.
| buffer | The buffer from which to construct this object. |
| Tins::RSNInformation::RSNInformation | ( | const uint8_t * | buffer, |
| uint32_t | total_sz | ||
| ) |
Constructs a RSNInformation from a buffer.
If the input is malformed, a malformed_packet exception is thrown.
| buffer | The buffer from which this object will be constructed. |
| total_sz | The total size of the buffer. |
| void Tins::RSNInformation::add_akm_cypher | ( | AKMSuites | akm | ) |
Adds an akm suite.
| akm | The akm suite to be added. |
| void Tins::RSNInformation::add_pairwise_cypher | ( | CypherSuites | cypher | ) |
Adds a pairwise cypher suite.
| cypher | The pairwise cypher suite to be added. |
|
inline |
Getter for the akm suite list.
| void Tins::RSNInformation::capabilities | ( | uint16_t | cap | ) |
Sets the capabilities field.
| cap | The capabilities to be set. |
|
inline |
Getter for the capabilities field.
|
static |
Constructs an RSNInformation object from a Dot11 tagged option.
| void Tins::RSNInformation::group_suite | ( | CypherSuites | group | ) |
Sets the group suite cypher.
| group | The group suite cypher to be set. |
|
inline |
Getter for the group suite field.
|
inline |
Getter for the pairwise cypher suite list.
| RSNInformation::serialization_type Tins::RSNInformation::serialize | ( | ) | const |
Serializes this object.
| void Tins::RSNInformation::version | ( | uint16_t | ver | ) |
Sets the version.
| ver | The version to be set. |
|
inline |
Getter for the version field.
|
static |
Helper function to create a WPA2-PSK RSNInformation.
1.8.11