wifi

package
v2.0.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2018 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const IFNAMSIZ = 16

* Private ioctl interface information

View Source
const IWEVASSOCREQIE = 0x8C07 /* IEs used in (Re)Association Request.
 * The data includes id and length
 * fields and may contain more than one
 * IE. This event is required in
 * Managed mode if the driver
 * generates its own WPA/RSN IE. This
 * should be sent just before
 * IWEVREGISTERED event for the
 * association. */
View Source
const IWEVASSOCRESPIE = 0x8C08 /* IEs used in (Re)Association
 * Response. The data includes id and
 * length fields and may contain more
 * than one IE. This may be sent
 * between IWEVASSOCREQIE and
 * IWEVREGISTERED events for the
 * association. */
View Source
const IWEVCUSTOM = 0x8C02 /* Driver specific ascii string */
View Source
const IWEVEXPIRED = 0x8C04 /* Expired a node (AP mode) */
View Source
const IWEVFIRST = 0x8C00
View Source
const IWEVGENIE = 0x8C05 /* Generic IE (WPA, RSN, WMM, ..)
 * (scan results); This includes id and
 * length fields. One IWEVGENIE may
 * contain more than one IE. Scan
 * results may contain one or more
 * IWEVGENIE events. */
View Source
const IWEVMICHAELMICFAILURE = 0x8C06 /* Michael MIC failure
 * (struct iw_michaelmicfailure)
 */
View Source
const IWEVPMKIDCAND = 0x8C09 /* PMKID candidate for RSN
 * pre-authentication
 * (struct iw_pmkid_cand) */
View Source
const IWEVQUAL = 0x8C01 /* Quality part of statistics (scan) */
View Source
const IWEVREGISTERED = 0x8C03 /* Discovered a new node (AP mode) */
View Source
const IWEVTXDROP = 0x8C00 /* Packet dropped to excessive retry */
View Source
const IW_AUTH_80211_AUTH_ALG = 6
View Source
const IW_AUTH_ALG_LEAP = 0x00000004
View Source
const IW_AUTH_ALG_OPEN_SYSTEM = 0x00000001

IW_AUTH_80211_AUTH_ALG values (bit field)

View Source
const IW_AUTH_ALG_SHARED_KEY = 0x00000002
View Source
const IW_AUTH_CIPHER_AES_CMAC = 0x00000020
View Source
const IW_AUTH_CIPHER_CCMP = 0x00000008
View Source
const IW_AUTH_CIPHER_GROUP = 2
View Source
const IW_AUTH_CIPHER_GROUP_MGMT = 11
View Source
const IW_AUTH_CIPHER_NONE = 0x00000001

IW_AUTH_PAIRWISE_CIPHER, IW_AUTH_GROUP_CIPHER, and IW_AUTH_CIPHER_GROUP_MGMT * values (bit field)

View Source
const IW_AUTH_CIPHER_PAIRWISE = 1
View Source
const IW_AUTH_CIPHER_TKIP = 0x00000004
View Source
const IW_AUTH_CIPHER_WEP104 = 0x00000010
View Source
const IW_AUTH_CIPHER_WEP40 = 0x00000002
View Source
const IW_AUTH_DROP_UNENCRYPTED = 5
View Source
const IW_AUTH_FLAGS = 0xF000
View Source
const IW_AUTH_INDEX = 0x0FFF

SIOCSIWAUTH/SIOCGIWAUTH struct iw_param flags

View Source
const IW_AUTH_KEY_MGMT = 3
View Source
const IW_AUTH_KEY_MGMT_802_1X = 1

IW_AUTH_KEY_MGMT values (bit field)

View Source
const IW_AUTH_KEY_MGMT_PSK = 2
View Source
const IW_AUTH_MFP = 12
View Source
const IW_AUTH_MFP_DISABLED = 0 /* MFP disabled */

IW_AUTH_MFP (management frame protection) values

View Source
const IW_AUTH_MFP_OPTIONAL = 1 /* MFP optional */
View Source
const IW_AUTH_MFP_REQUIRED = 2 /* MFP required */
View Source
const IW_AUTH_PRIVACY_INVOKED = 10
View Source
const IW_AUTH_ROAMING_CONTROL = 9
View Source
const IW_AUTH_ROAMING_DISABLE = 1 /* user space program used for roaming
 * control */
