NET80211(4)
โจ NAME โจ
net80211 โ standard interface to IEEE 802.11 devices
๐ 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 is literally the standard programming interface for configuring and grabbing status info from IEEE 802.11 devices that depend on the wlan(4) module to operate. you talk to them through 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, and it is defined exactly like this:
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 ini_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), and3(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 ini_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), and7(16 usec).IEEE80211_IOC_AMPDU_LIMITโ returns the limit on the size of AMPDU frames ini_val. the value returned is one of:0(8 kilobytes),1(16 kilobytes),2(32 kilobytes), and3(64 kilobytes).IEEE80211_IOC_AMSDUโ returns whether or not AMSDU is enabled ini_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), and3(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 ini_val. the value returned is one of:3839(bytes) and7935(bytes). note these values are specified by 802.11n; arbitrary values are not allowed.IEEE80211_IOC_APBRIDGEโ returns whether AP bridging is enabled ini_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 viai_data. application IE's are maintained for many 802.11 frames; the request must identify the frame to return an IE for ini_val. for example, to retrieve the IE sent in each Beacon framei_valwould be set toIEEE80211_FC0_SUBTYPE_BEACON | IEEE80211_FC0_TYPE_MGT. if no information element is installed thenEINVALis 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 ini_val. valid values areIEEE80211_AUTH_NONE(no authentication),IEEE80211_AUTH_OPEN(open authentication),IEEE80211_AUTH_SHARED(shared key authentication),IEEE80211_AUTH_8021X(802.1x only authentication), andIEEE80211_AUTH_WPA(WPA/802.11i/802.1x authentication).IEEE80211_IOC_BEACON_INTERVALโ returns the time between Beacon frames (in TU) ini_val.IEEE80211_IOC_BGSCANโ returns whether background scanning is enabled ini_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 alsoIEEE80211_IOC_BGSCAN_IDLEandIEEE80211_IOC_BGSCAN_INTERVAL.IEEE80211_IOC_BGSCAN_IDLEโ returns ini_valthe minimum time (msecs) a station must be idle (i.e. not transmitting or receiving frames) before it will do a background scan. see alsoIEEE80211_IOC_BGSCAN_INTERVAL.IEEE80211_IOC_BGSCAN_INTERVALโ returns ini_valthe minimum time (seconds) between background scan operations. see alsoIEEE80211_IOC_BGSCAN_IDLE.IEEE80211_IOC_BMISSTHRESHOLDโ returns ini_valthe 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 viai_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 ini_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 viai_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 viai_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 ini_val. note this request is deprecated; useIEEE80211_IOC_CURCHANinstead.IEEE80211_IOC_COUNTERMEASURESโ returns whether TKIP Countermeasures are enabled ini_val. this value will be non-zero when Countermeasures are enabled and otherwise zero.IEEE80211_IOC_CURCHANโ returns information for the current channel viai_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 byi_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 ini_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 ini_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 ini_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, ini_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 ini_val.IEEE80211_IOC_DWDSโ drops whether Dynamic WDS support is turned on intoi_val๐. Dynamic WDS is the whole facility where packets can get tunneled over normal Infrastructure BSS associations using 4-address (WDS) frames. cute.IEEE80211_IOC_FFโ tells you, viai_val, if Atheros fast-frames support is enabled โก. Fast-frames is a non-standard protocol extension that aggregates multiple frames to level up throughput. > heads up bestie: enabling fast-frames support does not guarantee it gets used โ the client and access point have to negotiate that themselves, iykyk.IEEE80211_IOC_FRAGTHRESHOLDโ the threshold (in bytes) for kicking on fragmentation frames, right there ini_val๐. Any packet bigger than this value gets automatically split into multiple fragmented frames that are sent one after the other.IEEE80211_IOC_GREENFIELDโ returns ini_valwhether Greenfield preamble use is enabled or not ๐ฟ. This setting is basically only meaningful when you're operating with 802.11n on an HT channel.IEEE80211_IOC_HIDESSIDโ tells you, ini_val, if SSID hiding/cloaking is enabled ๐. SSID hiding only makes sense when you're operating as an access point. When it's on, Beacon frames do not include the SSID, and ProbeRequest frames are not answered unless they include the AP's SSID. The value is non-zero when SSID hiding is enabled and zero otherwise.IEEE80211_IOC_HTCOMPATโ returns ini_valwhether 802.11n compatibility support is enabled ๐ซ. The 802.11n protocol specification went through several incompatible iterations, so some vendors implemented 11n support to older specifications that will not interoperate with a purely 11n-compliant station. In particular, the information elements included in management frames for old devices are different. When compatibility support is enabled, both standard and compatible data will be provided and/or accepted.IEEE80211_IOC_HTCONFโ drops the setting for automatic promotion of HT channels intoi_val๐ถ. Promotion kicks in when the system has to select a channel and might choose between legacy, HT20, and HT40 operation (like when it's scanning). Valid values are:0โ do not promote, use legacy1โ promote to HT202โ promote to HT40
IEEE80211_IOC_HTPROTMODEโ the technique used to protect HT frames in a mixed 802.11n network, ini_val๐ก๏ธ. Valid values are:IEEE80211_PROTMODE_OFFโ no protection enabledIEEE80211_PROTMODE_RTSCTSโ send RTS and wait for CTS
IEEE80211_IOC_HWMP_MAXHOPSโ the maximum acceptable hop count in an HWMP path, handed back ini_val๐ฆ.IEEE80211_IOC_HWMP_ROOTMODEโ the setting for Mesh root mode operation ini_val๐. Valid values are:IEEE80211_HWMP_ROOTMODE_DISABLEDโ root mode is disabledIEEE80211_HWMP_ROOTMODE_NORMALโ send broadcast Path Request framesIEEE80211_HWMP_ROOTMODE_PROACTIVEโ send broadcast Path Request frames and force repliesIEEE80211_HWMP_ROOTMODE_RANNโ send broadcast Root Announcement (RANN) frames
IEEE80211_IOC_IC_NAMEโ the underlying hardwaredevice(9)name goes in the buffer pointed to byi_data, and the name length including the terminatingNULcharacter goes ini_len๐ท๏ธ. If the buffer length is too small to hold the full name,EINVALgets returned.IEEE80211_IOC_INACTIVITYโ whether the system handles inactivity processing, ini_val๐ด. When inactivity processing is enabled, the system tracks stations that haven't transmitted frames and periodically probes them to check if they're still present. Stations that are inactive and don't respond to probes get dropped. bye bestie.IEEE80211_IOC_MACCMDโ info about the state of the MAC address access control list (ACL) system ๐. There are two requests supported:IEEE80211_MACCMD_POLICYโ retrieve the current policy ini_valIEEE80211_MACCMD_LISTโ retrieve the list of installed/active ACL's viai_data
thewlan_acl(4)module has to be installed and enabled, or you'll getEINVALback. no exceptions ๐
IEEE80211_IOC_MESH_APโ whether Mesh AP support is enabled, dropped intoi_val๐ธ๏ธ.IEEE80211_IOC_MESH_IDโ the Mesh ID, in the buffer pointed to byi_data๐.IEEE80211_IOC_MESH_FWRDโ whether packet forwarding support is enabled, ini_val๐จ.IEEE80211_IOC_MESH_PP_METRICโ the link metric protocol, in the buffer pointed to byi_data๐.IEEE80211_IOC_MESH_PP_PATHโ the path selection protocol, in the buffer pointed to byi_data๐ฃ๏ธ.IEEE80211_IOC_MESH_RTCMDโ info about the state of the Mesh routing tables ๐. Exactly one request is supported:IEEE80211_MESH_RTCMD_LIST, which retrieves the contents of the routing table in the buffer pointed to byi_data.IEEE80211_IOC_MESH_TTLโ the Mesh Time To Live (TTL) setting installed in packets transmitted by this mesh node, ini_valโณ.IEEE80211_IOC_NUMSSIDSโ the number of SSIDs supported, ini_val๐ข.IEEE80211_IOC_NUMWEPKEYSโ the number of WEP keys supported, ini_val๐.IEEE80211_IOC_POWERSAVEโ the current powersaving mode ini_val๐ค. Valid values are:IEEE80211_POWERSAVE_OFFโ power save operation is disabledIEEE80211_POWERSAVE_ONโ power save operation is enabled
IEEE80211_IOC_POWERSAVESLEEPโ the powersave sleep time in TU, ini_val๐. This value is also termed the listen interval, and it represents the maximum time a station will sleep before waking to retrieve packets buffered by an access point.IEEE80211_IOC_PRIVACYโ the current MLME setting for PRIVACY, ini_val๐. When PRIVACY is enabled, all data packets must be encrypted. The value will be zero if PRIVACY is disabled and non-zero when PRIVACY is enabled.IEEE80211_IOC_PROTMODEโ the current 802.11g protection mode ini_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 enabledIEEE80211_PROTMODE_CTSโ send CTS to yourselfIEEE80211_PROTMODE_RTSCTSโ send RTS and wait for CTS
IEEE80211_IOC_PUREGโ whether ``pure 11g'' mode is enabled, ini_val๐. This setting is meaningful only for access point operation; when it's non-zero, 802.11b stations will not be allowed to associate. sorry not sorry.IEEE80211_IOC_PURENโ whether ``pure 11n'' mode is enabled, ini_val๐. This one is also meaningful only for access point operation; when it's non-zero, legacy (non-11n capable) stations will not be allowed to associate.IEEE80211_IOC_REGDOMAINโ the regulatory state, in the buffer pointed to byi_data๐.IEEE80211_IOC_RIFSโ whether Reduced InterFrame Spacing (RIFS) is enabled, ini_valโฑ๏ธ. This setting is meaningful only when operating with 802.11n on an HT channel.IEEE80211_IOC_ROAMโ station roaming parameters, in the buffer pointed to byi_data๐ถโโ๏ธ.IEEE80211_IOC_ROAMINGโ the current roaming mode ini_val๐งญ. Roaming mode specifies which entity controls operation of the MLME state machine when operating as a station in an Infrastructure BSS. Valid values are:IEEE80211_ROAMING_DEVICEโ driver/firmware is in controlIEEE80211_ROAMING_AUTOโ host 802.11 layer is in controlIEEE80211_ROAMING_MANUALโ application is in control
IEEE80211_IOC_RTSTHRESHOLDโ the threshold (in bytes) for enabling transmission of RTS frames, ini_val๐ฎ. Packets larger than this value will automatically have an RTS frame sent preceding them to reduce the likelihood of packet loss.IEEE80211_IOC_SCAN_RESULTSโ the current contents of the scan cache, sitting in the data area pointed to byi_data๐.IEEE80211_IOC_SCANVALIDโ how long (in seconds) results from a scan operation will be considered valid, ini_valโฒ๏ธ. When scan results are no longer valid and they're needed (like, to roam), the system will initiate a scan operation to replenish the scan cache.IEEE80211_IOC_SHORTGIโ whether Short Guard Interval (SGI) is enabled, ini_val๐ธ. Note: SGI is only used when operating with 802.11n on an HT channel.IEEE80211_IOC_SMPSโ the Spatial Multiplexing Power Save (SMPS) setting ini_val๐ค. This setting is meaningful only when operating with 802.11n on an HT channel. Valid values are:IEEE80211_HTCAP_SMPS_DYNAMICโ Dynamic SMPS is enabledIEEE80211_HTCAP_SMPS_ENAโ Static SMPS is enabledIEEE80211_HTCAP_SMPS_OFFโ SMPS is disabled
IEEE80211_IOC_SSIDโ the requested SSID, in the buffer pointed to byi_data๐ก. Ifi_valis โฅ 0 then the request refers to the configured value for that slot. Generally0is the only valid value, but some interfaces support more SSIDs.IEEE80211_IOC_STA_INFOโ info about the current state of the specified station(s) viai_data๐งโ๐คโ๐ง. The MAC address of a single station may be passed in, or, if the broadcast address is supplied, information about all stations will be returned. If a single station is requested and the MAC address is unknown thenENOENTwill be returned.IEEE80211_IOC_STA_STATSโ collected statistics for the specified station viai_data๐. The MAC address of the desired station is passed in; if it's unknown,ENOENTwill be returned.IEEE80211_IOC_STA_VLANโ any VLAN tag assigned to a station, viai_data๐ท๏ธ.IEEE80211_IOC_TDMA_SLOTโ the slot number for the station, ini_val๐ฐ. Slot number zero is the master station in a TDMA network.IEEE80211_IOC_TDMA_SLOTCNTโ the count of slots in the TDMA network, ini_val๐ข.IEEE80211_IOC_TDMA_SLOTLENโ the length (in usecs) of the TDMA slot assigned to each station in the network, ini_valโณ.IEEE80211_IOC_TDMA_BINTERVALโ hands you the number of superframes that sit between Beacon frames, dropped intoi_val. And because math class never ends: a TDMA network with N slots and slot length T has a superframe of NxT. ๐ธIEEE80211_IOC_TSNโ tells you whether Transitional Security Network (TSN) is enabled or not, ini_val.IEEE80211_IOC_TURBOPโ returns whether Atheros Dynamic Turbo mode is enabled ini_val. Okay so what is Dynamic Turbo mode? It's a non-standard protocol extension that exists only on Atheros devices, where the channel width gets dynamically flipped between 20MHz and 40MHz. ๐ฅ And before you get too excited: enabling Dynamic Turbo mode support does not guarantee you'll actually get to use it โ both the client and the access point have to be Atheros devices, and support has to be enabled on both sides. No cap.IEEE80211_IOC_TXPARAMSโ returns transmit parameters in the buffer thati_datapoints to.IEEE80211_IOC_TXPOWERโ returns the transmit power limit in .5 dBm units ini_val. This value represents the effective maximum, and it's calculated according to the maximum power allowed by local regulations, any user-specified power limit, and the maximum power the device is capable of. It's giving "we did the math for you." ๐IEEE80211_IOC_TXPOWMAXโ returns the user-specified maximum transmit power in .5 dBm units ini_val. The maximum setting is applied after any regulatory cap, iykyk.IEEE80211_IOC_WEPโ returns the current WEP status ini_val. Valid values are:IEEE80211_WEP_ON(enabled for all packets sent and received),IEEE80211_WEP_OFF(disabled), andIEEE80211_WEP_MIXED(enabled for transmit and receive but also willing to receive unencrypted frames). โ ๏ธ Heads up bestie โ this request is deprecated; useIEEE80211_IOC_PRIVACYandIEEE80211_IOC_UNENCRYPTEDinstead.IEEE80211_IOC_WEPKEYโ returns the requested WEP key viai_data. The key number is specified ini_valand may be0-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 ofIEEE80211_IOC_WPAKEY.IEEE80211_IOC_WEPTXKEYโ returns the number of the WEP key used for transmission ini_val.IEEE80211_IOC_WMEโ returns whether 802.11e/WME/WMM support is enabled ini_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) ini_val. The AC is passed in throughi_len, together with an optionalIEEE80211_WMEPARAM_BSSflag to indicate if the parameter for the BSS or the channel is desired. If WME is not supported thenEINVALwill be returned. ๐IEEE80211_IOC_WME_CWMAXโ returns the WME CWmax setting (log2) for the specified Access Class (AC) ini_val. SeeIEEE80211_IOC_WME_CWMINabove for more details.IEEE80211_IOC_WME_AIFSโ returns the WME AIFS setting for the specified Access Class (AC) ini_val. SeeIEEE80211_IOC_WME_CWMINabove for more details.IEEE80211_IOC_WME_TXOPLIMITโ returns the WME TxOpLimit (msec) for the specified Access Class (AC) ini_val. SeeIEEE80211_IOC_WME_CWMINabove for more details.IEEE80211_IOC_WME_ACMโ returns the WME Admission Control Mechanism (ACM) setting for the specified Access Class (AC) ini_val. This value is meaningful only for the BSS (not channel). SeeIEEE80211_IOC_WME_CWMINabove for more details.IEEE80211_IOC_WME_ACKPOLICYโ returns the WME ACK Policy setting for the specified Access Class (AC) ini_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). SeeIEEE80211_IOC_WME_CWMINabove for more details.IEEE80211_IOC_WPAโ returns the WPA configuration ini_val. Valid values are0(WPA is not enabled),1(WPA1 is enabled),2(WPA2/802.11i is enabled), and3(WPA1 and WPA2/802.11i are both enabled). Slay, all four of them. โจIEEE80211_IOC_WPAIEโ returns any WPA information element for an associated station viai_data. The request passed in throughi_dataidentifies 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 โ useIEEE80211_IOC_WPAIE2instead.IEEE80211_IOC_WPAIE2โ returns any WPA information elements for an associated station viai_data. The request passed in throughi_dataidentifies 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 byi_data. The key number is specified ini_valand may be0-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 ini_val.
Okay bestie, deep breath, because this next part is the setter era. ๐ซถ
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 be โ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.
๐จ Real talk: setters can straight-up restart your interface. Your associated stations may vanish. Read the "causes a reset / restart" note on each one before you poke it, fr fr.
IEEE80211_IOC_ADDMACโ add an entry to the MAC address Access Control List (ACL) database using the value pointed to byi_data. Thewlan_acl(4)module must be installed and enabled, orEINVALwill be returned. ๐IEEE80211_IOC_AMPDUโ set whether or not AMPDU is enabled for transmit and/or receive using the value ini_val. โ ๏ธ This request causes a running interface operating on an HT channel to be reset. SeeIEEE80211_IOC_AMPDUabove for details.IEEE80211_IOC_AMPDU_DENSITYโ set the minimum density for bursting AMPDU frames to the value ini_val. โ ๏ธ This request causes a running interface to be reset. SeeIEEE80211_IOC_AMPDU_DENSITYabove for details.IEEE80211_IOC_AMPDU_LIMITโ set the limit on the size of AMPDU frames to the value ini_val. โ ๏ธ This request causes a running interface to be reset. SeeIEEE80211_IOC_AMPDU_LIMITabove for details.IEEE80211_IOC_AMSDUโ set whether or not AMSDU is enabled for transmit and/or receive using the value ini_val. โ ๏ธ This request causes a running interface operating on an HT channel to be reset. SeeIEEE80211_IOC_AMSDUabove for details.IEEE80211_IOC_AMSDU_LIMITโ set the limit on the size of AMSDU frames to the value ini_val. โ ๏ธ This request causes a running interface to be reset. SeeIEEE80211_IOC_AMSDU_LIMITabove for details.IEEE80211_IOC_APBRIDGEโ set whether AP bridging is enabled using the value ini_val. SeeIEEE80211_IOC_APBRIDGEabove for details.IEEE80211_IOC_APPIEโ set an application information element using the data pointed to byi_data. โ ๏ธ This request causes a running interface to be restarted if the WPA information element is changed. SeeIEEE80211_IOC_APPIEabove for details.IEEE80211_IOC_AUTHMODEโ set the current authentication mode using the value ini_val. โ ๏ธ This request causes a running interface to be restarted. SeeIEEE80211_IOC_AUTHMODEabove for details. This request causes a running interface to be restarted. (Yes, it says it twice in the original and honestly? Same. It's that serious. ๐ญ)IEEE80211_IOC_BEACON_INTERVALโ set the time between Beacon frames (in TU) to the value ini_val. โ ๏ธ This request causes a running interface to be restarted.IEEE80211_IOC_BGSCANโ set whether background scanning is enabled using the value ini_val.IEEE80211_IOC_BGSCAN_IDLEโ set the minimum time (in msecs) a station must be idle before it will do a background scan to the value ini_val.IEEE80211_IOC_BGSCAN_INTERVALโ set the minimum time (seconds) between background scan operations to the value ini_val.IEEE80211_IOC_BMISSTHRESHOLDโ set the number of consecutive missed Beacon frames before the system will attempt to roam to the value ini_val. โ ๏ธ This request causes a running interface to be reset.IEEE80211_IOC_BSSIDโ set the 802.11 MAC address for the desired BSS identifier according toi_data. โ ๏ธ This request causes a running interface to be restarted.IEEE80211_IOC_BURSTโ set whether or not packet bursting is enabled using the value ini_val. โ ๏ธ This request causes a running interface to be reset.IEEE80211_IOC_CHANNELโ set the desired/current channel to the value given byi_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; useIEEE80211_IOC_CURCHANinstead.IEEE80211_IOC_CHANLISTโ set the list of available channels using the channel list pointed to byi_data. The channel list is a bit vector with bit N set to1if 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 (๐ rude but okay). If the intersection of the channel list and the supported channels is empty,EINVALis 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โ set whether TKIP Countermeasures are enabled using the value ini_val. This request can only be used when the authentication mode is set WPA; otherwiseEOPNOTSUPPwill be returned. ๐IEEE80211_IOC_CURCHANโ Sets the current channel using the info thati_datapoints at ๐ฏ. If a running interface can switch to that channel immediately, it does โ otherwise the interface gets restarted (no cap, it just yeets itself back up). ๐IEEE80211_IOC_DELKEYโ Deletes the key specified by the info referenced byi_data๐๏ธ. Bye-bye key, you will not be missed.IEEE80211_IOC_DELMACโ Removes an entry in the MAC address Access Control List (ACL) database using the value pointed to byi_data๐ซ. Thewlan_acl(4)module must be installed and enabled โ otherwise you getEINVAL, periodt.IEEE80211_IOC_DFSโ Sets whether Dynamic Frequency Selection (DFS) is enabled usingi_val๐ก. This request will fail withEINVALif 802.11h support is not enabled. SeeIEEE80211_IOC_DFSabove for the details, bestie.IEEE80211_IOC_DOTDโ Sets whether 802.11d support is enabled usingi_val๐. This request causes a running interface to be restarted. SeeIEEE80211_IOC_DOTDabove for details.IEEE80211_IOC_DOTHโ Returns whether 802.11h support is enabled usingi_val๐ถ. SeeIEEE80211_IOC_DOTHabove for details.IEEE80211_IOC_DROPUNENCRYPTEDโ Sets whether unencrypted packets transmit/received should be discarded usingi_val๐. Security vibe check: enabled means no plaintext shenanigans.IEEE80211_IOC_DTIM_PERIODโ Sets the period (in beacon intervals) between DTIM events to the value ini_valโณ. This request causes a running interface to be restarted.IEEE80211_IOC_DWDSโ Sets whether Dynamic WDS support is enabled usingi_val๐. SeeIEEE80211_IOC_DWDSabove for details.IEEE80211_IOC_FFโ Sets whether Atheros fast-frames support is enabled usingi_valโก. This request causes a running interface to be restarted. SeeIEEE80211_IOC_FFabove for details.IEEE80211_IOC_FRAGTHRESHOLDโ Sets the threshold (in bytes) for enabling fragmentation frames usingi_val๐งฉ. This request causes a running interface to be reset. SeeIEEE80211_IOC_FRAGTHRESHOLDabove for details.IEEE80211_IOC_GREENFIELDโ Sets whether or not Greenfield preamble use is enabled usingi_val๐ฟ. This request causes a running interface to be reset. SeeIEEE80211_IOC_GREENFIELDabove for details.IEEE80211_IOC_HIDESSIDโ Sets whether SSID hiding/cloaking is enabled usingi_val๐. This request causes a running interface to be reset. SeeIEEE80211_IOC_HIDESSIDabove for details.IEEE80211_IOC_HTCOMPATโ Sets whether or not 802.11n compatibility support is enabled usingi_val๐. This request causes a running interface to be reset if operating on an HT channel. SeeIEEE80211_IOC_HTCOMPATabove for details.IEEE80211_IOC_HTCONFโ Sets automatic promotion of HT channels usingi_val๐. This request causes a running interface to be restarted. SeeIEEE80211_IOC_HTCONFabove for details.IEEE80211_IOC_HTPROTMODEโ Sets the technique used to protect HT frames in a mixed 802.11n network usingi_val๐ก๏ธ. This request causes a running interface to be reset. SeeIEEE80211_IOC_HTPROTMODEabove for details.IEEE80211_IOC_HWMP_MAXHOPSโ Sets the maximum acceptable hop count in an HWMP path according toi_val๐ฆ. Values must be in the range[0-255]โ no out-of-bounds hopscotch, bestie.IEEE80211_IOC_HWMP_ROOTMODEโ Sets the Mesh root mode operation according toi_val๐ณ. Valid values are:IEEE80211_HWMP_ROOTMODE_DISABLEDโ root mode is disabledIEEE80211_HWMP_ROOTMODE_NORMALโ send broadcast Path Request framesIEEE80211_HWMP_ROOTMODE_PROACTIVEโ send broadcast Path Request frames and force repliesIEEE80211_HWMP_ROOTMODE_RANNโ send broadcast Root Announcement (RANN) frames
IEEE80211_IOC_INACTIVITYโ Sets whether or not the system handles inactivity processing usingi_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 (ghosted, honestly). ๐ป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 useIEEE80211_MACCMD_POLICY_ALLOWโ set the current policy to allow only addresses listed in the databaseIEEE80211_MACCMD_POLICY_DENYโ set the current policy to deny addresses listed in the databaseIEEE80211_MACCMD_POLICY_RADUSโ set the current policy to enable use of a RADIUS backendIEEE80211_MACCMD_FLUSHโ flush all addresses from the databaseIEEE80211_MACCMD_DETACHโ detach the ACL subsystem, disabling it
The wlan_acl(4) module must be installed or EINVAL will be returned. No module, no ACL magic. โจ
IEEE80211_IOC_MESH_APโ Sets whether or not Mesh AP support is enabled usingi_val๐ธ๏ธ.IEEE80211_IOC_MESH_FWRDโ Sets whether or not packet forwarding support is enabled usingi_val๐ฆ.IEEE80211_IOC_MESH_IDโ Sets the Mesh ID using the value pointed to byi_data๐ท๏ธ. A Mesh ID can be up toIEEE80211_MESHID_LENbytes long.IEEE80211_IOC_MESH_PP_METRICโ Sets the link metric protocol using the value pointed to byi_data๐.IEEE80211_IOC_MESH_PP_PATHโ Sets the path selection protocol using the value pointed to byi_data๐ฃ๏ธ.IEEE80211_IOC_MESH_RTCMDโ Manipulates the state of the Mesh routing tables ๐บ๏ธ. Several requests are supported:IEEE80211_MESH_RTCMD_FLUSHโ flush the contents of the routing tableIEEE80211_MESH_RTCMD_ADDโ add an entry for the MAC address specified ini_dataand start the Peer discovery processIEEE80211_MESH_RTCMD_DELETEโ delete the entry corresponding to the MAC address specified ini_data
IEEE80211_IOC_MESH_TTLโ Sets the Mesh Time To Live (TTL) setting installed in packets transmitted by this mesh node usingi_valโฒ๏ธ.IEEE80211_IOC_MLMEโ Explicitly controls the MLME state machine for a station using the MLME request pointed to byi_data๐ฎ. There are several MLME operations supported:IEEE80211_MLME_ASSOCโ request association to an access pointIEEE80211_MLME_DIASSOCโ diassociate the specified stationIEEE80211_MLME_DEAUTHโ deauthenticate the specified stationIEEE80211_MLME_AUHORIZEโ mark the specified station authorized to pass data frames (yes, that's how it's spelled in the original โ we don't fix it, we respect it)IEEE80211_MLME_UNAUTHORIZEโ revoke the specified station's ability to pass data framesIEEE80211_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. ๐ง
IEEE80211_IOC_POWERSAVEโ Sets the current powersaving mode to the value ini_val๐. SeeIEEE80211_IOC_POWERSAVEabove for valid values. This request causes a running interface to be reset.IEEE80211_IOC_POWERSAVESLEEPโ Sets the powersave sleep time in TU to the value ini_val๐ด. This request causes a running interface to be reset.IEEE80211_IOC_PRIVACYโ Sets the current MLME setting for PRIVACY using the value ini_val๐ต๏ธ. SeeIEEE80211_IOC_PRIVACYabove for details.IEEE80211_IOC_PROTMODEโ Sets the current 802.11g protection mode to the value ini_val๐ก๏ธ. This request causes a running interface to be reset. SeeIEEE80211_IOC_PROTMODEabove for details. This request causes a running interface to be reset. (Yes, it says reset twice โ the original is just like that, and we keep every detail, bestie.) ๐IEEE80211_IOC_PUREGโ Sets whether ``pure 11g'' mode is enabled using the value ini_val๐ฑ. This request causes a running interface to be restarted. SeeIEEE80211_IOC_PUREGabove for details.IEEE80211_IOC_PURENโ Sets whether ``pure 11n'' mode is enabled using the value ini_val๐ฟ. This request causes a running interface to be restarted. SeeIEEE80211_IOC_PURENabove for details.IEEE80211_IOC_REGDOMAINโ Sets the regulatory state using the data referenced byi_data๐บ๏ธ. This request can only be issued when all interfaces cloned from the underlying physical device are marked down; otherwiseEBUSYis returned. Note: the new regulatory data may invalidate any desired channel. So like, don't be surprised if your fave channel ghosts you. ๐ตIEEE80211_IOC_RIFSโ Sets whether or not Reduced InterFrame Spacing (RIFS) is enabled using the value ini_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 byi_data๐ถโโ๏ธ.IEEE80211_IOC_ROAMINGโ Sets the current roaming mode to the value ini_val๐งญ. SeeIEEE80211_IOC_ROAMINGabove for details.IEEE80211_IOC_RTSTHRESHOLDโ Sets the threshold (in bytes) for enabling transmission of RTS frames to the value ini_val๐จ. This request causes a running interface to be reset. SeeIEEE80211_IOC_RTSTHRESHOLDabove 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. Gotta keep that cache fresh, bestie. ๐งผIEEE80211_IOC_SCAN_REQโ Requests a scan operation using the parameters pointed to byi_val๐ก. The underlying device must be running orENXIOwill be returned. Values forsr_duration,sr_mindwell, andsr_maxdwellshorter 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. Silent treatment, but for scans. ๐IEEE80211_IOC_SCAN_CANCELโ Cancels any pending/active scan operation โ. Scan said "not today", and this ioctl agrees.IEEE80211_IOC_SHORTGIโ turns Short Guard Interval (SGI) on or off depending on the value ini_val. Heads up bestie: SGI only does anything when you're operating on an HT (802.11n) channel, so don't come for it on a non-n channel ๐ . This one resets a running interface.IEEE80211_IOC_SMPSโ sets the Spatial Multiplexing Power Save (SMPS) setting to the value ini_val. Also resets a running interface. For the deets, seeIEEE80211_IOC_SMPSabove ๐.IEEE80211_IOC_SSIDโ sets the desired SSID from the valuei_datapoints to. That string can be at mostIEEE80211_NWID_LENbytes, no cap. This request restarts a running interface.IEEE80211_IOC_STA_STATSโ wipes the accumulated statistics for the station you specified. fresh start energy โจIEEE80211_IOC_STA_VLANโ sets the VLAN tag for the specified station using the infoi_datapoints to.IEEE80211_IOC_TDMA_BINTERVALโ sets the interval between Beacon frames to the value ini_val. Values must be positive (negative beacon intervals are not it ๐). Resets a running interface.IEEE80211_IOC_TDMA_SLOTโ sets the current TDMA slot to the value ini_val. Values must land in the range [0-slotcnt]. Slot 0 is literally the master of the TDMA network โ if it's running, it immediately starts sending Beacon frames like the main character it is ๐.IEEE80211_IOC_TDMA_SLOTCNTโ sets the number of slots in the TDMA network to the value ini_val. Resets a running interface.IEEE80211_IOC_TDMA_SLOTLENโ sets the length of the TDMA slot assigned to each station in the network to the value ini_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 ๐ฅฒ). Resets a running interface.IEEE80211_IOC_TSNโ turns Transitional Security Network (TSN) on or off based on the value ini_val.IEEE80211_IOC_TURBOPโ turns Atheros Dynamic Turbo mode on or off based on the value ini_val. This one restarts a running interface, so brace yourself.IEEE80211_IOC_TXPARAMSโ sets transmit parameters using the datai_datapoints to. Restarts a running interface.IEEE80211_IOC_TXPOWERโ sets the max transmit power limit to the value ini_val, measured in .5 dBm units. Resets a running interface.IEEE80211_IOC_WEPโ sets the current WEP mode to the value ini_val. Valid values live inIEEE80211_IOC_WEPabove. Restarts a running interface. โ ๏ธ Also: this request is deprecated โ useIEEE80211_IOC_PRIVACYandIEEE80211_IOC_DROPUNENCRYPTEDinstead, okurrr?IEEE80211_IOC_WEPKEYโ sets the WEP key indicated byi_valusing the datai_datapoints to. โ ๏ธ Also deprecated โ useIEEE80211_IOC_WPAKEYinstead.IEEE80211_IOC_WEPTXKEYโ sets the default transmit key used for transmission to the value ini_val.IEEE80211_IOC_WMEโ turns WME/WMM support on or off depending on the value ini_val. Resets a running interface.IEEE80211_IOC_WME_ACKPOLICYโ sets the WME ACK Policy for the Access Class (AC) given ini_len, using the value ini_val.IEEE80211_IOC_WME_ACMโ sets the WME Admission Control Mechanism for the Access Class (AC) given ini_len, using the value ini_val.IEEE80211_IOC_WME_AIFSโ sets the WME AIFS parameter for the Access Class (AC) given ini_len, using the value ini_val.IEEE80211_IOC_WME_CWMAXโ sets the WME CWmax parameter for the Access Class (AC) given ini_len, using the value ini_val.IEEE80211_IOC_WME_CWMINโ sets the WME CWmin parameter for the Access Class (AC) given ini_len, using the value ini_val.IEEE80211_IOC_WME_TXOPLIMITโ sets the WME TxOpLimit parameter for the Access Class (AC) given ini_len, using the value ini_val.IEEE80211_IOC_WPAโ sets the WPA configuration using the value ini_val. Resets a running interface. SeeIEEE80211_IOC_WPAabove for the details ๐.IEEE80211_IOC_WPAKEYโ sets the requested cryptographic key using the data in the bufferi_datapoints to. SeeIEEE80211_IOC_WPAKEYfor the full rundown.IEEE80211_IOC_WPSโ turns Wi-Fi Protected Setup (WPS) on or off based on the value ini_val.
๐ SEE ALSO ๐
okay so if you wanna go deeper (and you should, she's an icon), go read:
and that's the whole page bestie, you ate that ๐ซถ go configure some wireless interfaces, you've got this. this masterpiece ships from Debian, dated August 7, 2020, and it's filed under NET80211(4) โ iconic behavior, no notes ๐
โจ๐
๐ฆ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 2009 Sam Leffler, Errno Consulting
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms