码迷,mamicode.com
首页 > 其他好文 > 详细

hostapd阅读(openwrt)-4

时间:2016-08-20 11:43:08      阅读:175      评论:0      收藏:0      [点我收藏+]

标签:

  接下来,咱们来看看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; }

 

 

未完待续

hostapd阅读(openwrt)-4

标签:

原文地址:http://www.cnblogs.com/shizhai/p/5789761.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!