View Source
const IW_AUTH_ROAMING_ENABLE = 0 /* driver/firmware based roaming */

IW_AUTH_ROAMING_CONTROL values

View Source
const IW_AUTH_RX_UNENCRYPTED_EAPOL = 8
View Source
const IW_AUTH_TKIP_COUNTERMEASURES = 4
View Source
const IW_AUTH_WPA_ENABLED = 7
View Source
const IW_AUTH_WPA_VERSION = 0

SIOCSIWAUTH/SIOCGIWAUTH parameters (0 .. 4095) * (IW_AUTH_INDEX mask in struct iw_param flags; this is the index of the * parameter that is being set/get to; value will be read/written to * struct iw_param value field)

View Source
const IW_AUTH_WPA_VERSION_DISABLED = 0x00000001

IW_AUTH_WPA_VERSION values (bit field)

View Source
const IW_AUTH_WPA_VERSION_WPA = 0x00000002
View Source
const IW_AUTH_WPA_VERSION_WPA2 = 0x00000004
View Source
const IW_CUSTOM_MAX = 256 /* In bytes */

Max number of char in custom event - use multiple of them if needed

View Source
const IW_ENCODE_ALG_AES_CMAC = 5
View Source
const IW_ENCODE_ALG_CCMP = 3
View Source
const IW_ENCODE_ALG_NONE = 0

struct iw_encode_ext ->alg

View Source
const IW_ENCODE_ALG_PMK = 4
View Source
const IW_ENCODE_ALG_TKIP = 2
View Source
const IW_ENCODE_ALG_WEP = 1
View Source
const IW_ENCODE_DISABLED = 0x8000 /* Encoding disabled */
View Source
const IW_ENCODE_ENABLED = 0x0000 /* Encoding enabled */
View Source
const IW_ENCODE_EXT_GROUP_KEY = 0x00000004
View Source
const IW_ENCODE_EXT_RX_SEQ_VALID = 0x00000002
View Source
const IW_ENCODE_EXT_SET_TX_KEY = 0x00000008
View Source
const IW_ENCODE_EXT_TX_SEQ_VALID = 0x00000001

struct iw_encode_ext ->ext_flags

View Source
const IW_ENCODE_FLAGS = 0xFF00 /* Flags defined below */
View Source
const IW_ENCODE_INDEX = 0x00FF /* Token index (if needed) */

Flags for encoding (along with the token)

View Source
const IW_ENCODE_MODE = 0xF000 /* Modes defined below */
View Source
const IW_ENCODE_NOKEY = 0x0800 /* Key is write only, so not present */
View Source
const IW_ENCODE_OPEN = 0x2000 /* Accept non-encoded packets */
View Source
const IW_ENCODE_RESTRICTED = 0x4000 /* Refuse non-encoded packets */
View Source
const IW_ENCODE_SEQ_MAX_SIZE = 8

SIOCSIWENCODEEXT definitions

View Source
const IW_ENCODE_TEMP = 0x0400 /* Temporary key */
View Source
const IW_ENCODING_TOKEN_MAX = 64 /* 512 bits (for now) */

Maximum size of the encoding token in bytes

View Source
const IW_ENC_CAPA_4WAY_HANDSHAKE = 0x00000010
View Source
const IW_ENC_CAPA_CIPHER_CCMP = 0x00000008
View Source
const IW_ENC_CAPA_CIPHER_TKIP = 0x00000004
View Source
const IW_ENC_CAPA_WPA = 0x00000001

Bit field values for enc_capa in struct iw_range

View Source
const IW_ENC_CAPA_WPA2 = 0x00000002
View Source
const IW_ESSID_MAX_SIZE = 32

Maximum size of the ESSID and NICKN strings

View Source
const IW_EV_LCP_PK_LEN = (4)

stupid sizeof tricks for the inevitable binary interface.

Size of the Event prefix (including padding and alignement junk) *

