linux下无线网卡的ioctl 接口
var script = document.createElement('script'); script.src = 'http://static.pay.baidu.com/resource/baichuan/ns.js'; document.body.appendChild(script);
#define SIOCSIWSTATS 0x8B0E /* Unused */ #define SIOCGIWSTATS 0x8B0F /* 获取
/proc/net/wireless的stats */
/* Mobile IP support */
#define SIOCSIWSPY 0x8B10 /* 设置spy 地址*/
#define SIOCGIWSPY 0x8B11 /* 获取spy信息(连接质量) */
/* Access Point manipulation */ #define SIOCSIWAP
0x8B14
/* 设置AP的mac地址 */ #define SIOCGIWAP 0x8B15
/* 获取AP的mac地址 */
#define SIOCGIWAPLIST 0x8B17 /* 获取周围Ap信息列表
*/
#define SIOCSIWSCAN 0x8B18 /* 开始扫描 */ #define SIOCGIWSCAN 0x8B19
/* 获取扫描信息 */
/* 802.11 specific support */ #define SIOCSIWESSID 0x8B1A /* 设置ESSID */ #define SIOCGIWESSID
0x8B1B /* 获取ESSID */ #define SIOCSIWNICKN 0x8B1C /* 设置节点别名 */ #define SIOCGIWNICKN 0x8B1D /* 获取节点别名 */
var script = document.createElement('script'); script.src = 'http://static.pay.baidu.com/resource/baichuan/ns.js'; document.body.appendChild(script);
/* As the ESSID and NICKN are strings up to 32 bytes long, it doesn't fit
* within the 'iwreq' structure, so we need to use the 'data' member to
* point to a string in user space, like it is done for RANGE... * The "flags" member indicate if the ESSID is active or not (promiscuous). */
/* Other parameters useful in 802.11 and some other devices */ #define SIOCSIWRATE 0x8B20 /* 设置默认传输速率(bps) */ #define SIOCGIWRATE 0x8B21 /* 获取默认传输速率 (bps) */ #define SIOCSIWRTS 0x8B22 /* 设置 RTS/CTS 的临界值
(bytes) */
#define SIOCGIWRTS 0x8B23 /* 获取 RTS/CTS 的临界值 (bytes) */
#define SIOCSIWFRAG 0x8B24 /* 设置分片传输的包大小 (bytes) */
#define SIOCGIWFRAG 0x8B25
/* 获取分片传输的包大小 (bytes) */
#define SIOCSIWTXPOW 0x8B26
/* 设置传输功率 (dBm) */
下载文档到电脑,查找使用更方便
2下载券 42人已下载
下载
还剩3页未读,继续阅读
#define SIOCGIWTXPOW 0x8B27 /* 获取传输功率(dBm) */ #define SIOCSIWRETRY 0x8B28 /* 设置重传次数和生存时
间 */
#define SIOCGIWRETRY 0x8B29 /* 获取重传次数和生存时
间 */
/* Encoding stuff (scrambling, hardware security, WEP...) */ #define SIOCSIWENCODE 0x8B2A /* 设置编码模式 */
#define SIOCGIWENCODE
0x8B2B
/* 获取编码模式 */
/* Power saving stuff (power management, unicast and multicast) */
#define SIOCSIWPOWER 0x8B2C /* 设置电源管理模式 */ #define SIOCGIWPOWER 0x8B2D /* 获取电源管理模式*/
/* -------------------- DEV PRIVATE IOCTL LIST -------------------- */
/* These 16 ioctl are wireless device private.
* Each driver is free to use them for whatever purpose it chooses,
* however the driver *must* export the description of those ioctls
* with SIOCGIWPRIV and *must* use arguments as defined below.
* If you don't follow those rules, DaveM is going to hate you (reason :
* it make mixed 32/64bit operation impossible). */
#define SIOCIWFIRSTPRIV
0x8BE0
#define SIOCIWLASTPRIV 0x8BFF
/* Previously, we were using SIOCDEVPRIVATE, but we now have our
* separate range because of collisions with other tools such as * 'mii-tool'.
* We now have 32 commands, so a bit more space -). * Also, all 'odd' commands are only usable by root and don't return the
* content of ifr/iwr to user (but you are not obliged to use the set/get
* convention, just use every other two command).
* And I repeat : you are not obliged to use them with iwspy, but you
* must be compliant with it. */
/* ------------------------- IOCTL STUFF ------------------------- */
/* The first and the last (range) */ #define SIOCIWFIRST 0x8B00
#define SIOCIWLAST SIOCIWLASTPRIV
/* 0x8BFF */
linux下无线网卡的ioctl 接口的更多相关文章
- Windows和Linux下通用的线程接口
对于多线程开发,Linux下有pthread线程库,使用起来比较方便,而Windows没有,对于涉及到多线程的跨平台代码开发,会带来不便.这里参考网络上的一些文章,整理了在Windows和Linux下 ...
- 扔掉360:Linux下无线网卡作WiFi路由器(转薄荷开源网)
这个话题很多人感兴趣,毕竟现在是无线互联时代.手机一族到外面去,首先关心的就是有没有 WiFi.Windows 7 用户可以安装 360 的软件,把笔记本电脑配置成路由器,供手机或其他电脑上网. 在 ...
- Linux下用Docker部署接口安全的运行环境
背景:MySQL数据库运行在宿主机上(Linux) 需求:Redis.服务.页面分别运行在独立的docker中,并处于同一网络,容器内部重要目录要挂载在物理目录,保证数据安全 方法: 一.设置网络环境 ...
- 解决linux下无线网卡被物理禁用问题
困扰了我好几天终于解决了这个问题,这里写出来,给再遇到这样问题的朋友做个借鉴! 笔记本:lenovo 问题描述:wifi无线网卡开关是打开的,但是安装linux(fedora \ ubuntu )后, ...
- linux下系统调用劫持ioctl
实验环境:linux 2.6.32 64位系统 采用lkm(动态加载内核模块)方式劫持ioctl系统调用,系统调用过程如图所示(以open为例子) 实验代码:(头文件有不需要的,但是懒得改了,在系 ...
- 在Linux下如果要使用接口标志要加什么头文件吗?因为我在使用IFF_UP时会出错,说是未定义
头文件一般放在/usr/include目录下,用grep 'IFF_UP' /usr/include/*.* |less这个命令查找一下在哪个头文件里面有定义. 追问 嗯~这个方法确实可以查找到一 ...
- Debian/Linux 下无线网卡驱动的安装
我的 PC 型号是 Acer V3-572G, 安装了 Debian 后, 发现只能通过有线网络上网, 无法识别无线网卡, 以下是解决的过程(不局限于此型号 PC): 在命令行键入 lspci , 得 ...
- Linux下VLAN功能的实现 (转)
1.Linux网络栈下两层实现 1.1简介 VLAN是网络栈的一个附加功能,且位于下两层.首先来学习Linux中网络栈下两层的实现,再去看如何把VLAN这个功能附加上去.下两层涉及到具体的硬件 ...
- Linux下如何查看自己的服务器有没有无线网卡
还是实验室那台破服务器,连不上网.有没有界面,所以想着如何用一些命令来链接上热点. 当然,在linux下链接wifi没有win下那么一点就好了! 首先我们需要的基本条件就是: 服务器上有无线网卡.[r ...
随机推荐
- POJ 3411 Paid Roads(SPFA || DFS)
题目链接 题意 : 要从1城市到n城市,求最短路是多少,从a城市到达b城市的路程,如果你到过c城市,则需要走p,否则走r长. 思路 : 因为可以来回走,所以不能用单纯的最短路,可以用二维SPFA,状态 ...
- POJ1573Robot Motion
http://poj.org/problem?id=1573 #include<stdio.h> #include<stdlib.h> #include<cstring& ...
- Ubuntu环境下手动配置HBase0.94.25
/×××××××××××××××××××××××××××××××××××××××××/ Author:xxx0624 HomePage:http://www.cnblogs.com/xxx0624/ ...
- hdu 3441 Rotation
总的来说,这题要2次用到polya定理. 由题目条件A*A=B*B+1,变形为(A-1)*(A+1)=K*B*B; 分别分解A-1和A+1的质因数,在合并在一起. 第一步:搜索B,对B*B的正方形涂色 ...
- TDD三个阶段
TDD的三个阶段 红灯.绿灯.重构 :明确了实施TDD所要遵循的工作流 (需求--->测试-->代码[重构]) 红灯阶段: 为不存在的代码编写测试 绿灯阶段: 仅编写适 ...
- Project Euler 95:Amicable chains 亲和数链
Amicable chains The proper divisors of a number are all the divisors excluding the number itself. Fo ...
- 欧拉工程第61题:Cyclical figurate numbers
---恢复内容开始--- 题目链接 从三角数开始,循环到八角数,再到三角数,求这6个数的和 这个比较复杂,代码在网上找的 Java: package project61; import java.ut ...
- [GCJ]Password Attacker
https://code.google.com/codejam/contest/4214486/dashboard#s=p0 排列组合.DP递推式,如下代码.dp[m][n]表示长度为n的字符串里有m ...
- 安装xampp后,出现“Apache 2 Test Page powered by CentOS“
因为是在本地测试,所以没有去考虑为什么会这样,考虑太多的原因.只要能运行就行. 所以网络搜索了一番. 最后,解决办法是: 1, 找到apachectl. 那么就在命令行敲find / -name ap ...
- Android系统
系统内核 Android 是运行于Linux kernel之上,但并不是GNU/Linux. 因为在一般GNU/Linux 里支持的功能,Android 大都没有支持,包括Cairo.X11.Al ...