• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1"""Class for Wireless config."""
2
3NET_IFACE = "lan"
4
5
6class WirelessConfig(object):
7  """Creates an object to hold wireless config.
8
9  Attributes:
10    name: name of the wireless config
11    ssid: SSID of the network.
12    security: security of the wifi network.
13    band: band of the wifi network.
14    iface: network interface of the wifi network.
15    password: password for psk network.
16    wep_key: wep keys for wep network.
17    wep_key_num: key number for wep network.
18    radius_server_ip: IP address of radius server.
19    radius_server_port: Port number of radius server.
20    radius_server_secret: Secret key of radius server.
21    hidden: Boolean, if the wifi network is hidden.
22    ieee80211w: PMF bit of the wifi network.
23  """
24
25  def __init__(
26      self,
27      name,
28      ssid,
29      security,
30      band,
31      iface=NET_IFACE,
32      password=None,
33      wep_key=None,
34      wep_key_num=1,
35      radius_server_ip=None,
36      radius_server_port=None,
37      radius_server_secret=None,
38      hidden=False,
39      ieee80211w=None):
40    self.name = name
41    self.ssid = ssid
42    self.security = security
43    self.band = band
44    self.iface = iface
45    self.password = password
46    self.wep_key = wep_key
47    self.wep_key_num = wep_key_num
48    self.radius_server_ip = radius_server_ip
49    self.radius_server_port = radius_server_port
50    self.radius_server_secret = radius_server_secret
51    self.hidden = hidden
52    self.ieee80211w = ieee80211w
53
54