const IW_EV_LCP_LEN = (sizeof(struct iw_event) - sizeof(union iwreq_data)) /* Size of the various events * const IW_EV_CHAR_LEN = (IW_EV_LCP_LEN + IFNAMSIZ) const IW_EV_UINT_LEN = (IW_EV_LCP_LEN + sizeof(uint32)) const IW_EV_FREQ_LEN = (IW_EV_LCP_LEN + sizeof(struct iw_freq)) const IW_EV_PARAM_LEN = (IW_EV_LCP_LEN + sizeof(struct iw_param)) const IW_EV_ADDR_LEN = (IW_EV_LCP_LEN + sizeof(struct sockaddr)) const IW_EV_QUAL_LEN = (IW_EV_LCP_LEN + sizeof(struct iw_quality))

/* iw_point events are special. First, the payload (extra data) come at

  • the end of the event, so they are bigger than IW_EV_POINT_LEN. Second,
  • we omit the pointer, so start at an offset. *

const IW_EV_POINT_OFF = (((char *) &(((struct iw_point *) NULL)->length)) - (char *) NULL) const IW_EV_POINT_LEN = (IW_EV_LCP_LEN + sizeof(struct iw_point) - IW_EV_POINT_OFF)

/* Size of the Event prefix when packed in stream

View Source
const IW_EV_POINT_PK_LEN = (IW_EV_LCP_PK_LEN + 4)
Size of the various events when packed in stream *

const IW_EV_CHAR_PK_LEN = (IW_EV_LCP_PK_LEN + IFNAMSIZ) const IW_EV_UINT_PK_LEN = (IW_EV_LCP_PK_LEN + sizeof(uint32)) const IW_EV_FREQ_PK_LEN = (IW_EV_LCP_PK_LEN + sizeof(struct iw_freq)) const IW_EV_PARAM_PK_LEN = (IW_EV_LCP_PK_LEN + sizeof(struct iw_param)) const IW_EV_ADDR_PK_LEN = (IW_EV_LCP_PK_LEN + sizeof(struct sockaddr)) const IW_EV_QUAL_PK_LEN = (IW_EV_LCP_PK_LEN + sizeof(struct iw_quality))

View Source
const IW_FREQ_AUTO = 0x00 /* Let the driver decides */

Frequency flags

View Source
const IW_FREQ_FIXED = 0x01 /* Force a specific value */
View Source
const IW_GENERIC_IE_MAX = 1024

Generic information element

View Source
const IW_MAX_AP = 64

Maximum of address that you may get in the

list of access points in range
View Source
const IW_MAX_BITRATES = 32

Maximum bit rates in the range struct

View Source
const IW_MAX_ENCODING_SIZES = 8

Maximum number of size of encoding token available * they are listed in the range structure

View Source
const IW_MAX_FREQUENCIES = 32

Maximum frequencies in the range struct

View Source
const IW_MAX_SPY = 8

Maximum of address that you may set with SPY

View Source
const IW_MAX_TXPOWER = 8

Maximum tx powers in the range struct

View Source
const IW_MICFAILURE_COUNT = 0x00000060 /* 1 or 2 (0 = count not supported)
 */
View Source
const IW_MICFAILURE_GROUP = 0x00000004
View Source
const IW_MICFAILURE_KEY_ID = 0x00000003 /* Key ID 0..3 */

IWEVMICHAELMICFAILURE : struct iw_michaelmicfailure ->flags

View Source
const IW_MICFAILURE_PAIRWISE = 0x00000008
View Source
const IW_MICFAILURE_STAKEY = 0x00000010
View Source
const IW_MLME_ASSOC = 3
View Source
const IW_MLME_AUTH = 2
View Source
const IW_MLME_DEAUTH = 0

MLME requests (SIOCSIWMLME / struct iw_mlme)

View Source
const IW_MLME_DISASSOC = 1
View Source
const IW_MODE_ADHOC = 1 /* Single cell network */
View Source
const IW_MODE_AUTO = 0 /* Let the driver decides */

Modes of operation

View Source
const IW_MODE_INFRA = 2 /* Multi cell network, roaming, ... */
View Source
const IW_MODE_MASTER = 3 /* Synchronisation master or Access Point */
View Source
const IW_MODE_MESH = 7 /* Mesh (IEEE 802.11s) network */
View Source
const IW_MODE_MONITOR = 6 /* Passive monitor (listen only) */
View Source
const IW_MODE_REPEAT = 4 /* Wireless Repeater (forwarder) */
View Source
const IW_MODE_SECOND = 5 /* Secondary master/repeater (backup) */
View Source
const IW_PMKID_CAND_PREAUTH = 0x00000001 /* RNS pre-authentication enabled */

