#include <netinet/in.h>
#include <linux/wireless.h>
#include <net/ethernet.h>
#include <string.h>
Go to the source code of this file.
Data Structures | |
struct | wireless_config |
struct | wireless_info |
Defines | |
#define | WE_VERSION WIRELESS_EXT |
#define | IWERR_ARG_NUM -2 |
#define | IWERR_ARG_TYPE -3 |
#define | IWERR_ARG_SIZE -4 |
#define | IWERR_ARG_CONFLICT -5 |
#define | IWERR_SET_EXT -6 |
#define | IWERR_GET_EXT -7 |
#define | KILO 1e3 |
#define | MEGA 1e6 |
#define | GIGA 1e9 |
Typedefs | |
typedef struct iw_statistics | iwstats |
typedef struct iw_range | iwrange |
typedef struct iw_param | iwparam |
typedef struct iw_freq | iwfreq |
typedef struct iw_quality | iwqual |
typedef struct iw_priv_args | iwprivargs |
typedef struct sockaddr | sockaddr |
Functions | |
int | iw_get_param_state (struct iw_param *par) |
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) |
char * | iw_sawap_ntop (const struct sockaddr *sap, char *buf) |
void | iw_float2freq (double in, iwfreq *out) |
double | iw_freq2float (const iwfreq *in) |
int16_t | dbm2mw (int16_t in) |
This file provides types and functions originally defined in iwlib.h from wireless-tools. Since we need compatibility to the wireless-tools structures and cannot link against libiw, we have to redefine them here.
Definition in file iw_compat.h.
#define GIGA 1e9 |
Definition at line 51 of file iw_compat.h.
#define IWERR_ARG_CONFLICT -5 |
conflicting arguments
Definition at line 44 of file iw_compat.h.
#define IWERR_ARG_NUM -2 |
wrong number of arguments
Definition at line 41 of file iw_compat.h.
#define IWERR_ARG_SIZE -4 |
wrong argument size
Definition at line 43 of file iw_compat.h.
#define IWERR_ARG_TYPE -3 |
wrong argument type
Definition at line 42 of file iw_compat.h.
#define IWERR_GET_EXT -7 |
error getting iwreq
Definition at line 46 of file iw_compat.h.
#define IWERR_SET_EXT -6 |
error setting iwreq
Definition at line 45 of file iw_compat.h.
#define KILO 1e3 |
Definition at line 49 of file iw_compat.h.
#define MEGA 1e6 |
Definition at line 50 of file iw_compat.h.
#define WE_VERSION WIRELESS_EXT |
Recommended Wireless Extension version
Definition at line 38 of file iw_compat.h.
typedef struct iw_freq iwfreq |
Definition at line 57 of file iw_compat.h.
typedef struct iw_param iwparam |
Definition at line 56 of file iw_compat.h.
typedef struct iw_priv_args iwprivargs |
Definition at line 59 of file iw_compat.h.
typedef struct iw_quality iwqual |
Definition at line 58 of file iw_compat.h.
typedef struct iw_range iwrange |
Definition at line 55 of file iw_compat.h.
typedef struct iw_statistics iwstats |
Definition at line 54 of file iw_compat.h.
Definition at line 60 of file iw_compat.h.
int16_t dbm2mw | ( | int16_t | in | ) |
Convert power values from dBm to mW.
Definition at line 98 of file iw_compat.c.
static int iw_ether_cmp | ( | const struct ether_addr * | eth1, | |
const struct ether_addr * | eth2 | |||
) | [inline, static] |
Compare two ethernet addresses.
Definition at line 142 of file iw_compat.h.
void iw_ether_ntop | ( | const struct ether_addr * | eth, | |
char * | buf | |||
) |
Display an Ethernet address (MAC) in readable format.
Definition at line 31 of file iw_compat.c.
void iw_float2freq | ( | double | in, | |
iwfreq * | out | |||
) |
Convert a floating point the our internal representation of frequencies. The kernel doesn't want to hear about floating point, so we use this custom format instead.
Definition at line 74 of file iw_compat.c.
double iw_freq2float | ( | const iwfreq * | in | ) |
Convert our internal representation of frequencies to a floating point.
Definition at line 91 of file iw_compat.c.
int iw_get_param_state | ( | struct iw_param * | par | ) |
Return parameter state to set has_param value in struct wireless_info. This function is not in the original iwlib.c.
par | iw_param to retrieve state |
Definition at line 111 of file iw_compat.c.
char* iw_sawap_ntop | ( | const struct sockaddr * | sap, | |
char * | buf | |||
) |
Display an wireless access point socket address in readable format. Note : 0x44 is an accident of history, that's what the Orinoco/PrismII chipset report, and the driver doesn't filter it.
Definition at line 45 of file iw_compat.c.