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; }

 

 

未完待续

转载于:https://www.cnblogs.com/shizhai/p/5789761.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值