- Timestamp:
- Feb 14, 2013, 9:44:35 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/gformat.py
r11736 r11738 31 31 import sys 32 32 import os 33 import re34 33 sys.path.append(os.path.dirname(__file__)) 35 34 sys.path.append('/usr/local/bin') … … 41 40 import make_network_kml 42 41 import math 42 import random 43 43 import rdnap 44 import re 44 45 import socket 45 46 import string … … 47 48 import time 48 49 import urlparse 50 49 51 from pprint import pprint 50 52 from collections import defaultdict … … 1835 1837 datadump[iface_key] = datadump[iface_key]['desc'] 1836 1838 1839 # We are not using 802.11b anymore. OFDM is preferred over DSSS 1840 # due to better collision avoidance. 1841 if datadump[iface_key]['type'] == '11b': 1842 datadump[iface_key]['type'] = '11g' 1843 1844 # Setting 802.11g channels to de-facto standards, to avoid 1845 # un-detected sharing with other overlapping channels 1846 # 1847 # Technically we could also use channel 13 in NL, but this is not 1848 # recommended as foreign devices might not be able to select this 1849 # channel. Secondly using 1,5,9,13 instead is going to clash with 1850 # the de-facto usage of 1,6,11. 1851 # 1852 # See: https://en.wikipedia.org/wiki/List_of_WLAN_channels 1853 channels_at_2400Mhz = (1,6,11) 1854 if datadump[iface_key]['type'] == '11g' and datadump[iface_key].has_key('channel'): 1855 datadump[iface_key]['channel'] = int(datadump[iface_key]['channel']) 1856 if datadump[iface_key]['channel'] not in channels_at_2400Mhz: 1857 datadump[iface_key]['channel'] = random.choice(channels_at_2400Mhz) 1858 1837 1859 # Mandatory interface keys 1838 1860 if not datadump[iface_key].has_key('status'):
Note:
See TracChangeset
for help on using the changeset viewer.