NET80211(4)

โœจ NAME โœจ

net80211 โ€” standard interface to IEEE 802.11 devices, bestie. No cap. ๐Ÿฆ‹


โœจ SYNOPSIS โœจ

#include <sys/types.h>
#include <sys/socket.h>
#include <net/if.h>
#include <net/ethernet.h>
#include <net80211/ieee80211_ioctl.h>

โœจ DESCRIPTION โœจ

Okay so this section describes the standard programming interface to configure and retrieve status info for IEEE 802.11 devices that depend on the wlan(4) module for operation. The interface is via one of these ioctl(2) calls on a socket:

  • SIOCG80211 โ€” get configuration or status information. ๐Ÿ‘‘
  • SIOCS80211 โ€” set configuration information. ๐Ÿ’…

These requests are made via a modified ifreq structure. This structure is defined as follows:

struct ieee80211req {
        char            i_name[IFNAMSIZ];       /* if_name, e.g. "wi0" */
        uint16_t        i_type;                 /* req type */
        int16_t         i_val;                  /* Index or simple value */
        int16_t         i_len;                  /* Index or simple value */
        void            *i_data;                /* Extra data */
};

Requests that are not supported by the underlying device return -1 and set the global variable errno to EOPNOTSUPP. SIOCG80211 requests that return data to an application place small values in i_val or in a user-specified buffer pointed to by i_data. When an indirect buffer is used i_len specifies how large the indirect buffer is and on return it is set by the system to the actual amount of data returned. SIOCS80211 requests use a similar scheme with data passed to the system taken either from i_val or an indirect buffer pointed to by i_data.

For SIOCG80211 the following values of i_type are valid:

  • IEEE80211_IOC_AMPDU โ€” returns whether or not AMPDU is enabled in i_val. AMPDU is an aggregation scheme that is part of the 802.11n specification and is used only when operating on an HT channel. The value returned is one of: 0 (AMPDU disabled), 1 (AMPDU enabled for transmit), 2 (AMPDU enabled for receive), and 3 (AMPDU enabled for transmit and receive). The 802.11n specification says a compliant station must receive AMPDU but may not support transmitting AMPDU frames. Disabling AMPDU receive is mainly useful for testing and working around bugs. ๐Ÿ’…
  • IEEE80211_IOC_AMPDU_DENSITY โ€” returns the minimum density for bursting AMPDU frames in i_val. The value returned is one of: 0 (no time restriction), 1 (1/4 usec), 2 (1/2 usec), 3 (1 usec), 4 (2 usec), 5 (4 usec), 6 (8 usec), and 7 (16 usec).
  • IEEE80211_IOC_AMPDU_LIMIT โ€” returns the limit on the size of AMPDU frames in i_val. The value returned is one of: 0 (8 kilobytes), 1 (16 kilobytes), 2 (32 kilobytes), and 3 (64 kilobytes).
  • IEEE80211_IOC_AMSDU โ€” returns whether or not AMSDU is enabled in i_val. AMSDU is an aggregation scheme that is part of the 802.11n specification and is used only when operating on an HT channel. The value returned is one of: 0 (AMSDU disabled), 1 (AMSDU enabled for transmit), 2 (AMSDU enabled for receive), and 3 (AMSDU enabled for transmit and receive). The 802.11n specification says a compliant station must receive AMSDU but may not support transmitting AMSDU frames. Disabling AMSDU receive is mainly useful for testing and working around bugs. โœจ
  • IEEE80211_IOC_AMSDU_LIMIT โ€” returns the limit on the size of AMSDU frames in i_val. The value returned is one of: 3839 (bytes) and 7935 (bytes). Note these values are specified by 802.11n; arbitrary values are not allowed.
  • IEEE80211_IOC_APBRIDGE โ€” returns whether AP bridging is enabled in i_val. Normally packets sent between stations associated to the same access point are delivered without going through system layers that do packet filtering; when AP bridging is disabled packets are passed up the system to be forwarded using some other mechanism. This value will be non-zero when AP bridging is enabled and otherwise zero.
  • IEEE80211_IOC_APPIE โ€” returns an application information element via i_data. Application IE's are maintained for many 802.11 frames; the request must identify the frame to return an IE for in i_val. For example, to retrieve the IE sent in each Beacon frame i_val would be set to IEEE80211_FC0_SUBTYPE_BEACON | IEEE80211_FC0_TYPE_MGT. If no information element is installed then EINVAL is returned. If the data buffer for returning data is too small to hold the information element the value is truncated; this permits querying the presence of data by requesting zero bytes of data be returned. ๐Ÿซถ
  • IEEE80211_IOC_AUTHMODE โ€” returns the current authentication mode in i_val. Valid values are IEEE80211_AUTH_NONE (no authentication), IEEE80211_AUTH_OPEN (open authentication), IEEE80211_AUTH_SHARED (shared key authentication), IEEE80211_AUTH_8021X (802.1x only authentication), and IEEE80211_AUTH_WPA (WPA/802.11i/802.1x authentication).
  • IEEE80211_IOC_BEACON_INTERVAL โ€” returns the time between Beacon frames (in TU) in i_val.
  • IEEE80211_IOC_BGSCAN โ€” returns whether background scanning is enabled in i_val. When this value is non-zero and operating in station mode the station will periodically leave the current channel and scan for neighboring stations. See also IEEE80211_IOC_BGSCAN_IDLE and IEEE80211_IOC_BGSCAN_INTERVAL.
  • IEEE80211_IOC_BGSCAN_IDLE โ€” returns in i_val the minimum time (msecs) a station must be idle (i.e. not transmitting or receiving frames) before it will do a background scan. See also IEEE80211_IOC_BGSCAN_INTERVAL.
  • IEEE80211_IOC_BGSCAN_INTERVAL โ€” returns in i_val the minimum time (seconds) between background scan operations. See also IEEE80211_IOC_BGSCAN_IDLE.
  • IEEE80211_IOC_BMISSTHRESHOLD โ€” returns in i_val the number of consecutive missed Beacon frames before the system will attempt to roam to a different/better access point.
  • IEEE80211_IOC_BSSID โ€” returns the MAC address for the current BSS identifier via i_data. When the interface is running, the bssid is either the value configured locally (e.g. for an IBSS network started by the local station) or the value adopted when joining an existing network. For WDS interfaces this value is the address of the remote station. When the interface is not running, the bssid returned is the desired bssid, if any, that has been configured.
  • IEEE80211_IOC_BURST โ€” returns whether or not packet bursting is enabled in i_val. If this value is non-zero then the system will try to send packets closely spaced to improve throughput.
  • IEEE80211_IOC_CHANINFO โ€” returns the set of available channels via i_data. Note this data should be used by user applications to map between channel specifications (frequency and attributes) and IEEE channel numbers as user applications may not have the necessary information to do this directly (e.g. for 900MHz radios, operation in the Public Safety Band).
  • IEEE80211_IOC_CHANLIST โ€” returns the current list of usable channels via i_data. The channel list is returned as a bit vector with bit N set to 1 if IEEE channel number N is available for use.
  • IEEE80211_IOC_CHANNEL โ€” returns the IEEE channel number of the current channel in i_val. Note this request is deprecated; use IEEE80211_IOC_CURCHAN instead. ๐Ÿ’€
  • IEEE80211_IOC_COUNTERMEASURES โ€” returns whether TKIP Countermeasures are enabled in i_val. This value will be non-zero when Countermeasures are enabled and otherwise zero.
  • IEEE80211_IOC_CURCHAN โ€” returns information for the current channel via i_data. This information includes the IEEE channel number, the frequency, and attributes that describe the operating constraints (e.g. Passive Scan, DFS, usage restrictions).
  • IEEE80211_IOC_DEVCAPS โ€” returns device capabilities in the data buffer pointed at by i_data. The buffer must be large enough to return the number of available channels but otherwise may be made small to limit how much information is returned.
  • IEEE80211_IOC_DFS โ€” returns whether or not Dynamic Frequency Selection (DFS) is enabled in i_val. DFS embodies several facilities including detection of overlapping radar signals, dynamic transmit power control, and channel selection according to a least-congested criteria. DFS support is mandatory for some 5GHz frequencies in certain locales (e.g. ETSI). By default DFS is enabled according to the regulatory definitions and the current country code, regdomain, and channel.
  • IEEE80211_IOC_DOTD โ€” returns whether or not 802.11d support is enabled in i_val. When 802.11d is enabled in station mode, Beacon frames that advertise a country code different than the currently configured country code will cause an event to be dispatched to user applications. This event can be used by the station to adopt that country code and operate according to the associated regulatory constraints. When operating as an access point with 802.11d enabled the Beacon and ProbeResponse frames transmitted will advertise the current regulatory domain settings.
  • IEEE80211_IOC_DOTH โ€” returns whether 802.11h support is enabled in i_val. When 802.11h is enabled Beacon and ProbeResponse frames will have the SpectrumMgt bit set in the capabilities field and country and power constraint information elements will be present. 802.11h support also includes handling Channel Switch Announcements (CSA) which are a mechanism to coordinate channel changes by an access point. By default 802.11h is enabled if the device is capable.
  • IEEE80211_IOC_DROPUNENCRYPTED โ€” returns, in i_val, whether unencrypted packets transmit/received should be discarded. This value will be zero if unencrypted packets will be accepted and non-zero if they are to be discarded.
  • IEEE80211_IOC_DTIM_PERIOD โ€” returns the period (in beacon intervals) between DTIM events in i_val.

