Skip to content

Commit e5d2938

Browse files
committed
802.11p: enables mantet routing protocols
1 parent d08c777 commit e5d2938

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

mn_wifi/link.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1538,7 +1538,8 @@ def __str__(self):
15381538

15391539
class ITSLink(LinkAttrs):
15401540

1541-
def __init__(self, node, intf=None, channel=161):
1541+
def __init__(self, node, intf=None, channel=181,
1542+
proto_args='', proto=None):
15421543
"configure ieee80211p"
15431544
intf = node.getNameToWintf(intf)
15441545
wlan = node.params['wlan'].index(intf.name)
@@ -1549,7 +1550,9 @@ def __init__(self, node, intf=None, channel=161):
15491550

15501551
self.node = node
15511552
self.channel = channel
1552-
self.freq = str(self.get_freq()).replace('.', '')
1553+
self.proto = proto
1554+
self.freq = '{:<04s}'.format(str(self.get_freq()).replace('.', ''))
1555+
print(self.freq)
15531556
self.range = intf.range
15541557
self.name = intf.name
15551558
self.mac = intf.mac
@@ -1567,6 +1570,9 @@ def __init__(self, node, intf=None, channel=161):
15671570
node.addWAttr(self, port=wlan)
15681571
self.configure_ocb()
15691572

1573+
if self.proto:
1574+
manetProtocols(self, proto_args)
1575+
15701576
# All we are is dust in the wind, and our two interfaces
15711577
self.intf1, self.intf2 = intf1, intf2
15721578

0 commit comments

Comments
 (0)