天天看點

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  /* 擷取節點别名 */ 

/* 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 */

繼續閱讀