Classes | Defines | Typedefs | Functions | Variables
iwlib.h File Reference
#include <sys/types.h>
#include <sys/ioctl.h>
#include <stdio.h>
#include <math.h>
#include <errno.h>
#include <fcntl.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <netdb.h>
#include <net/ethernet.h>
#include <sys/time.h>
#include <net/if_arp.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/if_ether.h>
#include <linux/types.h>
#include <net/if.h>
#include "wireless.h"
Include dependency graph for iwlib.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  iw_modul_descr
struct  iw_pk_event
struct  iw_pk_point
struct  stream_descr
struct  wireless_config
struct  wireless_info
struct  wireless_scan
struct  wireless_scan_head

Defines

#define __user
#define ARPHRD_IEEE80211   801 /* IEEE 802.11 */
#define GIGA   1e9
#define IW_EV_ADDR_PK_LEN   (IW_EV_LCP_PK_LEN + sizeof(struct sockaddr))
#define IW_EV_CHAR_PK_LEN   (IW_EV_LCP_PK_LEN + IFNAMSIZ)
#define IW_EV_FREQ_PK_LEN   (IW_EV_LCP_PK_LEN + sizeof(struct iw_freq))
#define IW_EV_LCP_PK2_LEN   (sizeof(struct iw_pk_event) - sizeof(union iwreq_data))
#define IW_EV_LCP_PK_LEN   (4)
#define IW_EV_PARAM_PK_LEN   (IW_EV_LCP_PK_LEN + sizeof(struct iw_param))
#define IW_EV_POINT_PK2_LEN   (IW_EV_LCP_PK2_LEN + sizeof(struct iw_pk_point) - IW_EV_POINT_OFF)
#define IW_EV_POINT_PK_LEN   (IW_EV_LCP_PK_LEN + 4)
#define IW_EV_QUAL_PK_LEN   (IW_EV_LCP_PK_LEN + sizeof(struct iw_quality))
#define IW_EV_UINT_PK_LEN   (IW_EV_LCP_PK_LEN + sizeof(__u32))
#define IW_NUM_OPER_MODE   7
#define IW_NUM_OPER_MODE_EXT   8
#define IW_SIZE_MODUL_LIST   16
#define KILO   1e3
#define LOG10_MAGIC   1.25892541179
#define MEGA   1e6
#define PROC_NET_DEV   "/proc/net/dev"
#define PROC_NET_WIRELESS   "/proc/net/wireless"
#define WE_MAX_VERSION   22
#define WE_VERSION   21
#define WT_VERSION   29

Typedefs

typedef int(* iw_enum_handler )(int skfd, char *ifname, char *args[], int count)
typedef struct iw_modul_descr iw_modul_descr
typedef struct iw_freq iwfreq
typedef struct iw_param iwparam
typedef struct iw_priv_args iwprivargs
typedef struct iw_quality iwqual
typedef struct iw_range iwrange
typedef struct iw_statistics iwstats
typedef struct sockaddr sockaddr
typedef struct stream_descr stream_descr
typedef struct wireless_config wireless_config
typedef struct wireless_info wireless_info
typedef struct wireless_scan wireless_scan
typedef struct wireless_scan_head wireless_scan_head

Functions