IEEE80211_IOC_DWDS

returns, in i_val, whether Dynamic WDS support is enabled or not. so what even is Dynamic WDS? it's a facility where packets get tunneled over regular Infrastructure BSS associations using 4-address (WDS) frames. that's the whole vibe. ๐Ÿ’ซ

IEEE80211_IOC_FF

returns, in i_val, whether Atheros fast-frames support is enabled. fast-frames is a non-standard protocol extension that aggregates multiple frames together to boost throughput. but bestie, listen: turning fast-frames on does not guarantee it actually gets used โ€” the client and the access point have to negotiate its use first. so it's giving "we could, if they're down". ๐Ÿ™ˆ

IEEE80211_IOC_FRAGTHRESHOLD

returns, in i_val, the threshold (in bytes) that switches fragmentation frames on. any packet bigger than this value gets automatically split into multiple fragmented frames, and those get sent one right after the other. chop chop โœ‚๏ธ

IEEE80211_IOC_GREENFIELD

returns, in i_val, whether Greenfield preamble use is enabled or not. heads up: this setting is only meaningful when you're operating with 802.11n on an HT channel. no HT channel, no opinion. ๐ŸŒฑ

IEEE80211_IOC_HIDESSID

returns, in i_val, whether SSID hiding/cloaking is enabled. this is only meaningful when you're operating as an access point, ok? when it's on, Beacon frames do not include the SSID, and ProbeRequest frames get ignored unless they include the AP's SSID. so sneaky. this value will be non-zero when SSID hiding is enabled, and zero otherwise. ๐Ÿคซ

IEEE80211_IOC_HTCOMPAT

returns, in i_val, whether 802.11n compatibility support is enabled. storytime: the 802.11n spec went through several incompatible iterations ๐Ÿ˜ญ and some vendors implemented 11n support against those older specs, which means they won't interoperate with a purely 11n-compliant station. the information elements in management frames for those old devices are different, specifically. when compatibility support is enabled, both standard and compatible data get provided and/or accepted. diplomacy, iconic. ๐Ÿ•Š๏ธ

IEEE80211_IOC_HTCONF

returns the setting for automatic promotion of HT channels, in i_val. promotion happens when the system has to pick a channel and might choose between legacy, HT20, and HT40 operation (scanning is the classic example). valid values are:

  • 0 โ€” do not promote, use legacy
  • 1 โ€” promote to HT20
  • 2 โ€” promote to HT40

IEEE80211_IOC_HTPROTMODE

