From 928617e613ab61a84fa25a0bcc675d8783421487 Mon Sep 17 00:00:00 2001 From: Rod A Santiago Date: Wed, 14 Sep 2016 17:12:25 -0700 Subject: [PATCH] Merged new versions from NRL --- daemon/core/emane/emane.py | 8 +++++--- daemon/core/emane/rfpipe.py | 4 ++-- daemon/core/netns/vnet.py | 3 --- daemon/core/services/nrl.py | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/daemon/core/emane/emane.py b/daemon/core/emane/emane.py index 69ed3be1..45086a15 100644 --- a/daemon/core/emane/emane.py +++ b/daemon/core/emane/emane.py @@ -45,8 +45,8 @@ class Emane(ConfigurableManager): (SUCCESS, NOT_NEEDED, NOT_READY) = (0, 1, 2) EVENTCFGVAR = 'LIBEMANEEVENTSERVICECONFIG' # possible self.version values - (EMANEUNK, EMANE074, EMANE081, EMANE091, EMANE092, EMANE093) = \ - (0, 7, 8, 91, 92, 93) + (EMANEUNK, EMANE074, EMANE081, EMANE091, EMANE092, EMANE093, EMANE101) = \ + (0, 7, 8, 91, 92, 93, 101) DEFAULT_LOG_LEVEL = 3 def __init__(self, session): @@ -746,7 +746,7 @@ class Emane(ConfigurableManager): ''' for n in sorted(self._objs.keys()): emanenode = self._objs[n] - nems = emanenode.buildnemxmlfiles(self) + emanenode.buildnemxmlfiles(self) def appendtransporttonem(self, doc, nem, nodenum, ifc=None): ''' Given a nem XML node and EMANE WLAN node number, append @@ -1175,6 +1175,8 @@ def emane_version(): v = Emane.EMANE092 elif result.startswith('0.9.3'): v = Emane.EMANE093 + elif result.startswith('1.0.1'): + v = Emane.EMANE101 return v, result.strip() # set version variables for the Emane class diff --git a/daemon/core/emane/rfpipe.py b/daemon/core/emane/rfpipe.py index 36722524..6eb329e9 100644 --- a/daemon/core/emane/rfpipe.py +++ b/daemon/core/emane/rfpipe.py @@ -124,8 +124,8 @@ class EmaneRfPipeModel(EmaneModel): values = list(values) values[i] = self.emane074_fixup(values[i], 1000) # append MAC options to macdoc - map( lambda n: mac.appendChild(e.xmlparam(macdoc, n, \ - self.valueof(n, values))), macnames) + map(lambda n: mac.appendChild(e.xmlparam(macdoc, n, \ + self.valueof(n, values))), macnames) e.xmlwrite(macdoc, self.macxmlname(ifc)) phydoc = EmaneUniversalModel.getphydoc(e, self, values, phynames) diff --git a/daemon/core/netns/vnet.py b/daemon/core/netns/vnet.py index a0a126e3..8dd1c494 100644 --- a/daemon/core/netns/vnet.py +++ b/daemon/core/netns/vnet.py @@ -11,8 +11,6 @@ vnet.py: PyCoreNet and LxBrNet classes that implement virtual networks using Linux Ethernet bridging and ebtables rules. ''' -import traceback - import os, sys, threading, time, subprocess from core.api import coreapi @@ -347,7 +345,6 @@ class LxBrNet(PyCoreNet): ''' Configure link parameters by applying tc queuing disciplines on the interface. ''' - if devname is None: devname = netif.localname tc = [TC_BIN, "qdisc", "replace", "dev", devname] diff --git a/daemon/core/services/nrl.py b/daemon/core/services/nrl.py index 5afe202c..481185bf 100644 --- a/daemon/core/services/nrl.py +++ b/daemon/core/services/nrl.py @@ -91,7 +91,7 @@ class NrlNhdp(NrlService): servicenames = map(lambda x: x._name, services) if "SMF" in servicenames: - cmd += " -flooding ecds" + cmd += " -flooding ecds-etx sticky" cmd += " -smfClient %s_smf" % node.name netifs = filter(lambda x: not getattr(x, 'control', False), \