daemon: added option API TLVs so that per-interface parameters are kept for EMANE models when a single node has multiple interfaces of the same EMANE model type but different model parameters
This commit is contained in:
parent
5895ba2d20
commit
c66914ec21
3 changed files with 11 additions and 1 deletions
|
@ -271,6 +271,8 @@ class CoreLinkTlv(CoreTlv):
|
|||
CORE_TLV_LINK_IF2MAC: CoreTlvDataMacAddr,
|
||||
CORE_TLV_LINK_IF2IP6: CoreTlvDataIPv6Addr,
|
||||
CORE_TLV_LINK_IF2IP6MASK: CoreTlvDataUint16,
|
||||
CORE_TLV_LINK_IF1NAME: CoreTlvDataString,
|
||||
CORE_TLV_LINK_IF2NAME: CoreTlvDataString,
|
||||
CORE_TLV_LINK_OPAQUE: CoreTlvDataString,
|
||||
}
|
||||
|
||||
|
@ -311,6 +313,7 @@ class CoreConfTlv(CoreTlv):
|
|||
CORE_TLV_CONF_POSSIBLE_VALUES: CoreTlvDataString,
|
||||
CORE_TLV_CONF_GROUPS: CoreTlvDataString,
|
||||
CORE_TLV_CONF_SESSION: CoreTlvDataString,
|
||||
CORE_TLV_CONF_IFNUM: CoreTlvDataUint16,
|
||||
CORE_TLV_CONF_NETID: CoreTlvDataUint32,
|
||||
CORE_TLV_CONF_OPAQUE: CoreTlvDataString,
|
||||
}
|
||||
|
|
|
@ -134,6 +134,8 @@ link_tlvs = {
|
|||
0x39: "CORE_TLV_LINK_IF2MAC",
|
||||
0x40: "CORE_TLV_LINK_IF2IP6",
|
||||
0x41: "CORE_TLV_LINK_IF2IP6MASK",
|
||||
0x42: "CORE_TLV_LINK_IF1NAME",
|
||||
0x43: "CORE_TLV_LINK_IF2NAME",
|
||||
0x50: "CORE_TLV_LINK_OPAQUE",
|
||||
}
|
||||
|
||||
|
@ -187,6 +189,7 @@ conf_tlvs = {
|
|||
0x08: "CORE_TLV_CONF_POSSIBLE_VALUES",
|
||||
0x09: "CORE_TLV_CONF_GROUPS",
|
||||
CORE_TLV_NODE_SESSION: "CORE_TLV_CONF_SESSION",
|
||||
0x0B: "CORE_TLV_CONF_IFNUM",
|
||||
CORE_TLV_NODE_NETID: "CORE_TLV_CONF_NETID",
|
||||
0x50: "CORE_TLV_CONF_OPAQUE",
|
||||
}
|
||||
|
|
|
@ -228,9 +228,13 @@ class Configurable(object):
|
|||
nodenum = msg.gettlv(coreapi.CORE_TLV_CONF_NODE)
|
||||
objname = msg.gettlv(coreapi.CORE_TLV_CONF_OBJ)
|
||||
conftype = msg.gettlv(coreapi.CORE_TLV_CONF_TYPE)
|
||||
|
||||
ifacenum = msg.gettlv(coreapi.CORE_TLV_CONF_IFNUM)
|
||||
if ifacenum is not None:
|
||||
nodenum = nodenum*1000 + ifacenum
|
||||
|
||||
if mgr.verbose:
|
||||
mgr.info("received configure message for %s" % cls._name)
|
||||
mgr.info("received configure message for %s nodenum:%s" % (cls._name, str(nodenum)))
|
||||
if conftype == coreapi.CONF_TYPE_FLAGS_REQUEST:
|
||||
if mgr.verbose:
|
||||
mgr.info("replying to configure request for %s model" %
|
||||
|
|
Loading…
Reference in a new issue