49 printf (
"not associated, " );
55 case NET80211_SIGNAL_NONE:
58 case NET80211_SIGNAL_ARBITRARY:
61 case NET80211_SIGNAL_DB:
64 case NET80211_SIGNAL_DBM:
68 printf (
", Qual:%d%% Rate:%d Mbps]\n",
74 printf (
"antenna off]\n" );
78 printf (
" [associating" );
95#define NR_CRYPTO_TYPES ( sizeof ( crypto_types ) / sizeof ( crypto_types[0] ) )
106#define NR_AUTH_TYPES ( sizeof ( auth_types ) / sizeof ( auth_types[0] ) )
130 if ( ! was_opened ) {
139 goto err_close_netdev;
142 if ( ! was_opened ) {
145 goto err_close_netdev;
151 goto err_close_netdev;
161 goto err_free_networks;
179 printf (
"[Sig] SSID BSSID Ch Crypt/Auth\n"
180 "-------------------------------------------------------------\n" );
187 snprintf ( ssid_buf,
sizeof ( ssid_buf ),
"%s", wlan->
essid );
188 for ( i =
strlen ( ssid_buf ); i <
sizeof ( ssid_buf ) - 1;
191 if ( ssid_buf[
sizeof ( ssid_buf ) - 2] !=
' ' )
192 ssid_buf[
sizeof ( ssid_buf ) - 2] =
'>';
193 ssid_buf[
sizeof ( ssid_buf ) - 1] = 0;
200 printf (
"[%3d] %s %s %2d %s %s\n",
212 if ( ! was_opened ) {
223 printf (
"Scanning for networks on %s: %s\n",
struct golan_eq_context ctx
struct arbelprm_rc_send_wqe rc
const char * eth_ntoa(const void *ll_addr)
Transcribe Ethernet address.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
int net80211_change_channel(struct net80211_device *dev, int channel)
Configure 802.11 device to transmit on a certain channel.
void net80211_free_wlanlist(struct list_head *list)
Free list of WLAN structures.
struct list_head * net80211_probe_finish_all(struct net80211_probe_ctx *ctx)
Finish probe of 802.11 networks, returning all networks found.
int net80211_prepare_probe(struct net80211_device *dev, int band, int active)
Prepare 802.11 device channel and rate set for scanning.
struct net80211_probe_ctx * net80211_probe_start(struct net80211_device *dev, const char *essid, int active)
Begin probe of 802.11 networks.
int net80211_probe_step(struct net80211_probe_ctx *ctx)
Continue probe of 802.11 networks.
#define NET80211_WORKING
Whether the auto-association task is running.
#define NET80211_NO_ASSOC
Whether the auto-association task should be suppressed.
#define NET80211_ASSOCIATED
Whether we have successfully associated with the network.
#define EINVAL
Invalid argument.
#define ENOMEM
Not enough space.
void ifstat(struct net_device *netdev)
Print status of network device.
Network interface management.
#define NR_AUTH_TYPES
Number of 802.11 authentication types defined.
int iwlist(struct net80211_device *dev)
Scan for wireless networks using 802.11 device.
static const char * crypto_types[]
Identifiers for 802.11 cryptography types, indexed by type number.
void iwstat(struct net80211_device *dev)
Print status of 802.11 device.
static const char * auth_types[]
Identifiers for 802.11 authentication types, indexed by type number.
#define NR_CRYPTO_TYPES
Number of 802.11 cryptography types defined.
Wireless network interface management.
#define list_for_each_entry(pos, head, member)
Iterate over entries in a list.
#define list_empty(list)
Test whether a list is empty.
The iPXE 802.11 MAC layer.
@ NET80211_SECPROT_UNKNOWN
Dummy value used when the handshaking type can't be detected.
@ NET80211_SECPROT_NONE
No security handshaking.
@ NET80211_SECPROT_PSK
Pre-shared key handshaking.
@ NET80211_SECPROT_EAP
Full EAP 802.1X handshaking.
@ NET80211_CRYPT_NONE
No security, an "Open" network.
@ NET80211_CRYPT_CCMP
Network protected with CCMP (AES-based system)
@ NET80211_CRYPT_TKIP
Network protected with TKIP (better RC4-based system)
@ NET80211_CRYPT_UNKNOWN
Dummy value used when the cryptosystem can't be detected.
@ NET80211_CRYPT_WEP
Network protected with WEP (awful RC4-based system)
int netdev_open(struct net_device *netdev)
Open network device.
void netdev_close(struct net_device *netdev)
Close network device.
static int netdev_is_open(struct net_device *netdev)
Check whether or not network device is open.
void step(void)
Single-step a single process.
char * strerror(int errno)
Retrieve string representation of error number.
size_t strlen(const char *src)
Get length of string.
A doubly-linked list entry (or list head)
u8 channel_nr
A channel number interpreted according to the band.
Structure encapsulating the complete state of an 802.11 device.
struct net_device * netdev
The net_device that wraps us.
u16 rates[NET80211_MAX_RATES]
A list of all possible TX rates we might use.
struct net80211_channel channels[NET80211_MAX_CHANNELS]
A list of all possible channels we might use.
char essid[IEEE80211_MAX_SSID_LEN+1]
SSID of the access point we are or will be associated with.
u32 tx_beacon_interval
Time between AP sending beacons, microseconds.
u16 state
State of our association to the network.
int last_signal
Signal strength of last received packet.
u8 channel
The channel currently in use, as an index into the channels array.
u32 rx_beacon_interval
Smoothed average time between beacons, microseconds.
struct net80211_wlan * associating
Network with which we are associating.
u8 nr_channels
The number of channels in the channels array.
u8 rate
The rate currently in use, as an index into the rates array.
struct net80211_hw_info * hw
Information about the hardware, provided to net80211_register()
u8 nr_rates
The number of transmission rates in the rates array.
int bands
A bitwise OR of the bands on which this device can communicate.
unsigned signal_max
Maximum signal in arbitrary cases.
enum net80211_hw_info::@160150106134320172247032061203111226300065160315 signal_type
Signal strength information that can be provided by the device.
Context for a probe operation.
Structure representing a probed network.
struct list_head list
Link to allow chaining multiple structures into a list to be returned from net80211_probe_finish_all(...
u8 bssid[ETH_ALEN]
MAC address of the strongest-signal access point for this ESSID.
char essid[IEEE80211_MAX_SSID_LEN+1]
The human-readable ESSID (network name)
int channel
The channel on which that access point communicates.
enum net80211_crypto_alg crypto
Cryptographic algorithm used on the network.
int signal
Signal strength of beacon frame from that access point.
enum net80211_security_proto handshaking
Security handshaking method used on the network.
char name[NETDEV_NAME_LEN]
Name of this network device.
int printf(const char *fmt,...)
Write a formatted string to the console.
int snprintf(char *buf, size_t size, const char *fmt,...)
Write a formatted string to a buffer.