IEEE80211(4)
π
IEEE80211(4) β the ieee80211 manual page, bestie edition π
okay so this is the ieee80211 page from the Kernel Interfaces Manual β yes, the kernel one, we're in the big leagues now. it's literally the standard interface to IEEE 802.11 devices and it's giving "backstage pass to your wifi card's whole personality". let's go β¨
πΈ NAME πΈ
ieee80211 β the 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 <net/if_ieee80211.h>
π DESCRIPTION π
okay so this whole section is about the standard interface for configuration and status info on IEEE 802.11 devices. and like β heads up β most devices support options that this interface literally cannot configure π. those have to be set by their own respective, specific control program. not us. not here. it's giving "not my department".
the interface happens via one of these ioctl(2) calls on a socket:
SIOCG80211β get configuration or status information πSIOCS80211β set configuration information βοΈ
these requests get made through a modified ifreq structure. and it's defined like this, no cap:
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 */
};
π«Ά for SIOCG80211, these are the valid values of i_type π«Ά
IEEE80211_IOC_SSIDβ returns the requested SSID by copying it into the buffer pointed to byi_dataand settingi_lento the length π. ifi_valis>= 0then the request refers to the configured value for that slot β generally0is the only valid value, but some interfaces support more SSIDs. ifi_valis-1then the request refers to the currently active value. main character SSID energy fr.IEEE80211_IOC_NUMSSIDSβ returns the number of SSIDs this card supports. in most cases that's1, but some devices such asan(4)support more πIEEE80211_IOC_WEPβ returns the current WEP status ini_val. valid values areIEEE80211_WEP_NOSUP,IEEE80211_WEP_ON,IEEE80211_WEP_OFF, andIEEE80211_WEP_MIXED. respectively, these mean unsupported, mandatory for all devices, off, and on but not required for all devices πIEEE80211_IOC_WEPKEYβ returns the requested WEP key viai_dataand its length viai_len. 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 π. technically this is a valid key, but it is the kind of key an idiot would put on his luggage so we use it as a special value β iconic choice, honestly. generally only four WEP keys are allowed, but some devices support more; if so, the first four (0-3) are the standard keys stored in volatile storage and the others are device specific.IEEE80211_IOC_NUMWEPKEYSβ returns the number of WEP keys supported by this device, generally4. a device that does not support WEP may either report0or simply returnEINVALπIEEE80211_IOC_WEPTXKEYβ returns the WEP key used for transmission π‘IEEE80211_IOC_AUTHMODEβ returns the current authentication mode ini_val. valid values areIEEE80211_AUTH_NONE,IEEE80211_AUTH_OPEN, andIEEE80211_AUTH_SHAREDπIEEE80211_IOC_STATIONNAMEβ returns the station name viai_dataand its length viai_len. and likeβ¦ while all known devices seem to support this in some way or another, they all do it differently and it appears to not have anything to do with the actual IEEE 802.11 standard, so making up an answer may be necessary for future devices π§ β yes, literally vibes-based station names.IEEE80211_IOC_CHANNELβ returns the current direct sequence spread spectrum channel in use πIEEE80211_IOC_POWERSAVEβ returns the current powersaving mode. valid values areIEEE80211_POWERSAVE_NOSUP,IEEE80211_POWERSAVE_OFF,IEEE80211_POWERSAVE_ON,IEEE80211_POWERSAVE_CAM,IEEE80211_POWERSAVE_PSP, andIEEE80211_POWERSAVE_PSP_CAM. currently,IEEE80211_POWERSAVE_ONis defined to be equal toIEEE80211_POWERSAVE_CAM, but this may be incorrect π (noted, bestie, we're watching it)IEEE80211_IOC_POWERSAVESLEEPβ returns the powersave sleep time in msec ini_valπ΄
π for SIOCS80211, these are the valid values of i_type π
IEEE80211_IOC_SSIDβ set the desired SSID for infrastructure and ad-hoc modes to the value given byi_dataandi_len. the length should be no longer than 32 characters βοΈIEEE80211_IOC_WEPβ set the current WEP mode to the value given ini_val. valid values are the same as those for this value above. devices which do not support all modes may choose to either returnEINVALor choose a reasonable alternate (supported) setting β pick your fighter πIEEE80211_IOC_WEPKEYβ set the WEP key indicated byi_valto the value given byi_dataandi_len. generally, valid values ofi_lenare0,5, and13β though not all devices with WEP support have support for 13-byte keys πIEEE80211_IOC_WEPTXKEYβ set the WEP key used for transmission to the value ini_val. not all values which are valid for setting keys may be valid for setting transmit keys, due to strange device interfaces π strange device interfaces, we love you, never change.IEEE80211_IOC_AUTHMODEβ set the current authorization mode to the value given ini_val. valid values are given above. not all devices support this π€·IEEE80211_IOC_STATIONNAMEβ set the station name to the value given byi_dataandi_len. the standard does not appear to deal with this feature so the range of valid values may vary from device to device πIEEE80211_IOC_CHANNELβ set the desired ad-hoc channel to the value given byi_val. on some devices this has an impact on infrastructure mode as well π. valid values are1-14, but0should be allowed and should return the device to the default value. many devices support this directly by converting any invalid value to the default value π¦IEEE80211_IOC_POWERSAVEβ set the current powersaving mode to the value given ini_val. valid values are the same as those for this value above. devices which do not support all modes may choose to either returnEINVALor choose a reasonable alternate (supported) setting. most devices only support CAM mode πIEEE80211_IOC_POWERSAVESLEEPβ set the powersave sleep time in msec to the value ini_valπ΄
π₯ SEE ALSO π₯
ioctl(2), an(4), ray(4), wi(4), ifconfig(8) β go read those too, bestie, your wifi knowledge will be unmatched, iykyk π
π¦ HISTORY π¦
the ieee80211 manual appeared in FreeBSD 4.3 πβ¨
and that's the whole page, periodt π this edition came from Debian, dated February 23, 2001 β a vintage icon, honestly, we stan a classic ππ
π¦ where this page comes from
- nixpkgs unstable: netbsd-source 11.0
- Copyright (c) 2001 The Aerospace Corporation. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms