changes to replace MacAddress usage and remove ipaddress module altogether
This commit is contained in:
parent
4db7f845a5
commit
de493c810a
11 changed files with 43 additions and 83 deletions
|
@ -5,7 +5,6 @@ from tempfile import NamedTemporaryFile
|
|||
from lxml import etree
|
||||
|
||||
from core import utils
|
||||
from core.nodes.ipaddress import MacAddress
|
||||
from core.xml import corexml
|
||||
|
||||
_hwaddr_prefix = "02:02"
|
||||
|
@ -208,7 +207,7 @@ def build_node_platform_xml(emane_manager, control_net, node, nem_id, platform_x
|
|||
node.setnemid(netif, nem_id)
|
||||
macstr = _hwaddr_prefix + ":00:00:"
|
||||
macstr += f"{(nem_id >> 8) & 0xFF:02X}:{nem_id & 0xFF:02X}"
|
||||
netif.sethwaddr(MacAddress.from_string(macstr))
|
||||
netif.sethwaddr(macstr)
|
||||
|
||||
# increment nem id
|
||||
nem_id += 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue