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 e5d2938
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions mn_wifi/link.py
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,9 @@ 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('.', ''))
print(self.freq)
self.range = intf.range
self.name = intf.name
self.mac = intf.mac
Expand All @@ -1567,6 +1570,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 e5d2938

Please sign in to comment.