Linux Wireless之80211(nl80211, cfg80211, mac80211)
前言
在Linux无线子系统中,cfg80211、mac80211和nl80211是三个关键的组件,它们共同工作以实现对802.11设备的配置和管理。
cfg80211负责内核空间的通用API,mac80211负责具体的MAC层实现,而nl80211则作为用户空间与内核空间之间的桥梁,用于配置管理和通信。

nl80211
nl80211是介于用户空间与内核空间之间的 API ,可以算是 cfg80211 的前端,也会生成 “事件” (events) 信息。该模块依赖 netlink 协议来在两个空间进行信息交互,通过socket接收上层命令,执行对应函数进行配置管理网络接口。Netlink 是一个 Linux 中的 socket 类型,用于在内核与用户空间之间传递事件。

nl80211 is the new 802.11 netlink interface public header. Together with cfg80211 it is intended to replace Wireless-Extensions. nl80211 and cfg80211 are still under development.

我们常用的一些无线网络工具组件都使用了nl80211:

iw
crda
hostapd
wpa_supplicant (with -Dnl80211)
iwd
NetworkManager (scanning etc.)
cfg80211

。。。。。。

更多请关注:

Linux Wireless之80211(nl80211, cfg80211, mac80211)_API

作者: Shell