Skip to content

Commit ebe620c

Browse files
committed
Merge branch 'Development'
2 parents eec6d74 + d57ea6e commit ebe620c

5 files changed

Lines changed: 266 additions & 79 deletions

File tree

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ to generate the appropriate Odin agent click file.
2828

2929
This is an example of how to use the python command:
3030

31-
$ python agent-click-file-gen.py 4 50 14:CC:20:AC:72:91 192.168.1.129 2819 /sys/kernel/debug/ieee80211/phy0/ath9k/bssid_extra odin-unizar 192.168.1.7 0 11 12 25 0
31+
$ python agent-click-file-gen.py 4 50 14:CC:20:AC:72:91 192.168.1.129 2819 /sys/kernel/debug/ieee80211/phy0/ath9k/bssid_extra odin-unizar 192.168.1.7 0 11 12 25 0 1 100 10 5 100 0 FF:FF:FF:FF:FF:FF
3232

3333
where the parameters have the next meaning:
3434

@@ -56,4 +56,18 @@ where the parameters have the next meaning:
5656

5757
`25` the Tx power of the AP is 25 dBm (obtained with `$iw dev mon0 info`)
5858

59-
`0 no hidden mode: the AP will respond to all active scanning requests, even if they have no SSID name
59+
`0` no hidden mode: the AP will respond to all active scanning requests, even if they have no SSID name
60+
61+
`1` multichannel agents: 0 if all the APs are in the same channel, 1 if not
62+
63+
`100` default beacon interval: Time between beacons (in milliseconds)
64+
65+
`10` burst beacon interval: Time between beacons when a burst of CSAs is sent after a handoff (in milliseconds)
66+
67+
`5` burst: number of beacons in burst after add lvap or channel change
68+
69+
`100` measurement beacon interval: Time between measurement beacons (in milliseconds). Used for measuring the distance in dBs between APs
70+
71+
`0` capture mode: if enabled, two files will be generated, one for each interface, storing radiotap statistics
72+
73+
`FF:FF:FF:FF:FF:FF` capture mac: the MAC of the wireless interface in STA that will be monitorized. For capture all traffic: FF:FF:FF:FF:FF:FF

agent-click-file-gen.py

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
import sys
1515

16-
if (len(sys.argv) != 18):
16+
if (len(sys.argv) != 21):
1717
print 'Usage:'
1818
print ''
1919
print '%s <AP_CHANNEL> <QUEUE_SIZE> <MAC_ADDR_AP> <ODIN_MASTER_IP> <ODIN_MASTER_PORT> <DEBUGFS_FILE> <SSIDAGENT> <ODIN_AGENT_IP> <DEBUG_CLICK> <DEBUG_ODIN> <TX_RATE> <TX_POWER> <HIDDEN> <MULTICHANNEL_AGENTS> <DEFAULT_BEACON_INTERVAL> <BURST_BEACON_INTERVAL> <MEASUREMENT_BEACON_INTERVAL>' %(sys.argv[0])
@@ -39,10 +39,15 @@
3939
print ' If MULTICHANNEL_AGENTS is 0, it means that all the APs are in the same channel'
4040
print 'DEFAULT_BEACON_INTERVAL: Time between beacons (in milliseconds). Recommended values: 20-100'
4141
print 'BURST_BEACON_INTERVAL: Time between beacons when a burst of CSAs is sent after a handoff (in milliseconds). Recommended values: 5-10'
42+
print 'BURST: Number of beacons to send after add_lvap and channel_assigment. Recommended values: 5-40'
4243
print 'MEASUREMENT_BEACON_INTERVAL: Time between measurement beacons (in milliseconds). Used for measuring the distance in dBs between APs. Recommended values: 20-100'
44+
print 'CAPTURE_MODE: If CAPTURE_MODE is 1, two files will be generated, one for each interface, storing radiotap statistics'
45+
print ' If CAPTURE_MODE is 0, no statistic is storaged'
46+
print 'MAC_CAPTURE: the MAC of the wireless interface in STA that will be monitorized. e.g. 60:E3:27:4F:C7:AA'
47+
print ' For capture all traffic: FF:FF:FF:FF:FF:FF'
4348
print ''
4449
print 'Example:'
45-
print '$ python %s 9 50 60:E3:27:4F:C7:E1 192.168.1.129 2819 /sys/kernel/debug/ieee80211/phy0/ath9k/bssid_extra wi5-demo 192.168.1.9 0 01 108 25 0 1 100 10 100 > agent.cli' %(sys.argv[0])
50+
print '$ python %s 9 50 60:E3:27:4F:C7:E1 192.168.1.129 2819 /sys/kernel/debug/ieee80211/phy0/ath9k/bssid_extra wi5-demo 192.168.1.9 0 01 108 25 0 1 100 10 100 0 FF:FF:FF:FF:FF:FF > agent.cli' %(sys.argv[0])
4651
print ''
4752
print 'and then run the .cli file you have generated'
4853
print 'click$ ./bin/click agent.cli'
@@ -66,7 +71,10 @@
6671
MULTICHANNEL_AGENTS = int(sys.argv[14])
6772
DEFAULT_BEACON_INTERVAL = int(sys.argv[15])
6873
BURST_BEACON_INTERVAL = int(sys.argv[16])
69-
MEASUREMENT_BEACON_INTERVAL = int(sys.argv[17])
74+
BURST = int(sys.argv[17])
75+
MEASUREMENT_BEACON_INTERVAL = int(sys.argv[18])
76+
CAPTURE_MODE = int(sys.argv[19])
77+
MAC_CAPTURE = sys.argv[20]
7078

7179
# Set the value of some constants
7280
NETWORK_INTERFACE_NAMES = "mon" # beginning of the network interface names in monitor mode. e.g. mon
@@ -92,8 +100,8 @@
92100

93101
print '''
94102
// call OdinAgent::configure to create and configure an Odin agent:
95-
odinagent::OdinAgent(HWADDR %s, RT rates, CHANNEL %s, DEFAULT_GW %s, DEBUGFS %s, SSIDAGENT %s, DEBUG_ODIN %s, TX_RATE %s, TX_POWER %s, HIDDEN %s, MULTICHANNEL_AGENTS %s, DEFAULT_BEACON_INTERVAL %s, BURST_BEACON_INTERVAL %s, MEASUREMENT_BEACON_INTERVAL %s)
96-
''' % (AP_UNIQUE_BSSID, AP_CHANNEL, DEFAULT_GW, DEBUGFS_FILE, SSIDAGENT, DEBUG_ODIN, TX_RATE, TX_POWER, HIDDEN, MULTICHANNEL_AGENTS, DEFAULT_BEACON_INTERVAL, BURST_BEACON_INTERVAL, MEASUREMENT_BEACON_INTERVAL)
103+
odinagent::OdinAgent(HWADDR %s, RT rates, CHANNEL %s, DEFAULT_GW %s, DEBUGFS %s, SSIDAGENT %s, DEBUG_ODIN %s, TX_RATE %s, TX_POWER %s, HIDDEN %s, MULTICHANNEL_AGENTS %s, DEFAULT_BEACON_INTERVAL %s, BURST_BEACON_INTERVAL %s, BURST %s, MEASUREMENT_BEACON_INTERVAL %s, CAPTURE_MODE %s, MAC_CAPTURE %s)
104+
''' % (AP_UNIQUE_BSSID, AP_CHANNEL, DEFAULT_GW, DEBUGFS_FILE, SSIDAGENT, DEBUG_ODIN, TX_RATE, TX_POWER, HIDDEN, MULTICHANNEL_AGENTS, DEFAULT_BEACON_INTERVAL, BURST_BEACON_INTERVAL,BURST, MEASUREMENT_BEACON_INTERVAL, CAPTURE_MODE, MAC_CAPTURE)
97105

98106
print '''// send a ping to odinsocket every 2 seconds
99107
TimedSource(2, "ping\n")-> odinsocket::Socket(UDP, %s, %s, CLIENT true)
@@ -265,4 +273,4 @@
265273
if (DEBUG_CLICK > 0):
266274
print ''' -> Print("[Click] ARP Fast path fail")'''
267275

268-
print ''' -> ToHost(%s)''' % ( TAP_INTERFACE_NAME )
276+
print ''' -> ToHost(%s)''' % ( TAP_INTERFACE_NAME )

click_binary_file/click_for_AR71xx

75.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)