查看设置IE信息
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <string.h>
#include <errno.h>
#include <sys/ioctl.h>
#include <unistd.h>
#define BUF_SIZE 1024
#define TRACE printf("%s %d\n", __func__, __LINE__)
/******************************************************************************/
#define IFNAMSIZ 16
typedef __uint32_t __u32;
typedef __int32_t __s32;
typedef __uint16_t __u16;
typedef __int16_t __s16;
typedef __uint8_t __u8;
#ifndef __user
#define __user
#endif /* __user */
#define ifr_name ifr_ifrn.ifrn_name /* interface name */
/******************************************************************************/
/* from ieee80211_ioctl.h */
#define SIOCIWFIRSTPRIV 0x8BE0
#define SIOCIWLASTPRIV 0x8BFF
#define IEEE80211_IOCTL_GET_APPIEBUF (SIOCIWFIRSTPRIV+19)
#define IEEE80211_IOCTL_SET_APPIEBUF (SIOCIWFIRSTPRIV+20)
#define IEEE80211_IOCTL_FILTERFRAME (SIOCIWFIRSTPRIV+12)
enum {
IEEE80211_APPIE_FRAME_BEACON = 0,
IEEE80211_APPIE_FRAME_PROBE_REQ = 1,
IEEE80211_APPIE_FRAME_PROBE_RESP = 2,
IEEE80211_APPIE_FRAME_ASSOC_REQ = 3,
IEEE80211_APPIE_FRAME_ASSOC_RESP = 4,
IEEE80211_APPIE_NUM_OF_FRAME = 5
};
struct ieee80211req_getset_appiebuf {
u_int32_t app_frmtype; /* management frame type for which buffer is added */
u_int32_t app_buflen; /* application-supplied buffer length */
u_int8_t app_buf[0]; /* application-supplied IE(s) */
};
/******************************************************************************/
/* from wireless.h */
#define SIOCSIWESSID 0x8B1A /* set ESSID (network name) */
#define SIOCGIWESSID 0x8B1B /* get ESSID */
struct iw_param
{
__s32 value; /* The value of the parameter itself */
__u8 fixed; /* Hardware should not use auto select */
__u8 disabled; /* Disab