Skip to content

Commit

Permalink
802.11p: enables mantet routing protocols
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonfontes committed May 15, 2020
1 parent d08c777 commit 8292047
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions mn_wifi/link.py
Original file line number Diff line number Diff line change
Expand Up @@ -1538,7 +1538,8 @@ def __str__(self):

class ITSLink(LinkAttrs):

def __init__(self, node, intf=None, channel=161):
def __init__(self, node, intf=None, channel=181,
proto_args='', proto=None):
"configure ieee80211p"
intf = node.getNameToWintf(intf)
wlan = node.params['wlan'].index(intf.name)
Expand All @@ -1549,7 +1550,8 @@ def __init__(self, node, intf=None, channel=161):

self.node = node
self.channel = channel
self.freq = str(self.get_freq()).replace('.', '')
self.proto = proto
self.freq = '{:<04s}'.format(str(self.get_freq()).replace('.', ''))
self.range = intf.range
self.name = intf.name
self.mac = intf.mac
Expand All @@ -1567,6 +1569,9 @@ def __init__(self, node, intf=None, channel=161):
node.addWAttr(self, port=wlan)
self.configure_ocb()

if self.proto:
manetProtocols(self, proto_args)

# All we are is dust in the wind, and our two interfaces
self.intf1, self.intf2 = intf1, intf2

Expand Down

0 comments on commit 8292047

Please sign in to comment.