struct iw_pk_event __attribute__ ((packed))
static void iw_broad_ether (struct sockaddr *sap)
int iw_channel_to_freq (int channel, double *pfreq, const struct iw_range *range)
int iw_check_if_addr_type (int skfd, const char *ifname)
int iw_check_mac_addr_type (int skfd, const char *ifname)
int iw_dbm2mwatt (int in)
void iw_enum_devices (int skfd, iw_enum_handler fn, char *args[], int count)
int iw_ether_aton (const char *bufp, struct ether_addr *eth)
static int iw_ether_cmp (const struct ether_addr *eth1, const struct ether_addr *eth2)
void iw_ether_ntop (const struct ether_addr *eth, char *buf)
int iw_extract_event_stream (struct stream_descr *stream, struct iw_event *iwe, int we_version)
void iw_float2freq (double in, iwfreq *out)
double iw_freq2float (const iwfreq *in)
int iw_freq_to_channel (double freq, const struct iw_range *range)
int iw_get_basic_config (int skfd, const char *ifname, wireless_config *info)
static int iw_get_ext (int skfd, const char *ifname, int request, struct iwreq *pwrq)
int iw_get_kernel_we_version (void)
int iw_get_priv_info (int skfd, const char *ifname, iwprivargs **ppriv)
int iw_get_priv_size (int args)
int iw_get_range_info (int skfd, const char *ifname, iwrange *range)
int iw_get_stats (int skfd, const char *ifname, iwstats *stats, const iwrange *range, int has_range)
int iw_in_addr (int skfd, const char *ifname, char *bufp, struct sockaddr *sap)
int iw_in_inet (char *bufp, struct sockaddr *sap)
int iw_in_key (const char *input, unsigned char *key)
int iw_in_key_full (int skfd, const char *ifname, const char *input, unsigned char *key, __u16 *flags)
void iw_init_event_stream (struct stream_descr *stream, char *data, int len)
int iw_mac_aton (const char *orig, unsigned char *mac, int macmax)
char * iw_mac_ntop (const unsigned char *mac, int maclen, char *buf, int buflen)
int iw_mwatt2dbm (int in)
static void iw_null_ether (struct sockaddr *sap)
void iw_print_bitrate (char *buffer, int buflen, int bitrate)
void iw_print_freq (char *buffer, int buflen, double freq, int channel, int freq_flags)
void iw_print_freq_value (char *buffer, int buflen, double freq)
void iw_print_key (char *buffer, int buflen, const unsigned char *key, int key_size, int key_flags)
void iw_print_pm_mode (char *buffer, int buflen, int flags)
void iw_print_pm_value (char *buffer, int buflen, int value, int flags, int we_version)
void iw_print_retry_value (char *buffer, int buflen, int value, int flags, int we_version)
void iw_print_stats (char *buffer, int buflen, const iwqual *qual, const iwrange *range, int has_range)
void iw_print_timeval (char *buffer, int buflen, const struct timeval *time, const struct timezone *tz)
void iw_print_txpower (char *buffer, int buflen, struct iw_param *txpower)
int iw_print_version_info (const char *toolname)
int iw_process_scan (int skfd, char *ifname, int we_version, wireless_scan_head *context)
int iw_protocol_compare (const char *protocol1, const char *protocol2)
static int iw_saether_aton (const char *bufp, struct sockaddr *sap)
static char * iw_saether_ntop (const struct sockaddr *sap, char *bufp)
char * iw_sawap_ntop (const struct sockaddr *sap, char *buf)
int iw_scan (int skfd, char *ifname, int we_version, wireless_scan_head *context)
int iw_set_basic_config (int skfd, const char *ifname, wireless_config *info)
static int iw_set_ext (int skfd, const char *ifname, int request, struct iwreq *pwrq)
static void iw_sockets_close (int skfd)
int iw_sockets_open (void)

Variables

__u16 cmd
__u16 flags
struct iw_modul_descr iw_modul_list []
const char *const iw_operation_mode []
__u16 len
__u16 length
void __userpointer
union iwreq_data u

Define Documentation

#define __user

Definition at line 51 of file iwlib.h.

#define ARPHRD_IEEE80211   801 /* IEEE 802.11 */

Definition at line 124 of file iwlib.h.

#define GIGA   1e9

Definition at line 118 of file iwlib.h.

#define IW_EV_ADDR_PK_LEN   (IW_EV_LCP_PK_LEN + sizeof(struct sockaddr))

Definition at line 135 of file iwlib.h.

#define IW_EV_CHAR_PK_LEN   (IW_EV_LCP_PK_LEN + IFNAMSIZ)

Definition at line 131 of file iwlib.h.

#define IW_EV_FREQ_PK_LEN   (IW_EV_LCP_PK_LEN + sizeof(struct iw_freq))

Definition at line 133 of file iwlib.h.

#define IW_EV_LCP_PK2_LEN   (sizeof(struct iw_pk_event) - sizeof(union iwreq_data))

Definition at line 152 of file iwlib.h.