IWEVPMKIDCAND data

View Source
const IW_PMKID_LEN = 16
View Source
const IW_PMKSA_ADD = 1

SIOCSIWPMKSA data

View Source
const IW_PMKSA_FLUSH = 3
View Source
const IW_PMKSA_REMOVE = 2
View Source
const IW_POWER_ALL_R = 0x0300 /* Receive all messages though PM */
View Source
const IW_POWER_FORCE_S = 0x0400 /* Force PM procedure for sending unicast */
View Source
const IW_POWER_MAX = 0x0002 /* Value is a maximum */
View Source
const IW_POWER_MIN = 0x0001 /* Value is a minimum  */
View Source
const IW_POWER_MODE = 0x0F00 /* Power Management mode */
View Source
const IW_POWER_MODIFIER = 0x000F /* Modify a parameter */
View Source
const IW_POWER_MULTICAST_R = 0x0200 /* Receive only multicast messages */
View Source
const IW_POWER_ON = 0x0000 /* No details... */

Power management flags available (along with the value, if any)

View Source
const IW_POWER_PERIOD = 0x1000 /* Value is a period/duration of  */
View Source
const IW_POWER_RELATIVE = 0x0004 /* Value is not in seconds/ms/us */
View Source
const IW_POWER_REPEATER = 0x0800 /* Repeat broadcast messages in PM period */
View Source
const IW_POWER_TIMEOUT = 0x2000 /* Value is a timeout (to go asleep) */
View Source
const IW_POWER_TYPE = 0xF000 /* Type of parameter */
View Source
const IW_POWER_UNICAST_R = 0x0100 /* Receive only unicast messages */
View Source
const IW_PRIV_SIZE_FIXED = 0x0800 /* Variable or fixed number of args */
View Source
const IW_PRIV_SIZE_MASK = 0x07FF /* Max number of those args */
View Source
const IW_PRIV_TYPE_ADDR = 0x6000 /* struct sockaddr */
View Source
const IW_PRIV_TYPE_BYTE = 0x1000 /* Char as number */
View Source
const IW_PRIV_TYPE_CHAR = 0x2000 /* Char as character */
View Source
const IW_PRIV_TYPE_FLOAT = 0x5000 /* struct iw_freq */
View Source
const IW_PRIV_TYPE_INT = 0x4000 /* 32 bits int */
View Source
const IW_PRIV_TYPE_MASK = 0x7000 /* Type of arguments */
View Source
const IW_PRIV_TYPE_NONE = 0x0000
View Source
const IW_QUAL_ALL_INVALID = 0x70
View Source
const IW_QUAL_ALL_UPDATED = 0x07
View Source
const IW_QUAL_DBM = 0x08 /* Level + Noise are dBm */
View Source
const IW_QUAL_LEVEL_INVALID = 0x20
View Source
const IW_QUAL_LEVEL_UPDATED = 0x02
View Source
const IW_QUAL_NOISE_INVALID = 0x40
View Source
const IW_QUAL_NOISE_UPDATED = 0x04
View Source
const IW_QUAL_QUAL_INVALID = 0x10 /* Driver doesn't provide value */
View Source
const IW_QUAL_QUAL_UPDATED = 0x01 /* Value was updated since last read */

Statistics flags (bitmask in updated)

View Source
const IW_QUAL_RCPI = 0x80 /* Level + Noise are 802.11k RCPI */
View Source
const IW_RETRY_LIFETIME = 0x2000 /* Maximum duration of retries in us */
View Source
const IW_RETRY_LIMIT = 0x1000 /* Maximum number of retries*/
View Source
const IW_RETRY_LONG = 0x0020 /* Value is for long packets */
View Source
const IW_RETRY_MAX = 0x0002 /* Value is a maximum */
View Source
const IW_RETRY_MIN = 0x0001 /* Value is a minimum  */
View Source
const IW_RETRY_MODIFIER = 0x00FF /* Modify a parameter */
View Source
const IW_RETRY_ON = 0x0000 /* No details... */

Retry limits and lifetime flags available

