1 # -*- coding: ISO-8859-1 -*-
2 # python-wifi -- a wireless library to access wireless cards via python
3 # Copyright (C) 2004, 2005, 2006 RĂ³man Joost
5 # This library is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU Lesser General Public License
7 # as published by the Free Software Foundation; either version 2.1 of
8 # the License, or (at your option) any later version.
10 # This library is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # Lesser General Public License for more details.
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with this library; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
29 IW_ESSID_MAX_SIZE = 16
35 # ioctl calls for the Linux/i386 kernel
36 SIOCIWFIRST = 0x8B00 # FIRST ioctl identifier
37 SIOCGIFCONF = 0x8912 # ifconf struct
38 SIOCGIWNAME = 0x8B01 # get name == wireless protocol
39 SIOCGIWFREQ = 0x8B05 # get channel/frequency
40 SIOCSIWMODE = 0x8B06 # set the operation mode
41 SIOCGIWMODE = 0x8B07 # get operation mode
42 SIOCGIWSENS = 0x8B09 # get sensitivity
43 SIOCGIWAP = 0x8B15 # get AP MAC address
44 SIOCSIWSCAN = 0x8B18 # set scanning off
45 SIOCGIWSCAN = 0x8B19 # get scanning results
46 SIOCGIWRATE = 0x8B21 # get default bit rate
47 SIOCGIWRTS = 0x8B23 # get rts/cts threshold
48 SIOCGIWFRAG = 0x8B25 # get fragmention thrh
49 SIOCGIWTXPOW = 0x8B27 # get transmit power (dBm)
50 SIOCGIWRETRY = 0x8B29 # get retry limit
51 SIOCGIWRANGE = 0x8B0B # range
52 SIOCGIWSTATS = 0x8B0F # get wireless statistics
53 SIOCSIWESSID = 0x8B1A # set essid
54 SIOCGIWESSID = 0x8B1B # get essid
55 SIOCGIWPOWER = 0x8B2D # get power managment settings
56 SIOCGIWENCODE = 0x8B2B # get encryption information
57 SIOCIWLAST = 0x8BFF # LAST ioctl identifier
59 # Power management flags
60 IW_POWER_ON = 0x0000 # No details ...
61 IW_POWER_TYPE = 0xF000 # Type of parameter
62 IW_POWER_PERIOD = 0x1000 # Value is a period/duration of
63 IW_POWER_TIMEOUT = 0x2000 # Value is a timeout
64 IW_POWER_MODE = 0x0F00 # Power management mode
65 IW_POWER_MIN = 0x0001 # Value is a minimum
66 IW_POWER_MAX = 0x0002 # Value is a maximum
67 IW_POWER_RELATIVE = 0x0004 # Value is not in seconds/ms/us
70 IW_RETRY_TYPE = 0xF000 # Type of parameter
73 IW_ENCODE_DISABLED = 0x8000 # encoding is disabled
74 IW_ENCODE_NOKEY = 0x0800 # key is write only, not present
76 # constants responsible for scanning
77 IW_SCAN_MAX_DATA = 4096
80 IW_EV_CHAR_LEN = IW_EV_LCP_LEN + IFNAMSIZE
81 IW_EV_UINT_LEN = IW_EV_LCP_LEN + 4
82 IW_EV_FREQ_LEN = IW_EV_LCP_LEN + 8
83 IW_EV_ADDR_LEN = IW_EV_LCP_LEN + 16
84 IW_EV_POINT_LEN = IW_EV_LCP_LEN + 4
85 IW_EV_PARAM_LEN = IW_EV_LCP_LEN + 8
86 IW_EV_QUAL_LEN = IW_EV_LCP_LEN + 4
101 IWEVFIRST = 0x8C00 # FIRST event identifier
102 IWEVQUAL = 0x8C01 # Quality statistics from scan
103 IWEVCUSTOM = 0x8C02 # Custom Ascii string from Driver
104 IWEVLAST = 0x8C0A # LAST event identifier