#define IW_EV_LCP_PK_LEN   (4)

Definition at line 129 of file iwlib.h.

#define IW_EV_PARAM_PK_LEN   (IW_EV_LCP_PK_LEN + sizeof(struct iw_param))

Definition at line 134 of file iwlib.h.

Definition at line 153 of file iwlib.h.

Definition at line 137 of file iwlib.h.

#define IW_EV_QUAL_PK_LEN   (IW_EV_LCP_PK_LEN + sizeof(struct iw_quality))

Definition at line 136 of file iwlib.h.

#define IW_EV_UINT_PK_LEN   (IW_EV_LCP_PK_LEN + sizeof(__u32))

Definition at line 132 of file iwlib.h.

#define IW_NUM_OPER_MODE   7

Definition at line 484 of file iwlib.h.

#define IW_NUM_OPER_MODE_EXT   8

Definition at line 485 of file iwlib.h.

#define IW_SIZE_MODUL_LIST   16

Definition at line 489 of file iwlib.h.

#define KILO   1e3

Definition at line 116 of file iwlib.h.

#define LOG10_MAGIC   1.25892541179

Definition at line 120 of file iwlib.h.

#define MEGA   1e6

Definition at line 117 of file iwlib.h.

#define PROC_NET_DEV   "/proc/net/dev"

Definition at line 113 of file iwlib.h.

#define PROC_NET_WIRELESS   "/proc/net/wireless"

Definition at line 112 of file iwlib.h.

#define WE_MAX_VERSION   22

Definition at line 107 of file iwlib.h.

#define WE_VERSION   21

Definition at line 105 of file iwlib.h.

#define WT_VERSION   29

Definition at line 109 of file iwlib.h.


Typedef Documentation

typedef int(* iw_enum_handler)(int skfd, char *ifname, char *args[], int count)

Definition at line 272 of file iwlib.h.

typedef struct iw_freq iwfreq

Definition at line 163 of file iwlib.h.

typedef struct iw_param iwparam

Definition at line 162 of file iwlib.h.

typedef struct iw_priv_args iwprivargs

Definition at line 165 of file iwlib.h.

typedef struct iw_quality iwqual

Definition at line 164 of file iwlib.h.

typedef struct iw_range iwrange

Definition at line 161 of file iwlib.h.

typedef struct iw_statistics iwstats

Definition at line 160 of file iwlib.h.

typedef struct sockaddr sockaddr

Definition at line 166 of file iwlib.h.

typedef struct stream_descr stream_descr
typedef struct wireless_info wireless_info
typedef struct wireless_scan wireless_scan

Function Documentation

struct iw_pk_event __attribute__ ( (packed)  )
static void iw_broad_ether ( struct sockaddr sap) [inline, static]

Definition at line 569 of file iwlib.h.

int iw_channel_to_freq ( int  channel,
double *  pfreq,
const struct iw_range range 
)
int iw_check_if_addr_type ( int  skfd,
const char *  ifname 
)
int iw_check_mac_addr_type ( int  skfd,
const char *  ifname 
)
int iw_dbm2mwatt ( int  in)
void iw_enum_devices ( int  skfd,
iw_enum_handler  fn,
char *  args[],
int  count 
)
int iw_ether_aton ( const char *  bufp,
struct ether_addr *  eth 
)
static int iw_ether_cmp ( const struct ether_addr *  eth1,
const struct ether_addr *  eth2 
) [inline, static]

Definition at line 591 of file iwlib.h.

void iw_ether_ntop ( const struct ether_addr *  eth,
char *  buf 
)
int iw_extract_event_stream ( struct stream_descr stream,
struct iw_event iwe,
int  we_version 
)
void iw_float2freq ( double  in,
iwfreq out 
)
double iw_freq2float ( const iwfreq in)
int iw_freq_to_channel ( double  freq,
const struct iw_range range 
)
int iw_get_basic_config ( int  skfd,
const char *  ifname,
wireless_config info 
)
static int iw_get_ext ( int  skfd,
const char *  ifname,
int  request,
struct iwreq pwrq 
) [inline, static]

Definition at line 522 of file iwlib.h.

