next up previous contents
Next: 7. Device Drivers Up: 6. Device Interfaces Previous: 6.27 waveform   Contents

Subsections


6.28 wifi

Synopsis

The wifi interface provides access to the state of a wireless network interface.

Constants

#define PLAYER_WIFI_MAX_LINKS 16
The maximum number of remote hosts to report on

#define PLAYER_WIFI_QUAL_DBM 1
link quality is in dBm

#define PLAYER_WIFI_QUAL_REL 2
link quality is relative

#define PLAYER_WIFI_QUAL_UNKNOWN 3
link quality is unknown

#define PLAYER_WIFI_MODE_UNKNOWN 0
unknown operating mode

#define PLAYER_WIFI_MODE_AUTO 1
driver decides the mode

#define PLAYER_WIFI_MODE_ADHOC 2
ad hoc mode

#define PLAYER_WIFI_MODE_INFRA 3
infrastructure mode (multi cell network, roaming)

#define PLAYER_WIFI_MODE_MASTER 4
access point, master mode

#define PLAYER_WIFI_MODE_REPEAT 5
repeater mode

#define PLAYER_WIFI_MODE_SECOND 6
secondary/backup repeater

#define PLAYER_WIFI_MAC_REQ ((uint8_t)1)
config requests

Data



struct player_wifi_link : The wifi interface returns data regarding the signal characteristics of remote hosts as perceived through a wireless network interface; the format of the data for each host is:

char ip[32];
IP address of destination.

// these could be uint8_t instead, <linux/wireless.h> will only
// return that much. maybe some other architecture needs larger??
uint16_t qual, level, noise;
Link quality, level and noise information



struct player_wifi_data : The complete data packet format is:

player_wifi_link_t links[PLAYER_WIFI_MAX_LINKS];
uint16_t link_count;
A list of links

uint32_t throughput;
mysterious throughput calculated by driver

int32_t bitrate;
current bitrate of device

uint8_t mode;
operating mode of device

uint8_t qual_type;
Indicates type of link quality info we have

uint16_t maxqual, maxlevel, maxnoise;
Maximum values for quality, level and noise.

char ap[32];
MAC address of current access point/cell

Commands

This interface accepts no commands.


next up previous contents
Next: 7. Device Drivers Up: 6. Device Interfaces Previous: 6.27 waveform   Contents
2004-06-02