diff --git a/mn_wifi/link.py b/mn_wifi/link.py index 1753be4d1..09777149d 100644 --- a/mn_wifi/link.py +++ b/mn_wifi/link.py @@ -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) @@ -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 @@ -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