int iw_get_kernel_we_version ( void  )
int iw_get_priv_info ( int  skfd,
const char *  ifname,
iwprivargs **  ppriv 
)
int iw_get_priv_size ( int  args)
int iw_get_range_info ( int  skfd,
const char *  ifname,
iwrange range 
)
int iw_get_stats ( int  skfd,
const char *  ifname,
iwstats stats,
const iwrange range,
int  has_range 
)
int iw_in_addr ( int  skfd,
const char *  ifname,
char *  bufp,
struct sockaddr sap 
)
int iw_in_inet ( char *  bufp,
struct sockaddr sap 
)
int iw_in_key ( const char *  input,
unsigned char *  key 
)
int iw_in_key_full ( int  skfd,
const char *  ifname,
const char *  input,
unsigned char *  key,
__u16 *  flags 
)
void iw_init_event_stream ( struct stream_descr stream,
char *  data,
int  len 
)
int iw_mac_aton ( const char *  orig,
unsigned char *  mac,
int  macmax 
)
char* iw_mac_ntop ( const unsigned char *  mac,
int  maclen,
char *  buf,
int  buflen 
)
int iw_mwatt2dbm ( int  in)
static void iw_null_ether ( struct sockaddr sap) [inline, static]

Definition at line 580 of file iwlib.h.

void iw_print_bitrate ( char *  buffer,
int  buflen,
int  bitrate 
)
void iw_print_freq ( char *  buffer,
int  buflen,
double  freq,
int  channel,
int  freq_flags 
)
void iw_print_freq_value ( char *  buffer,
int  buflen,
double  freq 
)
void iw_print_key ( char *  buffer,
int  buflen,
const unsigned char *  key,
int  key_size,
int  key_flags 
)
void iw_print_pm_mode ( char *  buffer,
int  buflen,
int  flags 
)
void iw_print_pm_value ( char *  buffer,
int  buflen,
int  value,
int  flags,
int  we_version 
)
void iw_print_retry_value ( char *  buffer,
int  buflen,
int  value,
int  flags,
int  we_version 
)
void iw_print_stats ( char *  buffer,
int  buflen,
const iwqual qual,
const iwrange range,
int  has_range 
)
void iw_print_timeval ( char *  buffer,
int  buflen,
const struct timeval *  time,
const struct timezone *  tz 
)
void iw_print_txpower ( char *  buffer,
int  buflen,
struct iw_param txpower 
)
int iw_print_version_info ( const char *  toolname)
int iw_process_scan ( int  skfd,
char *  ifname,
int  we_version,
wireless_scan_head context 
)
int iw_protocol_compare ( const char *  protocol1,
const char *  protocol2 
)
static int iw_saether_aton ( const char *  bufp,
struct sockaddr sap 
) [inline, static]

Definition at line 558 of file iwlib.h.

static char* iw_saether_ntop ( const struct sockaddr sap,
char *  bufp 
) [inline, static]

Definition at line 548 of file iwlib.h.

char* iw_sawap_ntop ( const struct sockaddr sap,
char *  buf 
)
int iw_scan ( int  skfd,
char *  ifname,
int  we_version,
wireless_scan_head context 
)
int iw_set_basic_config ( int  skfd,
const char *  ifname,
wireless_config info 
)
static int iw_set_ext ( int  skfd,
const char *  ifname,
int  request,
struct iwreq pwrq 
) [inline, static]

Definition at line 506 of file iwlib.h.

static void iw_sockets_close ( int  skfd) [inline, static]

Definition at line 538 of file iwlib.h.

int iw_sockets_open ( void  )

Variable Documentation

__u16 cmd

Definition at line 146 of file iwlib.h.

__u16 flags

Definition at line 153 of file iwlib.h.

const char* const iw_operation_mode[]
__u16 len

Definition at line 145 of file iwlib.h.

__u16 length

Definition at line 152 of file iwlib.h.

void __user* pointer

Definition at line 151 of file iwlib.h.

union iwreq_data u

Definition at line 147 of file iwlib.h.



heatmap
Author(s): Adrian Bauer
autogenerated on Thu Feb 11 2016 23:05:26