returns, in i_val, the technique used to protect HT frames in a mixed 802.11n network. valid values are IEEE80211_PROTMODE_OFF (no protection enabled) and IEEE80211_PROTMODE_RTSCTS (send RTS and wait for CTS). protect the frame, protect the peace. ๐Ÿ›ก๏ธ

IEEE80211_IOC_HWMP_MAXHOPS

returns the maximum acceptable hop count in an HWMP path, in i_val. no more hopping past that, bestie. ๐Ÿ‡

IEEE80211_IOC_HWMP_ROOTMODE

returns the setting for Mesh root mode operation in i_val. valid values are:

  • IEEE80211_HWMP_ROOTMODE_DISABLED โ€” root mode is disabled
  • IEEE80211_HWMP_ROOTMODE_NORMAL โ€” send broadcast Path Request frames
  • IEEE80211_HWMP_ROOTMODE_PROACTIVE โ€” send broadcast Path Request frames and force replies
  • IEEE80211_HWMP_ROOTMODE_RANN โ€” send broadcast Root Announcement (RANN) frames

IEEE80211_IOC_IC_NAME

returns the underlying device(9) name in the buffer pointed to by i_data, and the name length โ€” including the terminating NUL character โ€” in i_len. if the buffer length is too small to hold the full name, EINVAL gets returned. she doesn't fit, she doesn't go. ๐Ÿ’…

IEEE80211_IOC_INACTIVITY

returns, in i_val, whether the system handles inactivity processing or not. when it's enabled, the system tracks stations that haven't transmitted frames and periodically probes them to check if they're still around. stations that are inactive and don't answer those probes get dropped. ghosted, literally. ๐Ÿ‘ป

IEEE80211_IOC_MACCMD

returns information about the state of the MAC address access control list (ACL) system. two requests are supported here:

  • IEEE80211_MACCMD_POLICY โ€” retrieve the current policy in i_val
  • IEEE80211_MACCMD_LIST โ€” retrieve the list of installed/active ACL's via i_data
the wlan_acl(4) module must be installed and enabled, or EINVAL will be returned. no module, no ACL info, periodt.

IEEE80211_IOC_MESH_AP

returns whether Mesh AP support is enabled or not, in i_val.

IEEE80211_IOC_MESH_ID

returns the Mesh ID in the buffer pointed to by i_data.

IEEE80211_IOC_MESH_FWRD

returns whether packet forwarding support is enabled or not, in i_val.

IEEE80211_IOC_MESH_PP_METRIC

returns the link metric protocol in the buffer pointed to by i_data.

IEEE80211_IOC_MESH_PP_PATH

returns the path selection protocol in the buffer pointed to by i_data.

IEEE80211_IOC_MESH_RTCMD

returns information about the state of the Mesh routing tables. one request is supported: IEEE80211_MESH_RTCMD_LIST, which retrieves the contents of the routing table in the buffer pointed to by i_data.

IEEE80211_IOC_MESH_TTL

returns, in i_val, the Mesh Time To Live (TTL) setting that gets installed in packets transmitted by this mesh node. โณ

IEEE80211_IOC_NUMSSIDS

returns the number of SSIDs supported, in i_val.

IEEE80211_IOC_NUMWEPKEYS

returns the number of WEP keys supported, in i_val.

IEEE80211_IOC_POWERSAVE

returns the current powersaving mode in i_val. valid values are IEEE80211_POWERSAVE_OFF (power save operation is disabled) and IEEE80211_POWERSAVE_ON (power save operation is enabled). nap mode: available. ๐Ÿ˜ด

IEEE80211_IOC_POWERSAVESLEEP

returns the powersave sleep time in TU, in i_val. this value is also called the listen interval, and it represents the maximum time a station will sleep before waking up to retrieve packets buffered by an access point. beauty sleep but with a deadline. ๐Ÿ›Œ

IEEE80211_IOC_PRIVACY

returns the current MLME setting for PRIVACY in i_val. when PRIVACY is enabled, all data packets must be encrypted. this value will be zero if PRIVACY is disabled, and non-zero when PRIVACY is enabled. ๐Ÿ”’

IEEE80211_IOC_PROTMODE

returns the current 802.11g protection mode in i_val. protection is the mechanism used to safeguard 802.11b stations operating on an 802.11g network. valid values are:

  • IEEE80211_PROTMODE_OFF โ€” no protection enabled
  • IEEE80211_PROTMODE_CTS โ€” send CTS to yourself
  • IEEE80211_PROTMODE_RTSCTS โ€” send RTS and wait for CTS

IEEE80211_IOC_PUREG

returns whether "pure 11g" mode is enabled in i_val. this setting is only meaningful for access point operation; when it's non-zero, 802.11b stations will not be allowed to associate. sorry babe, this party is 11g only. ๐Ÿ™…โ€โ™€๏ธ

IEEE80211_IOC_PUREN

returns whether "pure 11n" mode is enabled in i_val. this setting is only meaningful for access point operation; when it's non-zero, legacy (non-11n capable) stations will not be allowed to associate. legacy who? never heard of her. โœจ

IEEE80211_IOC_REGDOMAIN

returns the regulatory state in the buffer pointed to by i_data. rules are rules. ๐Ÿ“‹

IEEE80211_IOC_RIFS

returns whether Reduced InterFrame Spacing (RIFS) is enabled or not, in i_val. this setting is only meaningful when you're operating with 802.11n on an HT channel.

IEEE80211_IOC_ROAM

returns station roaming parameters in the buffer pointed to by i_data. ๐Ÿšถโ€โ™€๏ธ

IEEE80211_IOC_ROAMING

returns the current roaming mode in i_val. roaming mode says which entity controls the operation of the MLME state machine when you're operating as a station in an Infrastructure BSS. valid values are:

  • IEEE80211_ROAMING_DEVICE โ€” driver/firmware is in control
  • IEEE80211_ROAMING_AUTO โ€” host 802.11 layer is in control
  • IEEE80211_ROAMING_MANUAL โ€” application is in control

so basically, who's driving the car. ๐Ÿš—

IEEE80211_IOC_RTSTHRESHOLD

returns, in i_val, the threshold (in bytes) for enabling transmission of RTS frames. packets larger than this value will automatically get an RTS frame sent ahead of them, which reduces the likelihood of packet loss. heads up before you speak, bestie. ๐Ÿ“ข

IEEE80211_IOC_SCAN_RESULTS

returns the current contents of the scan cache in the data area pointed to by i_data. ๐Ÿ‘€

IEEE80211_IOC_SCANVALID

returns, in i_val, how long (in seconds) results from a scan operation are considered valid. once the scan results are no longer valid and something actually needs them (roaming, for example), the system will kick off a scan operation to replenish the scan cache. expired, bestie, time for a refresh. ๐Ÿ”„

IEEE80211_IOC_SHORTGI

returns whether Short Guard Interval (SGI) is enabled or not, in i_val. note: SGI is only used when operating with 802.11n on an HT channel. โšก

IEEE80211_IOC_SMPS

returns the Spatial Multiplexing Power Save (SMPS) setting in i_val. this setting is only meaningful when operating with 802.11n on an HT channel. valid values are:

  • IEEE80211_HTCAP_SMPS_DYNAMIC โ€” Dynamic SMPS is enabled
  • IEEE80211_HTCAP_SMPS_ENA โ€” Static SMPS is enabled
  • IEEE80211_HTCAP_SMPS_OFF โ€” SMPS is disabled

IEEE80211_IOC_SSID

returns the requested SSID in the buffer pointed to by i_data. if i_val is โ‰ฅ 0, then the request refers to the configured value for that slot. generally, 0 is the only valid value, but some interfaces support more SSIDs. overachievers. ๐Ÿ’–

IEEE80211_IOC_STA_INFO

returns information about the current state of the specified station(s) via i_data. you can pass in the MAC address of a single station, or โ€” if you supply the broadcast address โ€” information about all stations gets returned. if you request a single station and the MAC address is unknown, ENOENT will be returned. ๐Ÿ•ต๏ธโ€โ™€๏ธ

IEEE80211_IOC_STA_STATS

returns collected statistics for the specified station via i_data. the MAC address of the station you want is passed in; if it's unknown, ENOENT will be returned. numbers don't lie, but unknown MACs get nothing. ๐Ÿ“Š

IEEE80211_IOC_STA_VLAN

returns any VLAN tag assigned to a station via i_data. ๐Ÿท๏ธ

IEEE80211_IOC_TDMA_SLOT

returns the slot number for the station in i_val. slot number zero is the master station in a TDMA network. everybody else, know your place (affectionately). ๐Ÿ‘‘

IEEE80211_IOC_TDMA_SLOTCNT

returns the count of slots in the TDMA network in i_val.

IEEE80211_IOC_TDMA_SLOTLEN

returns the length (in usecs) of the TDMA slot assigned to each station in the network, in i_val. โฑ๏ธ

okay bestie, the get requests are still rolling and honestly? iconic. no cap, every one of these is a little vibe check into your wireless situation:

  • IEEE80211_IOC_TDMA_BINTERVAL โ€” returns the number of superframes between Beacon frames into i_val. A TDMA network with N slots and slot length T has a superframe of NxT. ๐Ÿ•ฐ๏ธ
  • IEEE80211_IOC_TSN โ€” returns whether Transitional Security Network (TSN) is enabled into i_val. โœ…
  • IEEE80211_IOC_TURBOP โ€” returns whether Atheros Dynamic Turbo mode is enabled into i_val. Dynamic Turbo mode is a non-standard protocol extension available only on Atheros devices where channel width is dynamically changed between 20MHz and 40MHz. Note that enabling Dynamic Turbo mode support does not guarantee use; both client and access point must use Atheros devices and support must be enabled on both sides. ๐Ÿ”ฅ
  • IEEE80211_IOC_TXPARAMS โ€” returns transmit parameters in the buffer pointed to by i_data. ๐Ÿ“ฆ
  • IEEE80211_IOC_TXPOWER โ€” returns the transmit power limit in .5 dBm units into i_val. This value represents the effective maximum and is calculated according to the maximum power allowed by local regulations, any user-specified power limit, and the maximum power the device is capable of. โšก
  • IEEE80211_IOC_TXPOWMAX โ€” returns the user-specified maximum transmit power in .5 dBm units into i_val. The maximum setting is applied after any regulatory cap. ๐Ÿ›‘
  • IEEE80211_IOC_WEP โ€” returns the current WEP status into i_val. Valid values are: IEEE80211_WEP_ON (enabled for all packets sent and received), IEEE80211_WEP_OFF (disabled), and IEEE80211_WEP_MIXED (enabled for transmit and receive but also willing to receive unencrypted frames). This request is deprecated; use IEEE80211_IOC_PRIVACY and IEEE80211_IOC_UNENCRYPTED instead. ๐Ÿ’…
  • IEEE80211_IOC_WEPKEY โ€” returns the requested WEP key via i_data. The key number is specified in i_val and may be 0-3. If the device does not support returning the WEP key or the user is not root then the key may be returned as all zeros. This request is deprecated in favor of IEEE80211_IOC_WPAKEY. ๐Ÿ”‘
  • IEEE80211_IOC_WEPTXKEY โ€” returns the number of the WEP key used for transmission into i_val. ๐Ÿ“ก
  • IEEE80211_IOC_WME โ€” returns whether 802.11e/WME/WMM support is enabled into i_val. This value will be non-zero when support is enabled and otherwise zero. โœจ
  • IEEE80211_IOC_WME_CWMIN โ€” returns the WME CWmin setting (log2) for the specified Access Class (AC) into i_val. The AC is passed in through i_len together with an optional IEEE80211_WMEPARAM_BSS flag to indicate if the parameter for the BSS or the channel is desired. If WME is not supported then EINVAL will be returned. ๐ŸŽ›๏ธ
  • IEEE80211_IOC_WME_CWMAX โ€” returns the WME CWmax setting (log2) for the specified Access Class (AC) into i_val. See IEEE80211_IOC_WME_CWMIN above for more details. ๐ŸŽš๏ธ
  • IEEE80211_IOC_WME_AIFS โ€” returns the WME AIFS setting for the specified Access Class (AC) into i_val. See IEEE80211_IOC_WME_CWMIN above for more details. ๐ŸŒธ
  • IEEE80211_IOC_WME_TXOPLIMIT โ€” returns the WME TxOpLimit (msec) for the specified Access Class (AC) into i_val. See IEEE80211_IOC_WME_CWMIN above for more details. โฑ๏ธ
  • IEEE80211_IOC_WME_ACM โ€” returns the WME Admission Control Mechanism (ACM) setting for the specified Access Class (AC) into i_val. This value is meaningful only for the BSS (not channel). See IEEE80211_IOC_WME_CWMIN above for more details. ๐Ÿšฆ
  • IEEE80211_IOC_WME_ACKPOLICY โ€” returns the WME ACK Policy setting for the specified Access Class (AC) into i_val. When this value is zero frames will be transmitted without waiting for an Acknowledgement. This value is meaningful only for the channel (not BSS). See IEEE80211_IOC_WME_CWMIN above for more details. ๐Ÿ‘€
  • IEEE80211_IOC_WPA โ€” returns the WPA configuration into i_val. Valid values are 0 (WPA is not enabled), 1 (WPA1 is enabled), 2 (WPA2/802.11i is enabled), and 3 (WPA1 and WPA2/802.11i are both enabled). ๐Ÿ”
  • IEEE80211_IOC_WPAIE โ€” returns any WPA information element for an associated station via i_data. The request passed in through i_data identifies the MAC address of the desired station. If an RSN (802.11i) element is present it is returned; otherwise any WPA element is returned. Note this request is deprecated; use IEEE80211_IOC_WPAIE2 instead. ๐Ÿ“œ
  • IEEE80211_IOC_WPAIE2 โ€” returns any WPA information elements for an associated station via i_data. The request passed in through i_data identifies the MAC address of the desired station. One or both of RSN (802.11i) and WPA elements may be returned. ๐Ÿงพ
  • IEEE80211_IOC_WPAKEY โ€” returns the requested cryptographic key in the buffer pointed to by i_data. The key number is specified in i_val and may be 0-3. A key number of zero is used to retrieve a station's unicast cipher key when operating with WPA enabled. If the user is not root then the key data returned is all zeros. ๐Ÿ—๏ธ
  • IEEE80211_IOC_WPS โ€” returns whether or not Wi-FI Protected Setup (WPS) is enabled into i_val. ๐ŸŽ€

