Lines Matching refs:nl80211
3 import nl80211
14 nl80211.NL80211_ATTR_MAX, None)
15 if nl80211.NL80211_ATTR_WIPHY in attr:
16 thiswiphy = nl.nla_get_u32(attr[nl80211.NL80211_ATTR_WIPHY])
18 if nl80211.NL80211_ATTR_IFNAME in attr:
19 print("\tinterface %s" % nl.nla_get_string(attr[nl80211.NL80211_ATTR_IFNAME]));
20 if nl80211.NL80211_ATTR_IFINDEX in attr:
21 print("\tifindex %d" % nl.nla_get_u32(attr[nl80211.NL80211_ATTR_IFINDEX]))
22 if nl80211.NL80211_ATTR_WDEV in attr:
23 print("\twdev 0x%lx" % nl.nla_get_u64(attr[nl80211.NL80211_ATTR_WDEV]))
24 if nl80211.NL80211_ATTR_MAC in attr:
25 print("\tmac %02x:%02x:%02x:%02x:%02x:%02x" % tuple(nl.nla_data(attr[nl80211.NL80211_ATTR_MAC])))
26 if nl80211.NL80211_ATTR_SSID in attr:
27 print("\tssid ", nl.nla_data(attr[nl80211.NL80211_ATTR_SSID]))
28 if nl80211.NL80211_ATTR_IFTYPE in attr:
29 iftype = nl.nla_get_u32(attr[nl80211.NL80211_ATTR_IFTYPE])
30 print("\ttype %s" % nl80211.nl80211_iftype2str[iftype])
31 if nl80211.NL80211_ATTR_WIPHY_FREQ in attr:
32 freq = nl.nla_get_u32(attr[nl80211.NL80211_ATTR_WIPHY_FREQ])
36 if nl80211.NL80211_ATTR_CHANNEL_WIDTH in attr:
37 chanw = nl.nla_get_u32(attr[nl80211.NL80211_ATTR_CHANNEL_WIDTH])
38 sys.stdout.write(", width: %s" % nl80211.nl80211_chan_width2str[chanw])
39 if nl80211.NL80211_ATTR_CENTER_FREQ1 in attr:
41 nl.nla_get_u32(attr[nl80211.NL80211_ATTR_CENTER_FREQ1]))
42 if nl80211.NL80211_ATTR_CENTER_FREQ2 in attr:
44 nl.nla_get_u32(attr[nl80211.NL80211_ATTR_CENTER_FREQ2]))
45 elif nl80211.NL80211_ATTR_WIPHY_CHANNEL_TYPE in attr:
46 channel_type = nl.nla_get_u32(attr[nl80211.NL80211_ATTR_WIPHY_CHANNEL_TYPE])
47 sys.stdout.write(" %s" % nl80211.nl80211_channel_type2str(channel_type));
80 genl.genlmsg_put(m, 0, 0, family, 0, 0, nl80211.NL80211_CMD_GET_INTERFACE, 0)
81 nl.nla_put_u32(m, nl80211.NL80211_ATTR_IFINDEX, nl.if_nametoindex('wlan0'))