WLAN(4)

πŸ’– WLAN(4) β€” the kernel interfaces manual, but make it cute πŸ’–

okay bestie, sit down, grab a boba, because we're about to talk about the wlan module and honestly? it's kind of the main character of wireless networking on FreeBSD. this page is from the Kernel Interfaces Manual, and yes, I'm about to make 802.11 lore sound like a group chat. 🫢


✨ NAME ✨

wlan β€” generic 802.11 link-layer support


🌸 SYNOPSIS 🌸

device wlan

that's it. that's the whole synopsis. iconic. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so the wlan module is the generic code that supports 802.11 drivers, periodt. whenever a device doesn't directly support 802.11 functionality, this layer fills in the gaps. every native 802.11 driver needs it, and so does the ndis(4) support. no wlan, no wifi. it's giving essential. πŸ”₯

wlan is also a multi-mode icon: it supports devices that can operate in both 2.4GHz and 5GHz bands, and it handles a whole lineup of 802.11 standards: 802.11a, 802.11b, 802.11g, 802.11n, and 802.11s (Draft 3.0). slay.

the WPA, 802.11i, and 802.1x security protocols are supported through a combination of in-kernel code and user-mode applications. the WME/WMM multi-media protocols are supported entirely within the wlan module, but β€” and this is the catch, bestie β€” they require a suitably capable hardware device. same energy for the 802.11h specification: only suitably capable devices get that. πŸ™ˆ


πŸŽ€ wlan interfaces, aka how the magic gets made

drivers provide 802.11 functionality through wlan interfaces that are created at runtime using interface cloning. how do you do it? two ways:

some drivers support creating multiple wlan interfaces that share the same underlying device. that's literally how ``multi-bss support'' happens, but you can also use it to create WDS links and other interesting applications. versatility? we love to see it. ✨


πŸ’œ the types of wlan interfaces

there are several types you can create, and each one has a whole personality:

  • sta β€” a client station in an infrastructure bss (i.e. one that associates to an access point).
  • hostap β€” an access point in an infrastructure bss.
  • mesh β€” a mesh station in an MBSS network.
  • adhoc β€” a station in an IBSS network.
  • ahdemo β€” a station operating in ``adhoc demo mode''. this is essentially an IBSS station that does not use management frames (e.g. no beacons are transmitted). an ahdemo interface is especially useful for applications that want to transmit and receive raw 802.11 packets.
  • monitor β€” an interface used exclusively for capturing 802.11 frames. in particular this is specified to have read-only properties, which enables it to be operated on frequencies where one would otherwise not be allowed. sneaky? no. allowed? yes. πŸ‘‘
  • wds β€” a station that passes 4-address 802.11 traffic for the purpose of tunneling traffic over a wireless link. typically this station would share the same MAC address as a hostap interface. it may be possible to create wds interfaces without a companion hostap interface, but that is not guaranteed β€” you may need to create a hostap interface that does not send beacon frames before wds interfaces may be created.
⚠️ note that an interface's type cannot be changed once it is created. pick your fave and commit, bestie. no take-backs.

🌈 plugin modules, because wlan is extensible fr fr

wlan defines several mechanisms by which plugin modules may be used to extend its functionality. cryptographic support like WEP, TKIP, and AES-CCMP are implemented as standalone modules (if not statically configured into a system) that register with wlan. similarly, there's an authenticator framework for defining 802.11 authentication services, plus a framework for integrating access control mechanisms specific to the 802.11 protocol. modular queen behavior. πŸ’–


πŸ”₯ DEBUGGING πŸ”₯

if the IEEE80211_DEBUG option is included in the kernel configuration, debugging controls become available using:

sysctl net.wlan.X.debug=mask

where X is the number of the wlan instance and mask is a bit-or of control bits that determine which debugging messages to enable. for example:

sysctl net.wlan.0.debug=0x00200000

that enables debugging messages related to scanning for an access point, adhoc neighbor, or an unoccupied channel when operating as an access point. the wlandebug(8) tool provides a more user-friendly mechanism for doing the same thing β€” so if bit math isn't your vibe, go hang out with wlandebug(8). 😌

and note that:

sysctl net.wlan.debug=mask

defines the initial value of the debugging flags for each cloned wlan interface. this is useful to enable debug messages during interface creation. set it early, catch everything, no crumbs left behind. πŸ“


🧚 COMPATIBILITY 🧚

the module name of wlan used to be compatible with NetBSD.

mesh stations follow the 802.11s Draft 3.0 specification, which is not ratified and subject to change. be aware that this specification is incompatible with earlier drafts. stations implementing earlier drafts (e.g., Linux) may be incompatible. so if the mesh vibe check fails, that might be why. πŸ’€


⭐ SEE ALSO ⭐

an(4), ath(4), bwi(4), bwn(4), ipw(4), iwi(4), iwm(4), iwn(4), malo(4), mwl(4), netintro(4), otus(4), ral(4), rsu(4), rtwn(4), rum(4), run(4), uath(4), upgt(4), ural(4), urtw(4), wi(4), wlan_acl(4), wlan_ccmp(4), wlan_tkip(4), wlan_wep(4), wlan_xauth(4), wpi(4), zyd(4)

(that's the whole squad. read up, bestie. πŸ“š)


πŸŽ€ STANDARDS πŸŽ€

more information can be found in the IEEE 802.11 Standards.


πŸ’œ HISTORY πŸ’œ

the wlan driver first appeared in FreeBSD 5.0. a legend from day one.


🌸 AUTHORS 🌸

Atsushi Onoe is the author of the original NetBSD software from which this work began. Sam Leffler brought the code into FreeBSD and then rewrote it to support multi-mode devices, 802.11g, 802.11n, WPA/802.11i, WME, multi-bss, and added the extensible frameworks for cryptographic, authentication, and access control plugins. this manual page was written by Tom Rhodes <trhodes@FreeBSD.org>.


and that's the page, bestie. this version is from Debian, dated October 29, 2015. go forth, clone your interfaces, and stay on that 5GHz. πŸ’…βœ¨πŸ¦‹
πŸ“¦ where this page comes from