okay now we flip to the set side, bestie. For SIOCS80211 the following values of i_type are valid. Note that changing a value on an interface that is running may cause the interface to โ€˜resetโ€™. Resets may be handled without altering the state if the parameter does not affect the MLME state (e.g. RTS threshold), but in some cases the interface may need to scan for a new network or clear state (including any associated stations); in that case the interface is said to be โ€˜restartedโ€™ (it is equivalent to marking the interface down and back up). The information below identifies whether changing a value affects the state of a running interface. ๐Ÿ‘‘

  • IEEE80211_IOC_ADDMAC โ€” adds an entry to the MAC address Access Control List (ACL) database using the value pointed to by i_data. The wlan_acl(4) module must be installed and enabled or EINVAL will be returned. ๐Ÿงฎ
  • IEEE80211_IOC_AMPDU โ€” sets whether or not AMPDU is enabled for transmit and/or receive using the value in i_val. This request causes a running interface operating on an HT channel to be reset. See IEEE80211_IOC_AMPDU above for details. ๐Ÿงฑ
  • IEEE80211_IOC_AMPDU_DENSITY โ€” sets the minimum density for bursting AMPDU frames to the value in i_val. This request causes a running interface to be reset. See IEEE80211_IOC_AMPDU_DENSITY above for details. ๐ŸŒพ
  • IEEE80211_IOC_AMPDU_LIMIT โ€” sets the limit on the size of AMPDU frames to the value in i_val. This request causes a running interface to be reset. See IEEE80211_IOC_AMPDU_LIMIT above for details. ๐Ÿ“
  • IEEE80211_IOC_AMSDU โ€” sets whether or not AMSDU is enabled for transmit and/or receive using the value in i_val. This request causes a running interface operating on an HT channel to be reset. See IEEE80211_IOC_AMSDU above for details. ๐Ÿงฉ
  • IEEE80211_IOC_AMSDU_LIMIT โ€” sets the limit on the size of AMSDU frames to the value in i_val. This request causes a running interface to be reset. See IEEE80211_IOC_AMSDU_LIMIT above for details. ๐Ÿ“
  • IEEE80211_IOC_APBRIDGE โ€” sets whether AP bridging is enabled using the value in i_val. See IEEE80211_IOC_APBRIDGE above for details. ๐ŸŒ‰
  • IEEE80211_IOC_APPIE โ€” sets an application information element using the data pointed to by i_data. This request causes a running interface to be restarted if the WPA information element is changed. See IEEE80211_IOC_APPIE above for details. ๐Ÿ“Ž
  • IEEE80211_IOC_AUTHMODE โ€” sets the current authentication mode using the value in i_val. This request causes a running interface to be restarted. See IEEE80211_IOC_AUTHMODE above for details. This request causes a running interface to be restarted. ๐Ÿ”
  • IEEE80211_IOC_BEACON_INTERVAL โ€” sets the time between Beacon frames (in TU) to the value in i_val. This request causes a running interface to be restarted. ๐Ÿ•ฐ๏ธ
  • IEEE80211_IOC_BGSCAN โ€” sets whether background scanning is enabled using the value in i_val. ๐Ÿ”
  • IEEE80211_IOC_BGSCAN_IDLE โ€” sets the minimum time (in msecs) a station must be idle before it will do a background scan to the value in i_val. ๐Ÿ˜ด
  • IEEE80211_IOC_BGSCAN_INTERVAL โ€” sets the minimum time (seconds) between background scan operations to the value in i_val. โณ
  • IEEE80211_IOC_BMISSTHRESHOLD โ€” sets the number of consecutive missed Beacon frames before the system will attempt to roam to the value in i_val. This request causes a running interface to be reset. ๐Ÿงญ
  • IEEE80211_IOC_BSSID โ€” sets the 802.11 MAC address for the desired BSS identifier according to i_data. This request causes a running interface to be restarted. ๐Ÿท๏ธ
  • IEEE80211_IOC_BURST โ€” sets whether or not packet bursting is enabled using the value in i_val. This request causes a running interface to be reset. ๐Ÿ’ฅ
  • IEEE80211_IOC_CHANNEL โ€” sets the desired/current channel to the value given by i_val. This request causes a running interface to immediately change to the specified channel if possible; otherwise the interface will be restarted. Note this request is deprecated; use IEEE80211_IOC_CURCHAN instead. ๐Ÿ“ป
  • IEEE80211_IOC_CHANLIST โ€” sets the list of available channels using the channel list pointed to by i_data. The channel list is a bit vector with bit N set to 1 if IEEE channel number N is available for use. The specified channel list is checked against the set of supported channels and any channels not supported are silently ignored. If the intersection of the channel list and the supported channels is empty EINVAL is returned. Note the current channel may be marked invalid after installing a new channel list. This request causes a running interface to be restarted. ๐Ÿ—บ๏ธ
  • IEEE80211_IOC_COUNTERMEASURES โ€” sets whether TKIP Countermeasures are enabled using the value in i_val. This request can only be used when the authentication mode is set WPA; otherwise EOPNOTSUPP will be returned. ๐Ÿ›ก๏ธ
  • IEEE80211_IOC_CURCHAN โ€” okay so bestie, this one sets the current channel using the info in i_data. ๐Ÿ’… it makes a running interface immediately switch to that channel if it can, otherwise the interface gets restarted. no cap.
  • IEEE80211_IOC_DELKEY โ€” deletes the key specified by the info in i_data. bye bye key ๐Ÿ—‘๏ธ.
  • IEEE80211_IOC_DELMAC โ€” removes an entry in the MAC address Access Control List (ACL) database using the value pointed to by i_data. the wlan_acl(4) module must be installed and enabled or you get EINVAL returned. periodt.
  • IEEE80211_IOC_DFS โ€” sets whether Dynamic Frequency Selection (DFS) is enabled using the value in i_val. this request will fail with EINVAL if 802.11h support isn't enabled. see IEEE80211_IOC_DFS above for the details. โœจ
  • IEEE80211_IOC_DOTD โ€” sets whether 802.11d support is enabled using the value in i_val. this request causes a running interface to be restarted. see IEEE80211_IOC_DOTD above for the deets.
  • IEEE80211_IOC_DOTH โ€” returns whether 802.11h support is enabled using the value in i_val. see IEEE80211_IOC_DOTH above for more.
  • IEEE80211_IOC_DROPUNENCRYPTED โ€” sets whether unencrypted packets transmit/received should be discarded using the value in i_val. security vibes ๐Ÿ”’.
  • IEEE80211_IOC_DTIM_PERIOD โ€” sets the period (in beacon intervals) between DTIM events to the value in i_val. this request causes a running interface to be restarted. โณ
  • IEEE80211_IOC_DWDS โ€” sets whether or not Dynamic WDS support is enabled using the value in i_val. see IEEE80211_IOC_DWDS above for details.
  • IEEE80211_IOC_FF โ€” sets whether Atheros fast-frames support is enabled using the value in i_val. this request causes a running interface to be restarted. see IEEE80211_IOC_FF above for the tea.
  • IEEE80211_IOC_FRAGTHRESHOLD โ€” sets the threshold (in bytes) for enabling fragmentation frames using the value in i_val. this request causes a running interface to be reset. see IEEE80211_IOC_FRAGTHRESHOLD above for details. ๐Ÿ“
  • IEEE80211_IOC_GREENFIELD โ€” sets whether or not Greenfield preamble use is enabled using the value in i_val. this request causes a running interface to be reset. see IEEE80211_IOC_GREENFIELD above for details. ๐ŸŒฟ
  • IEEE80211_IOC_HIDESSID โ€” sets whether SSID hiding/cloaking is enabled using the value in i_val. this request causes a running interface to be reset. see IEEE80211_IOC_HIDESSID above for details. ๐Ÿ•ต๏ธโ€โ™€๏ธ
  • IEEE80211_IOC_HTCOMPAT โ€” sets whether or not 802.11n compatibility support is enabled using the value in i_val. this request causes a running interface to be reset if operating on HT channel. see IEEE80211_IOC_HTCOMPAT above for details.
  • IEEE80211_IOC_HTCONF โ€” sets automatic promotion of HT channels using the value in i_val. this request causes a running interface to be restarted. see IEEE80211_IOC_HTCONF above for details.
  • IEEE80211_IOC_HTPROTMODE โ€” sets the technique used to protect HT frames in a mixed 802.11n network using the value in i_val. this request causes a running interface to be reset. see IEEE80211_IOC_HTPROTMODE above for details. ๐Ÿ›ก๏ธ
  • IEEE80211_IOC_HWMP_MAXHOPS โ€” sets the maximum acceptable hop count in an HWMP path according to i_val. values must be in the range [0-255]. ๐Ÿ‡
  • IEEE80211_IOC_HWMP_ROOTMODE โ€” sets the Mesh root mode operation according to i_val. valid values are IEEE80211_HWMP_ROOTMODE_DISABLED (root mode is disabled), IEEE80211_HWMP_ROOTMODE_NORMAL (send broadcast Path Request frames), IEEE80211_HWMP_ROOTMODE_PROACTIVE (send broadcast Path Request frames and force replies) and IEEE80211_HWMP_ROOTMODE_RANN (send broadcast Root Announcement (RANN) frames). so many options, so little time ๐Ÿ’….
  • IEEE80211_IOC_INACTIVITY โ€” sets whether or not the system handles inactivity processing using the value in i_val. when inactivity processing is enabled the system will track stations that have not transmitted frames and periodically probe them to check if they are still present. stations that are inactive and do not respond to probes are dropped. ghosting, but make it 802.11 ๐Ÿ‘ป.
  • IEEE80211_IOC_MACCMD โ€” changes the state of the MAC address Access Control List (ACL) system. there are several requests supported: IEEE80211_MACCMD_POLICY_OPEN (set the current policy to disable ACL use), IEEE80211_MACCMD_POLICY_ALLOW (set the current policy to allow only addresses listed in the database), IEEE80211_MACCMD_POLICY_DENY (set the current policy to deny addresses listed in the database), IEEE80211_MACCMD_POLICY_RADUS (set the current policy to enable use of a RADIUS backend), IEEE80211_MACCMD_FLUSH (flush all addresses from the database), and IEEE80211_MACCMD_DETACH (detach the ACL subsystem, disabling it). the wlan_acl(4) module must be installed or EINVAL will be returned. no module, no entry, bestie. ๐Ÿšซ
  • IEEE80211_IOC_MESH_AP โ€” sets whether or not Mesh AP support is enabled using i_val. โœจ
  • IEEE80211_IOC_MESH_FWRD โ€” sets whether or not packet forwarding support is enabled using i_val. forward that tea โ˜•๏ธ.
  • IEEE80211_IOC_MESH_ID โ€” sets the Mesh ID using the value pointed to by i_data. a Mesh ID can be up to IEEE80211_MESHID_LEN bytes long.
  • IEEE80211_IOC_MESH_PP_METRIC โ€” sets the link metric protocol using the value pointed to by i_data.
  • IEEE80211_IOC_MESH_PP_PATH โ€” sets the path selection protocol using the value pointed to by i_data.
  • IEEE80211_IOC_MESH_RTCMD โ€” manipulate the state of the Mesh routing tables. several requests are supported: IEEE80211_MESH_RTCMD_FLUSH (flush the contents of the routing table), IEEE80211_MESH_RTCMD_ADD (add an entry for the MAC address specified in i_data and start the Peer discovery process), and IEEE80211_MESH_RTCMD_DELETE (delete the entry corresponding to the MAC address specified in i_data). table management, but make it mesh ๐Ÿ•ธ๏ธ.
  • IEEE80211_IOC_MESH_TTL โ€” sets the Mesh Time To Live (TTL) setting installed in packets transmitted by this mesh node using i_val. don't let those packets live forever โฐ.
  • IEEE80211_IOC_MLME โ€” explicitly control the MLME state machine for a station using the MLME request pointed to by i_data. there are several MLME operations supported: IEEE80211_MLME_ASSOC (request association to an access point), IEEE80211_MLME_DIASSOC (diassociate the specified station), IEEE80211_MLME_DEAUTH (deauthenticate the specified station), IEEE80211_MLME_AUHORIZE (mark the specified station authorized to pass data frames), IEEE80211_MLME_UNAUTHORIZE (revoke the specified station's ability to pass data frames), and IEEE80211_MLME_AUTH (request authentication to an access point). note when this facility is used for stations operating in infrastructure mode the roaming mode should be set to manual. ๐Ÿ‘‘ (and yes, that's AUHORIZE spelled exactly like that, no cap.)
  • IEEE80211_IOC_POWERSAVE โ€” sets the current powersaving mode to the value in i_val. see IEEE80211_IOC_POWERSAVE above for valid values. this request causes a running interface to be reset. sleepy time ๐Ÿ˜ด.
  • IEEE80211_IOC_POWERSAVESLEEP โ€” sets the powersave sleep time in TU to the value in i_val. this request causes a running interface to be reset. ๐Ÿ’ค
  • IEEE80211_IOC_PRIVACY โ€” sets the current MLME setting for PRIVACY using the value in i_val. see IEEE80211_IOC_PRIVACY above for details. ๐Ÿ”
  • IEEE80211_IOC_PROTMODE โ€” sets the current 802.11g protection mode to the value in i_val. this request causes a running interface to be reset. see IEEE80211_IOC_PROTMODE above for details. this request causes a running interface to be reset. (and yes, it says that twice, they really wanted you to know ๐Ÿ˜ญ)
  • IEEE80211_IOC_PUREG โ€” sets whether ``pure 11g'' mode is enabled using the value in i_val. this request causes a running interface to be restarted. see IEEE80211_IOC_PUREG above for details. โœจ
  • IEEE80211_IOC_PUREN โ€” sets whether ``pure 11n'' mode is enabled using the value in i_val. this request causes a running interface to be restarted. see IEEE80211_IOC_PUREN above for details. ๐ŸŒˆ
  • IEEE80211_IOC_REGDOMAIN โ€” sets the regulatory state using the data referenced by i_data. this request can only be issued when all interfaces cloned from the underlying physical device are marked down; otherwise EBUSY is returned. note the new regulatory data may invalidate any desired channel. rules are rules ๐Ÿ“œ.
  • IEEE80211_IOC_RIFS โ€” sets whether or not Reduced InterFrame Spacing (RIFS) is enabled using the value in i_val. this setting is meaningful only when operating with 802.11n on an HT channel. this request causes a running interface to be reset. โšก
  • IEEE80211_IOC_ROAM โ€” sets station roaming parameters using the data pointed to by i_data. wanderlust ๐Ÿงญ.
  • IEEE80211_IOC_ROAMING โ€” sets the current roaming mode to the value in i_val. see IEEE80211_IOC_ROAMING above for details.
  • IEEE80211_IOC_RTSTHRESHOLD โ€” sets the threshold (in bytes) for enabling transmission of RTS frames to the value in i_val. this request causes a running interface to be reset. see IEEE80211_IOC_RTSTHRESHOLD above for details. ๐Ÿ“ถ
  • IEEE80211_IOC_SCANVALID โ€” sets the age (in seconds) that results from a scan operation will be considered valid. when scan results are no longer valid and they are needed (e.g. to roam) the system will initiate a scan operation to replenish the scan cache. out with the old, in with the new ๐Ÿงน.
  • IEEE80211_IOC_SCAN_REQ โ€” request a scan operation using the parameters pointed to by i_val. the underlying device must be running or ENXIO will be returned. values for sr_duration, sr_mindwell, and sr_maxdwell shorter than 1 clock tick are rounded up to a tick. if more SSID's are supplied than the system is capable of handling the extra ones are silently ignored. if a scan operation is already in progress the request will be (silently) ignored. silence is golden ๐Ÿคซ.
  • IEEE80211_IOC_SCAN_CANCEL โ€” cancel any pending/active scan operation. nope, not today ๐Ÿ›‘.
  • IEEE80211_IOC_SHORTGI โ€” turns Short Guard Interval (SGI) on or off, using whatever's sitting in i_val. Heads up bestie: SGI only does anything when you're on an HT (802.11n) channel, so don't come crying to me if you flip it on a non-HT vibe. Also, this one resets a running interface, so yeah, she's going down for a sec. ๐Ÿ’…
  • IEEE80211_IOC_SMPS โ€” sets the Spatial Multiplexing Power Save (SMPS) setting to the value in i_val. This request causes a running interface to be reset. See IEEE80211_IOC_SMPS above for the tea. โœจ
  • IEEE80211_IOC_SSID โ€” sets the SSID you're thirsting for, using the value pointed to by i_data. The string can be at most IEEE80211_NWID_LEN bytes โ€” no going over, that's the limit fr fr. This request causes a running interface to be restarted. ๐Ÿฆ‹
  • IEEE80211_IOC_STA_STATS โ€” wipes all the accumulated statistics for the station you picked. Fresh start, clean slate, main character energy. โœจ
  • IEEE80211_IOC_STA_VLAN โ€” sets the VLAN tag for the station you specified, using the info pointed to by i_data.
  • IEEE80211_IOC_TDMA_BINTERVAL โ€” sets how long the gap between Beacon frames is, to the value in i_val. Values must be positive. This request causes a running interface to be reset. ๐ŸŽ€
  • IEEE80211_IOC_TDMA_SLOT โ€” sets the current TDMA slot to the value in i_val. Values must be in the range [0-slotcnt]. Slot 0 is literally the master of the TDMA network โ€” and if it's running, it will immediately start sending Beacon frames. ๐Ÿ‘‘
  • IEEE80211_IOC_TDMA_SLOTCNT โ€” sets the number of slots in the TDMA network to the value in i_val. This request causes a running interface to be reset.
  • IEEE80211_IOC_TDMA_SLOTLEN โ€” sets the length of the TDMA slot assigned to each station in the network, to the value in i_val. Slot lengths must be in the range 200 usecs to 1024 milliseconds (though ngl, values outside the range 1-200ms are unlikely to work well โ€” consider that a soft warning, bestie). This request causes a running interface to be reset. ๐Ÿ’€
  • IEEE80211_IOC_TSN โ€” turns Transitional Security Network (TSN) on or off, using the value in i_val.
  • IEEE80211_IOC_TURBOP โ€” turns Atheros Dynamic Turbo mode on or off, using the value in i_val. This request causes a running interface to be restarted. ๐Ÿ”ฅ
  • IEEE80211_IOC_TXPARAMS โ€” sets transmit parameters using the data pointed to by i_data. This request causes a running interface to be restarted.
  • IEEE80211_IOC_TXPOWER โ€” sets the maximum transmit power limit, measured in .5 dBm units, to the value in i_val. This request causes a running interface to be reset. โšก
  • IEEE80211_IOC_WEP โ€” sets the current WEP mode to the value in i_val. See IEEE80211_IOC_WEP above for the valid values. This request causes a running interface to be restarted.
Not me warning you again: this request is deprecated. Use IEEE80211_IOC_PRIVACY and IEEE80211_IOC_DROPUNENCRYPTED instead. Periodt. ๐Ÿ™ˆ
  • IEEE80211_IOC_WEPKEY โ€” sets the WEP key indicated by i_val, using the data pointed to by i_data.
Also deprecated, bestie: use IEEE80211_IOC_WPAKEY instead. ๐Ÿ’€
  • IEEE80211_IOC_WEPTXKEY โ€” sets the default transmit key used for transmission, to the value in i_val.
  • IEEE80211_IOC_WME โ€” turns WME/WMM support on or off, using the value in i_val. This request causes a running interface to be reset. ๐ŸŽ€
  • IEEE80211_IOC_WME_ACKPOLICY โ€” sets the WME ACK Policy for the Access Class (AC) specified in i_len, using the value in i_val.
  • IEEE80211_IOC_WME_ACM โ€” sets the WME Admission Control Mechanism for the Access Class (AC) specified in i_len, using the value in i_val.
  • IEEE80211_IOC_WME_AIFS โ€” sets the WME AIFS parameter for the Access Class (AC) specified in i_len, using the value in i_val.
  • IEEE80211_IOC_WME_CWMAX โ€” sets the WME CWmax parameter for the Access Class (AC) specified in i_len, using the value in i_val.
  • IEEE80211_IOC_WME_CWMIN โ€” sets the WME CWmin parameter for the Access Class (AC) specified in i_len, using the value in i_val.
  • IEEE80211_IOC_WME_TXOPLIMIT โ€” sets the WME TxOpLimit parameter for the Access Class (AC) specified in i_len, using the value in i_val.
  • IEEE80211_IOC_WPA โ€” sets the WPA configuration using the value in i_val. This request causes a running interface to be reset. See IEEE80211_IOC_WPA above for the details. ๐Ÿ”
  • IEEE80211_IOC_WPAKEY โ€” sets the requested cryptographic key using the data in the buffer pointed to by i_data. See IEEE80211_IOC_WPAKEY for details.
  • IEEE80211_IOC_WPS โ€” turns Wi-Fi Protected Setup (WPS) on or off, using the value in i_val. ๐ŸŒˆ

๐Ÿ” SEE ALSO ๐Ÿ”

Okay so if you wanna go deeper (and you should, she's iconic), go read:


๐Ÿ’– and that's the whole page, bestie ๐Ÿ’–

This one's a Debian production, dated August 7, 2020, and it's filed under NET80211(4) โ€” go forth and configure your wireless like the main character you are. slay ๐Ÿซถโœจ

๐Ÿ“ฆ where this page comes from