From e5d293876addb6df621063f641c83db9a6e0e0b1 Mon Sep 17 00:00:00 2001 From: Ramon Fontes Date: Thu, 14 May 2020 21:13:37 -0300 Subject: [PATCH] 802.11p: enables mantet routing protocols --- mn_wifi/link.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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