zoukankan      html  css  js  c++  java
  • hostapd阅读(openwrt)-4

      接下来,咱们来看看hostapd的源码目录之hostapd,今天我们先分析整体功能,然后从main.c开始注释

      hostapd下代码主要作用有:配置解析,环境初始化,控制接口建立,AP接口管理模块。

    ├── android.config
    ├── Android.mk
    ├── ChangeLog
    ├── config_file.c----------------------------------------->配置解析文件
    ├── config_file.h
    ├── ctrl_iface.c------------------------------------------>uninx域套接字接口
    ├── ctrl_iface.h
    ├── defconfig-------------------------------------------->默认配置文件,在编译时会将其拷贝为.config
    ├── eap_register.c
    ├── eap_register.h
    ├── eap_testing.txt
    ├── hapd_module_tests.c
    ├── hlr_auc_gw.c
    ├── hlr_auc_gw.milenage_db
    ├── hlr_auc_gw.txt
    ├── hostapd.8
    ├── hostapd.accept
    ├── hostapd_cli.1
    ├── hostapd_cli.c
    ├── hostapd.conf
    ├── hostapd.deny
    ├── hostapd.eap_user
    ├── hostapd.eap_user_sqlite
    ├── hostapd.radius_clients
    ├── hostapd.sim_db
    ├── hostapd.vlan
    ├── hostapd.wpa_psk
    ├── logwatch
    │   ├── hostapd
    │   ├── hostapd.conf
    │   └── README
    ├── main.c----------------------------------------->hostapd主程序 
    ├── Makefile--------------------------------------->hostapd编译Makefile
    ├── nt_password_hash.c
    ├── README
    ├── README-WPS
    ├── wired.conf
    └── wps-ap-nfc.py

    struct sta_info * ap_get_sta(struct hostapd_data *hapd, const u8 *sta)
    {
        struct sta_info *s;
    
      /*随机*/ s
    = hapd->sta_hash[STA_HASH(sta)]; while (s != NULL && os_memcmp(s->addr, sta, 6) != 0) s = s->hnext; return s; }

    未完待续

  • 相关阅读:
    [LeetCode] Convert Sorted Array to Binary Search Tree
    [LeetCode] Diameter of Binary Tree
    [LeetCode] Student Attendance Record I
    [LeetCode] Reverse String II
    [LeetCode] Missing Number
    [LeetCode] Intersection of Two Arrays II
    [LeetCode] Base 7
    Ubuntu中firefox设置成中文
    Linux中的查找命令find
    Ubuntu14.04安装配置Chrome浏览器
  • 原文地址:https://www.cnblogs.com/shizhai/p/5789761.html
Copyright © 2011-2022 走看看