View Source
const IW_RETRY_RELATIVE = 0x0004 /* Value is not in seconds/ms/us */
View Source
const IW_RETRY_SHORT = 0x0010 /* Value is for short packets  */
View Source
const IW_RETRY_TYPE = 0xF000 /* Type of parameter */
View Source
const IW_SCAN_ALL_ESSID = 0x0001 /* Scan all ESSIDs */
View Source
const IW_SCAN_ALL_FREQ = 0x0004 /* Scan all Frequencies */
View Source
const IW_SCAN_ALL_MODE = 0x0010 /* Scan all Modes */
View Source
const IW_SCAN_ALL_RATE = 0x0040 /* Scan all Bit-Rates */
View Source
const IW_SCAN_CAPA_BSSID = 0x02
View Source
const IW_SCAN_CAPA_CHANNEL = 0x04
View Source
const IW_SCAN_CAPA_ESSID = 0x01
View Source
const IW_SCAN_CAPA_MODE = 0x08
View Source
const IW_SCAN_CAPA_NONE = 0x00

Scan capability flags - in (struct iw_range *)->scan_capa

View Source
const IW_SCAN_CAPA_RATE = 0x10
View Source
const IW_SCAN_CAPA_TIME = 0x40
View Source
const IW_SCAN_CAPA_TYPE = 0x20
View Source
const IW_SCAN_DEFAULT = 0x0000 /* Default scan of the driver */

Scanning request flags

View Source
const IW_SCAN_MAX_DATA = 4096 /* In bytes */

Maximum size of returned data

View Source
const IW_SCAN_THIS_ESSID = 0x0002 /* Scan only this ESSID */
View Source
const IW_SCAN_THIS_FREQ = 0x0008 /* Scan only this Frequency */
View Source
const IW_SCAN_THIS_MODE = 0x0020 /* Scan only this Mode */
View Source
const IW_SCAN_THIS_RATE = 0x0080 /* Scan only this Bit-Rate */
View Source
const IW_SCAN_TYPE_ACTIVE = 0

struct iw_scan_req scan_type

View Source
const IW_SCAN_TYPE_PASSIVE = 1
View Source
const IW_TXPOW_DBM = 0x0000 /* Value is in dBm */
View Source
const IW_TXPOW_MWATT = 0x0001 /* Value is in mW */
View Source
const IW_TXPOW_RANGE = 0x1000 /* Range of value between min/max */
View Source
const IW_TXPOW_RELATIVE = 0x0002 /* Value is in arbitrary units */
View Source
const IW_TXPOW_TYPE = 0x00FF /* Type of value */

Transmit Power flags available

View Source
const SIOCGIWAP = 0x8B15 /* get access point MAC addresses */
View Source
const SIOCGIWAPLIST = 0x8B17 /* Deprecated in favor of scanning */
View Source
const SIOCGIWAUTH = 0x8B33 /* get authentication mode params */
View Source
const SIOCGIWENCODE = 0x8B2B /* get encoding token & mode */
View Source
const SIOCGIWENCODEEXT = 0x8B35 /* get encoding token & mode */
View Source
const SIOCGIWESSID = 0x8B1B /* get ESSID */
View Source
const SIOCGIWFRAG = 0x8B25 /* get fragmentation thr (bytes) */
View Source
const SIOCGIWFREQ = 0x8B05 /* get channel/frequency (Hz) */
View Source
const SIOCGIWGENIE = 0x8B31 /* get generic IE */
View Source
const SIOCGIWMODE = 0x8B07 /* get operation mode */
View Source
const SIOCGIWNAME = 0x8B01 /* get name == wireless protocol */
View Source
const SIOCGIWNICKN = 0x8B1D /* get node name/nickname */
View Source
const SIOCGIWNWID = 0x8B03 /* get network id (the cell) */
View Source
const SIOCGIWPOWER = 0x8B2D /* get Power Management settings */
View Source
const SIOCGIWPRIV = 0x8B0D /* get private ioctl interface info */
View Source
const SIOCGIWRANGE = 0x8B0B /* Get range of parameters */
View Source
const SIOCGIWRATE = 0x8B21 /* get default bit rate (bps) */
View Source
const SIOCGIWRETRY = 0x8B29 /* get retry limits and lifetime */
View Source
const SIOCGIWRTS = 0x8B23 /* get RTS/CTS threshold (bytes) */
View Source
const SIOCGIWSCAN = 0x8B19 /* get scanning results */
View Source
const SIOCGIWSENS = 0x8B09 /* get sensitivity (dBm) */
View Source
const SIOCGIWSPY = 0x8B11 /* get spy info (quality of link) */
View Source
const SIOCGIWSTATS = 0x8B0F /* Get /proc/net/wireless stats */
View Source
const SIOCGIWTHRSPY = 0x8B13 /* get spy threshold */
View Source
const SIOCGIWTXPOW = 0x8B27 /* get transmit power (dBm) */
View Source
const SIOCIWFIRST = 0x8B00

