如何nl80211库&安培; cfg80211工作? [英] How nl80211 library & cfg80211 work?

查看:304
本文介绍了如何nl80211库&安培; cfg80211工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想了解nl80211和cfg80211如何具体运作。功能流程,nl80211如何与网络工具,如参考wpa_supplicant,IW交互。 PLZ建议我一些有用的链接或书籍参考

I want to learn about how nl80211 and cfg80211 works in detail. Function flow, how nl80211 interact with network tools like wpa_supplicant, iw. Plz suggest me some useful links or books to refer

推荐答案

要能够控制从用户空间的无线驱动程序,用于内核和用户空间之间的一些IPC通信的进程。

To be able to control wireless drivers from userspace, some IPC communication processes between kernel and userspace are used.


  • 在第一个的ioctl 与供应商的依赖API的使用。

  • 在1996年,吉恩Tourrilhes创建无线扩展(WE或w外)。

  • At first ioctl with vendor dependent APIs was used.
  • In 1996, Jean Tourrilhes creates wireless extensions (WE or WEXT).

无线扩展(WE)是一个通用的API,允许司机
  暴露到用户空间的配置和具体统计
  常见的无线局域网。

The Wireless Extension (WE) is a generic API allowing a driver to expose to the user space configuration and statistics specific to common Wireless LANs.

  • In 2006, John Linville creates mac80211 and Johannes Berg creates cfg80211 and nl80211. Together it is intended to replace wireless extensions.

    +-------------+
    |             |
    |  Userspace  |
    |             |
    +-------------+
          ^
    - - - | - - - - 
          | nl80211
          v
    +-------------+
    |             |
    |  cfg80211   |
    |             |
    +-------------+
    +-------------+
    |             |
    |  mac80211   |
    |   driver    |
    |             |
    +-------------+
    


  • 这是很重要的一点是,nl80211 / cfg80211 / mac80211不再使用的ioctl,他们使用的netlink

    An important point is that nl80211/cfg80211/mac80211 no longer use ioctl, they use netlink.

    所以,像 IW ,的 hostapd 的wpa_supplicant 使用一些网络链路库(比如libnl 或的 libnl纤巧)和网络连接接口公共头这当然是 nl80211的.H

    So, tools like iw, hostapd or the wpa_supplicant use some netlink libraries (like libnl or libnl-tiny) and the netlink interface public header which is of course nl80211.h.

    有没有那么多文档,但我建议你阅读 libnl文档,然后 IW源$ C ​​$ C (因为IW使用libnl )。

    There is not so much documentations, but I advice you to read the libnl documentation and then the iw source code (because iw use libnl).

    这篇关于如何nl80211库&安培; cfg80211工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