Wireless Station Information Tracker¶
The High MAC Framework actively tracks information about stations that it learns from any overheard frame. It also tracks
The station information tracker periodically culls information that has not been updated within STATION_INFO_TIMEOUT_USEC
microseconds.
The information tracked for each network is defined in station_info_t
as the following:
Parameter | Description |
---|---|
u8 addr[6] |
MAC address of station. |
u16 ID |
ID of the station. Used by the AP high MAC application as an association and queue ID. |
char hostname[20] |
Null-terminated string of station’s hostname if it is observed in a DHCP handshake. |
u8 flags |
STATION_INFO_FLAG_KEEP : prevents the High MAC Framework from removing a station_info_t regardless of how stale it might be. |
STATION_INFO_FLAG_DISABLE_ASSOC_CHECK : informs the MAC high application that the station should not be removed from a BSS regardless of how stale it might be. |
|
u8 ps_state |
STATION_INFO_PS_STATE_DOZE : represents that a station is currently in a power saving doze state. |
u16 capabilities |
STATION_INFO_CAPABILITIES_HT_CAPABLE : represents that a station is capable of receiving packets sent using the HT PHY mode. |
u64 latest_rx_timestamp |
local MAC time of last reception from this station. |
u64 latest_txrx_timestamp |
local MAC time of last packet sent to or last reception from this station. |
int num_queued |
Number of frames currently enqueued for transmission to this station. |
tx_params_t tx_params_data |
Transmission parameters for data frames. |
tx_params_t tx_params_mgmt |
Transmission parameters for management frames. |
station_txrx_counts_t txrx_counts |
Tx/Rx packet counts |
The station_txrx_counts_t
field in station_info_t
is used to independently track transmission and reception counts for both data and management frames. For both of these classes of frames, the following fields are tracked:
Parameter | Description |
---|---|
u64 rx_num_bytes |
Number of successfully received bytes (de-duplicated). |
u64 rx_num_bytes_total |
Number of successfully received bytes (including duplicates). |
u64 tx_num_bytes_success |
Number of successfully transmitted bytes (high-level MPDUs). |
u64 tx_num_bytes_total |
Total number of transmitted bytes (high-level MPDUs). |
u32 rx_num_packets |
Number of successfully received packets (de-duplicated). |
u32 rx_num_packets_total |
Number of successfully received packets (including duplicates). |
u32 tx_num_packets_success |
Number of successfully transmitted packets (high-level MPDUs). |
u32 tx_num_packets_total |
Total number of transmitted packets (high-level MPDUs). |
u64 tx_num_attempts |
Number of low-level attempts (including retransmissions). |
Create station information¶
station_info_t* station_info_create(u8* addr) {
The return value and function arguments are defined as follows:
Parameter | Description |
---|---|
Return value (station_info_t* ) |
NULL if unable to create station information, or a pointer to a station_info_t containing the provided argument. |
u8* addr |
Pointer to a 6-byte array containing the MAC address of the created station. |
Reset all non-kept station information¶
To have the High MAC Framework purge all station information that is not explicitly marked with the STATION_INFO_FLAG_KEEP
flag, the following function can be used:
void station_info_reset_all() {
Reset all Tx/Rx counts¶
To have the High MAC Framework purge all station information counts, the following function can be used:
void station_info_reset_all_counts_txrx() {
Find station information by address¶
The High MAC Framework can find and return a station_info_t
that matches a provided address with the following function:
station_info_entry_t* station_info_find_by_addr(u8* addr, dl_list* list)
The return value and function arguments are defined as follows:
Parameter | Description |
---|---|
Return value (station_info_entry_t* ) |
NULL if no such address has been seen, or a pointer to a station_info_entry_t (whose data field is a station_info_t pointer) if a station matching the provided address is found |
u8* addr |
Pointer to a 6-byte array containing the BSSID being searched for. |
dl_list* list |
NULL if the framework is to search through all known station information, otherwise the search will be limited to the provided list |