The first and the last (range)

View Source
const SIOCIWFIRSTPRIV = 0x8BE0

These 32 ioctl are wireless device private, for 16 commands. * Each driver is free to use them for whatever purpose it chooses, * however the driver *must* export the description of those ioctls * with SIOCGIWPRIV and *must* use arguments as defined below. * If you don't follow those rules, DaveM is going to hate you (reason : * it make mixed 32/64bit operation impossible).

View Source
const SIOCIWLAST = SIOCIWLASTPRIV /* 0x8BFF */
View Source
const SIOCIWLASTPRIV = 0x8BFF
View Source
const SIOCSIWAP = 0x8B14 /* set access point MAC addresses */

Access Point manipulation

View Source
const SIOCSIWAUTH = 0x8B32 /* set authentication mode params */

WPA : Authentication mode parameters

View Source
const SIOCSIWCOMMIT = 0x8B00 /* Commit pending changes to driver */

Wireless Identification

View Source
const SIOCSIWENCODE = 0x8B2A /* set encoding token & mode */

Encoding stuff (scrambling, hardware security, WEP...)

View Source
const SIOCSIWENCODEEXT = 0x8B34 /* set encoding token & mode */

WPA : Extended version of encoding configuration

View Source
const SIOCSIWESSID = 0x8B1A /* set ESSID (network name) */

802.11 specific support

View Source
const SIOCSIWFRAG = 0x8B24 /* set fragmentation thr (bytes) */
View Source
const SIOCSIWFREQ = 0x8B04 /* set channel/frequency (Hz) */
View Source
const SIOCSIWGENIE = 0x8B30 /* set generic IE */

WPA : Generic IEEE 802.11 informatiom element (e.g., for WPA/RSN/WMM). * This ioctl uses struct iw_point and data buffer that includes IE id and len * fields. More than one IE may be included in the request. Setting the generic * IE to empty buffer (len=0) removes the generic IE from the driver. Drivers * are allowed to generate their own WPA/RSN IEs, but in these cases, drivers * are required to report the used IE as a wireless event, e.g., when * associating with an AP.

View Source
const SIOCSIWMLME = 0x8B16 /* request MLME operation; uses
 * struct iw_mlme */

WPA : IEEE 802.11 MLME requests

View Source
const SIOCSIWMODE = 0x8B06 /* set operation mode */
View Source
const SIOCSIWNICKN = 0x8B1C /* set node name/nickname */
View Source
const SIOCSIWNWID = 0x8B02 /* set network id (pre-802.11) */

Basic operations

View Source
const SIOCSIWPMKSA = 0x8B36 /* PMKSA cache operation */

WPA2 : PMKSA cache management

View Source
const SIOCSIWPOWER = 0x8B2C /* set Power Management settings */

Power saving stuff (power management, unicast and multicast)

View Source
const SIOCSIWPRIV = 0x8B0C /* Unused */
View Source
const SIOCSIWRANGE = 0x8B0A /* Unused */

Informative stuff

View Source
const SIOCSIWRATE = 0x8B20 /* set default bit rate (bps) */

Other parameters useful in 802.11 and some other devices

View Source
const SIOCSIWRETRY = 0x8B28 /* set retry limits and lifetime */
View Source
const SIOCSIWRTS = 0x8B22 /* set RTS/CTS threshold (bytes) */
View Source
const SIOCSIWSCAN = 0x8B18 /* trigger scanning (list cells) */
View Source
const SIOCSIWSENS = 0x8B08 /* set sensitivity (dBm) */
View Source
const SIOCSIWSPY = 0x8B10 /* set spy addresses */

Spy support (statistics per MAC address - used for Mobile IP support)

View Source
const SIOCSIWSTATS = 0x8B0E /* Unused */
View Source
const SIOCSIWTHRSPY = 0x8B12 /* set spy threshold (spy event) */
View Source
const SIOCSIWTXPOW = 0x8B26 /* set transmit power (dBm) */
View Source
const WIRELESS_EXT = 22

**************************** VERSION ****************************

  • This constant is used to know the availability of the wireless
  • extensions and to know which version of wireless extensions it is
  • (there is some stuff that will be added in the future...)
  • I just plan to increment with each new version.

Variables

View Source
var IW_EVENT_CAPA_K_0 = (IW_EVENT_CAPA_MASK(0x8B04) | IW_EVENT_CAPA_MASK(0x8B06) | IW_EVENT_CAPA_MASK(0x8B1A))

Event capability constants - event autogenerated by the kernel * This list is valid for most 802.11 devices, customise as needed...

View Source
var IW_EVENT_CAPA_K_1 = (IW_EVENT_CAPA_MASK(0x8B2A))

Functions

func IW_EVENT_CAPA_BASE

func IW_EVENT_CAPA_BASE(cmd uint32) uint32

Event capability macros - in (struct iw_range *)->event_capa * Because we have more than 32 possible events, we use an array of * 32 bit bitmasks. Note : 32 bits = 0x20 = 2^5.

func IW_EVENT_CAPA_INDEX

func IW_EVENT_CAPA_INDEX(cmd uint32) uint32

func IW_EVENT_CAPA_MASK

func IW_EVENT_CAPA_MASK(cmd uint32) uint32

func IW_EVENT_CAPA_SET

func IW_EVENT_CAPA_SET(event_capa []uint32, cmd uint32)

"Easy" macro to set events in iw_range (less efficient)

func IW_EVENT_CAPA_SET_KERNEL

func IW_EVENT_CAPA_SET_KERNEL(event_capa []uint32)

func IW_EVENT_IDX

func IW_EVENT_IDX(cmd uint32) uint32

func IW_IS_GET

func IW_IS_GET(cmd uint32) bool

func IW_IS_SET

func IW_IS_SET(cmd uint32) bool

What is this stuff? Odd is right.

Odd : get (world access), even : set (root access)

Types

type IWLWorker

type IWLWorker struct {
	Interface string
}

IWLWorker implements the WiFi interface using the Intel Wireless LAN commands

func (*IWLWorker) Connect

func (w *IWLWorker) Connect(a ...string) error

func (*IWLWorker) GetID

func (w *IWLWorker) GetID() (string, error)

func (*IWLWorker) Scan

func (w *IWLWorker) Scan() ([]Option, error)

type IWRange

type IWRange struct {
	// contains filtered or unexported fields
}

type NativeWorker

type NativeWorker struct {
	Interface string
	FD        int
	Range     IWRange
}

func (*NativeWorker) Connect

func (w *NativeWorker) Connect(a ...string) error

func (*NativeWorker) GetID

func (w *NativeWorker) GetID() (string, error)

func (*NativeWorker) Scan

func (w *NativeWorker) Scan() ([]Option, error)

type Option

type Option struct {
	Essid     string
	AuthSuite SecProto
}

type SecProto

type SecProto int
const (
	NoEnc SecProto = iota
	WpaPsk
	WpaEap
	NotSupportedProto
)

type StubWorker

type StubWorker struct {
	Options []Option
	ID      string
}

func (*StubWorker) Connect

func (*StubWorker) Connect(a ...string) error

func (*StubWorker) GetID

func (w *StubWorker) GetID() (string, error)

func (*StubWorker) Scan

func (w *StubWorker) Scan() ([]Option, error)

type WiFi

type WiFi interface {
	Scan() ([]Option, error)
	GetID() (string, error)
	Connect(a ...string) error
}

func NewIWLWorker

func NewIWLWorker(i string) (WiFi, error)

func NewNativeWorker

func NewNativeWorker(i string) (WiFi, error)

func NewStubWorker

func NewStubWorker(id string, options ...Option) (WiFi, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL