def add_ns3_fdnd(self, node, ns3_desc):
- fdnd = ns3_desc.create("ns3::FileDescriptorNetDevice")
+ fdnd = ns3_desc.create("ns3::FdNetDevice")
node.connector("devs").connect(fdnd.connector("node"))
fdnd.enable_trace("FileDescriptorPcapTrace")
return fdnd
return tap
def add_ns3_fdnd(self, node, ns3_desc):
- fdnd = ns3_desc.create("ns3::FileDescriptorNetDevice")
+ fdnd = ns3_desc.create("ns3::FdNetDevice")
node.connector("devs").connect(fdnd.connector("node"))
- fdnd.enable_trace("FileDescriptorPcapTrace")
+ fdnd.enable_trace("FdPcapTrace")
return fdnd
def add_ns3_node(self, ns3_desc):
error = ns3_desc.create("ns3::NistErrorRateModel")
manager = ns3_desc.create("ns3::ArfWifiManager")
if access_point:
- mac = ns3_desc.create("ns3::QapWifiMac")
+ mac = ns3_desc.create("ns3::ApWifiMac")
else:
- mac = ns3_desc.create("ns3::QstaWifiMac")
+ mac = ns3_desc.create("ns3::StaWifiMac")
phy.set_attribute_value("Standard", "WIFI_PHY_STANDARD_80211a")
mac.set_attribute_value("Standard", "WIFI_PHY_STANDARD_80211a")
TUNCHANNEL = "TunChannel"
NS3_TESTBED_ID = "ns3"
-FDNETDEV = "ns3::FileDescriptorNetDevice"
+FDNETDEV = "ns3::FdNetDevice"
def _follow_trace(testbed_instance, guid, trace_id, filename):
filepath = testbed_instance.trace_filepath(guid, trace_id, filename)
# -*- coding: utf-8 -*-
from constants import TESTBED_ID, TESTBED_VERSION
-from execute import TestbedController
+from execute import TestbedController, load_ns3_module
"sched_impl_type": dict({
"name": "SchedulerType",
"help": "The object class to use as the scheduler implementation. Make sure to pick a thread-safe variant.",
- "value": "ns3::ThreadsafeMapScheduler",
+ "value": "ns3::MapScheduler",
"type": Attribute.ENUM,
"flags": Attribute.ExecReadOnly | Attribute.ExecImmutable,
"allowed": [
- "ns3::ThreadsafeMapScheduler",
- "ns3::ThreadsafeHeapScheduler",
- "ns3::ThreadsafeListScheduler",
- "ns3::ThreadsafeCalendarScheduler",
+ "ns3::MapScheduler",
+ "ns3::HeapScheduler",
+ "ns3::ListScheduler",
+ "ns3::CalendarScheduler",
],
"validation_function": validation.is_enum
}),
"allowed": wifi_standards.keys(),
"help": "Wifi PHY standard"
}),
- "LinuxSocketAddress": dict({
- "name": "LinuxSocketAddress",
- "validation_function": None,
- "value": "",
- "flags": Attribute.DesignInvisible | \
- Attribute.ExecInvisible | \
- Attribute.ExecReadOnly | \
- Attribute.ExecImmutable | \
- Attribute.Metadata,
- "type": Attribute.STRING,
- "help": "Socket address assigned to the Linux socket created to recive file descriptor"
- }),
"ClassifierSrcAddress": dict({
"name": "SrcAddress",
"validation_function": validation.is_string, # TODO:! Address + Netref
sflow.SetConvergenceSublayerParam (csparam);
def connect_fd(testbed_instance, fdnd_guid, cross_data):
- fdnd = testbed_instance._elements[fdnd_guid]
- endpoint = fdnd.GetEndpoint()
- # XXX: check the method StringToBuffer of ns3::FileDescriptorNetDevice
- # to see how the address should be decoded
- address = endpoint.replace(":", "").decode('hex')[2:]
- testbed_instance.set(fdnd_guid, "LinuxSocketAddress", address)
-
- # If it's a non-abstract socket, add the path
- if not address.startswith('\x00'):
- address = os.path.join( testbed_instance.root_directory, address )
+ def recvfd(sock, fdnd):
+ (fd, msg) = passfd.recvfd(sock)
+ # Store a reference to the endpoint to keep the socket alive
+ fdnd.SetFileDescriptor(fd)
+ import threading
+ import passfd
+ import socket
+ sock = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)
+ sock.bind("")
+ address = sock.getsockname()
# Set tun standard contract attributes
- testbed_instance.set(fdnd_guid, "tun_addr", address )
+ testbed_instance.set(fdnd_guid, "tun_addr", address)
testbed_instance.set(fdnd_guid, "tun_proto", "fd")
testbed_instance.set(fdnd_guid, "tun_port", 0)
testbed_instance.set(fdnd_guid, "tun_key", ("\xfa"*32).encode("base64")) # unimportant, fds aren't encrypted
+ fdnd = testbed_instance._elements[fdnd_guid]
+ t = threading.Thread(target=recvfd, args=(sock,fdnd))
+ t.start()
def connect_tunchannel_fd(testbed_instance, tun_guid, fdnd_guid):
fdnd = testbed_instance._elements[fdnd_guid]
tun = testbed_instance._elements[tun_guid]
- # XXX: check the method StringToBuffer of ns3::FileDescriptorNetDevice
- # to see how the address should be decoded
- endpoint = fdnd.GetEndpoint()
- address = endpoint.replace(":", "").decode('hex')[2:]
- testbed_instance.set(fdnd_guid, "LinuxSocketAddress", address)
-
# Create socket pair to connect the FDND and the TunChannel with it
import socket
sock1, sock2 = socket.socketpair(
socket.AF_UNIX, socket.SOCK_SEQPACKET)
- # Send one endpoint to the FDND
- import passfd
- import socket
- sock = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)
- sock.connect(address)
- passfd.sendfd(sock, sock1.fileno(), '0')
-
# Store a reference to the endpoint to keep the socket alive
fdnd._endpoint_socket = sock1
+ fdnd.SetFileDescriptor(sock1.fileno())
# Send the other endpoint to the TUN channel
tun.tun_socket = sock2
# the default presence of PI headers)
tun.with_pi = True
-
### Connector information ###
connector_types = dict({
}),
dict({
"from": ( "ns3", "ns3::Node", "devs" ),
- "to": ( "ns3", "ns3::FileDescriptorNetDevice", "node" ),
+ "to": ( "ns3", "ns3::FdNetDevice", "node" ),
"init_code": connect_node_device,
"can_cross": False
}),
"can_cross": False
}),
dict({
- "from": ( "ns3", "ns3::QapWifiMac", "dev" ),
- "to": ( "ns3", "ns3::WifiNetDevice", "mac" ),
- "init_code": connect_mac_device,
- "can_cross": False
- }),
- dict({
- "from": ( "ns3", "ns3::QstaWifiMac", "dev" ),
- "to": ( "ns3", "ns3::WifiNetDevice", "mac" ),
- "init_code": connect_mac_device,
- "can_cross": False
- }),
- dict({
- "from": ( "ns3", "ns3::NqapWifiMac", "dev" ),
+ "from": ( "ns3", "ns3::ApWifiMac", "dev" ),
"to": ( "ns3", "ns3::WifiNetDevice", "mac" ),
"init_code": connect_mac_device,
"can_cross": False
}),
dict({
- "from": ( "ns3", "ns3::NqstaWifiMac", "dev" ),
+ "from": ( "ns3", "ns3::StaWifiMac", "dev" ),
"to": ( "ns3", "ns3::WifiNetDevice", "mac" ),
"init_code": connect_mac_device,
"can_cross": False
"can_cross": False
}),
dict({
- "from": ( "ns3", "ns3::FileDescriptorNetDevice", "->fd" ),
+ "from": ( "ns3", "ns3::FdNetDevice", "->fd" ),
"to": ( None, None, "fd->" ),
"init_code": connect_fd,
"can_cross": True
}),
dict({
"from": ( "ns3", "ns3::Nepi::TunChannel", "fd->" ),
- "to": ( "ns3", "ns3::FileDescriptorNetDevice", "->fd" ),
+ "to": ( "ns3", "ns3::FdNetDevice", "->fd" ),
"init_code": connect_tunchannel_fd,
"can_cross": False
}),
# graceful shutdown of locally-implemented objects
element.Cleanup()
if self.ns3:
- self.ns3.Simulator.Stop()
+ if not self.ns3.Simulator.IsFinished():
+ self.stop()
- # Wait for it to stop, with a 30s timeout
- for i in xrange(300):
- if self.ns3.Simulator.IsFinished():
- break
- time.sleep(0.1)
- #self._stop_simulation("0s")
-
- self._elements.clear()
-
- if self.ns3:
# TODO!!!! SHOULD WAIT UNTIL THE THREAD FINISHES
- # if self._simulator_thread:
- # self._simulator_thread.join()
+ if self._simulator_thread:
+ self._simulator_thread.join()
+
self.ns3.Simulator.Destroy()
+ self._elements.clear()
+
self._ns3 = None
sys.stdout.flush()
sys.stderr.flush()
element = testbed_instance._elements[guid]
filename = "trace-fd-node-%d-dev-%d.pcap" % (node_guid, interface_number)
filepath = _follow_trace(testbed_instance, guid, trace_id, filename)
- helper = testbed_instance.ns3.FileDescriptorHelper()
+ helper = testbed_instance.ns3.FdNetDeviceHelper()
helper.EnablePcap(filepath, element, explicitFilename = True)
+def fdascii_trace(testbed_instance, guid, trace_id):
+ node_guid = _get_node_guid(testbed_instance, guid)
+ interface_number = _get_dev_number(testbed_instance, guid)
+ element = testbed_instance._elements[guid]
+ filename = "trace-fd-node-%d-dev-%d.tr" % (node_guid, interface_number)
+ filepath = _follow_trace(testbed_instance, guid, trace_id, filename)
+ helper = testbed_instance.ns3.FdNetDeviceHelper()
+ asciiHelper = testbed_instance.ns3.AsciiTraceHelper()
+ stream = asciiHelper.CreateFileStream(filepath)
+ helper.EnableAscii(stream, element)
+
def yanswifipcap_trace(testbed_instance, guid, trace_id):
dev_guid = testbed_instance.get_connected(guid, "dev", "phy")[0]
node_guid = _get_node_guid(testbed_instance, dev_guid)
"P2PAsciiTrace": p2pascii_trace,
"CsmaPcapTrace": csmapcap_trace,
"CsmaPcapPromiscTrace": csmapcap_promisc_trace,
- "FileDescriptorPcapTrace": fdpcap_trace,
+ "FdPcapTrace": fdpcap_trace,
+ "FdAsciiTrace": fdascii_trace,
"YansWifiPhyPcapTrace": yanswifipcap_trace,
"WimaxPcapTrace": wimaxpcap_trace,
"WimaxAsciiTrace": wimaxascii_trace,
"ns3::SingleModelSpectrumChannel",
"ns3::MsduStandardAggregator",
"ns3::EdcaTxopN",
- "ns3::QstaWifiMac",
- "ns3::QapWifiMac",
+ "ns3::StaWifiMac",
+ "ns3::ApWifiMac",
"ns3::QadhocWifiMac",
"ns3::MinstrelWifiManager",
"ns3::CaraWifiManager",
"ns3::AarfWifiManager",
"ns3::ArfWifiManager",
"ns3::WifiNetDevice",
- "ns3::NqstaWifiMac",
- "ns3::NqapWifiMac",
"ns3::AdhocWifiMac",
"ns3::DcaTxop",
"ns3::WifiMacQueue",
"ns3::PacketSink",
"ns3::OnOffApplication",
"ns3::VirtualNetDevice",
- "ns3::FileDescriptorNetDevice",
+ "ns3::FdNetDevice",
"ns3::Nepi::TunChannel",
"ns3::TapBridge",
"ns3::BridgeChannel",
"WaypointList"],
"tags": [tags.MOBILE],
}),
- "ns3::FileDescriptorNetDevice": dict({
+ "ns3::FdNetDevice": dict({
"category": FC.CATEGORY_DEVICES,
"create_function": create_element,
"configure_function": configure_device,
"help": "Network interface associated to a file descriptor",
"connector_types": ["node", "->fd"],
"box_attributes": ["Address",
- "LinuxSocketAddress",
"tun_proto", "tun_addr", "tun_port", "tun_key"],
- "traces": ["fdpcap"],
+ "traces": ["fdpcap", "fdascii"],
"tags": [tags.INTERFACE, tags.ALLOW_ADDRESSES],
}),
"ns3::Nepi::TunChannel": dict({
"preconfigure_function": preconfigure_tunchannel,
"configure_function": postconfigure_tunchannel,
"prestart_function": wait_tunchannel,
- "help": "Channel to forward FileDescriptorNetDevice data to "
+ "help": "Channel to forward FdNetDevice data to "
"other TAP interfaces supporting the NEPI tunneling protocol.",
"connector_types": ["fd->", "udp", "tcp"],
"allow_addresses": False,
"help": "",
"connector_types": [],
"box_attributes": ["SpreadCoef"],
- }),
- "ns3::NqstaWifiMac": dict({
- "category": FC.CATEGORY_MAC_MODELS,
- "create_function": create_wifi_standard_model,
- "configure_function": configure_element,
- "help": "",
- "connector_types": ["dev"],
- "box_attributes": ["ProbeRequestTimeout",
- "AssocRequestTimeout",
- "MaxMissedBeacons",
- "CtsTimeout",
- "AckTimeout",
- "BasicBlockAckTimeout",
- "CompressedBlockAckTimeout",
- "Sifs",
- "EifsNoDifs",
- "Slot",
- "Pifs",
- "MaxPropagationDelay",
- "Ssid"],
}),
"ns3::Icmpv6L4Protocol": dict({
"category": FC.CATEGORY_PROTOCOLS,
"box_attributes": ["X",
"Y"],
"tags": [tags.MOBILE],
- }),
- "ns3::NqapWifiMac": dict({
- "category": FC.CATEGORY_MAC_MODELS,
- "create_function": create_wifi_standard_model,
- "configure_function": configure_element,
- "help": "",
- "connector_types": ["dev"],
- "box_attributes": ["BeaconInterval",
- "BeaconGeneration",
- "CtsTimeout",
- "AckTimeout",
- "BasicBlockAckTimeout",
- "CompressedBlockAckTimeout",
- "Sifs",
- "EifsNoDifs",
- "Slot",
- "Pifs",
- "MaxPropagationDelay",
- "Ssid"],
}),
"ns3::HierarchicalMobilityModel": dict({
"category": FC.CATEGORY_MOBILITY_MODELS,
"connector_types": [],
"box_attributes": ["ExtensionNumber"],
}),
- "ns3::QstaWifiMac": dict({
+ "ns3::StaWifiMac": dict({
"category": FC.CATEGORY_MAC_MODELS,
"create_function": create_wifi_standard_model,
"configure_function": configure_element,
"connector_types": [],
"box_attributes": ["OptionNumber"],
}),
- "ns3::QapWifiMac": dict({
+ "ns3::ApWifiMac": dict({
"category": FC.CATEGORY_MAC_MODELS,
"create_function": create_wifi_standard_model,
"configure_function": configure_element,
"help": "Trace to sniff packets from a Csma network device"
}),
"fdpcap": dict({
- "name": "FileDescriptorPcapTrace",
- "help": "Trace to sniff packets from a FileDescriptor network device"
+ "name": "FdPcapTrace",
+ "help": "Trace to sniff packets from a file descriptor network device"
+ }),
+ "fdascii": dict({
+ "name": "FdAsciiTrace",
+ "help": "Ascii trace from a file descriptor network device"
}),
"yanswifipcap": dict({
"name": "YansWifiPhyPcapTrace",
from nepi.util import proxy
from nepi.util.constants import DeploymentConfiguration as DC
import os
+import re
import shutil
import tempfile
import test_util
def setUp(self):
self.root_dir = tempfile.mkdtemp()
+ def _test_fd_net_device(self, daemonize_testbed,
+ controller_access_configuration):
+ exp_desc = ExperimentDescription()
+ testbed_id = "ns3"
+ ns3_provider = FactoriesProvider(testbed_id)
+ ns3_desc1 = exp_desc.add_testbed_description(ns3_provider)
+ root_dir1 = os.path.join(self.root_dir, "1")
+ ns3_desc1.set_attribute_value("homeDirectory", root_dir1)
+ ns3_desc1.set_attribute_value("SimulatorImplementationType",
+ "ns3::RealtimeSimulatorImpl")
+ ns3_desc1.set_attribute_value("ChecksumEnabled", True)
+ ns3_desc2 = exp_desc.add_testbed_description(ns3_provider)
+ root_dir2 = os.path.join(self.root_dir, "2")
+ ns3_desc2.set_attribute_value("homeDirectory", root_dir2)
+ ns3_desc2.set_attribute_value("SimulatorImplementationType",
+ "ns3::RealtimeSimulatorImpl")
+ ns3_desc2.set_attribute_value("ChecksumEnabled", True)
+
+ node1 = ns3_desc1.create("ns3::Node")
+ ipv41 = ns3_desc1.create("ns3::Ipv4L3Protocol")
+ arp1 = ns3_desc1.create("ns3::ArpL3Protocol")
+ icmp1 = ns3_desc1.create("ns3::Icmpv4L4Protocol")
+ node1.connector("protos").connect(ipv41.connector("node"))
+ node1.connector("protos").connect(arp1.connector("node"))
+ node1.connector("protos").connect(icmp1.connector("node"))
+ iface1 = ns3_desc1.create("ns3::FdNetDevice")
+ node1.connector("devs").connect(iface1.connector("node"))
+ ip1 = iface1.add_address()
+ ip1.set_attribute_value("Address", "10.0.0.1")
+ tc1 = ns3_desc1.create("ns3::Nepi::TunChannel")
+ tc1.connector("fd->").connect(iface1.connector("->fd"))
+
+ node2 = ns3_desc2.create("ns3::Node")
+ ipv42 = ns3_desc2.create("ns3::Ipv4L3Protocol")
+ arp2 = ns3_desc2.create("ns3::ArpL3Protocol")
+ icmp2 = ns3_desc2.create("ns3::Icmpv4L4Protocol")
+ node2.connector("protos").connect(ipv42.connector("node"))
+ node2.connector("protos").connect(arp2.connector("node"))
+ node2.connector("protos").connect(icmp2.connector("node"))
+ iface2 = ns3_desc2.create("ns3::FdNetDevice")
+ iface2.enable_trace("FdAsciiTrace")
+ node2.connector("devs").connect(iface2.connector("node"))
+ ip2 = iface2.add_address()
+ ip2.set_attribute_value("Address", "10.0.0.2")
+ tc2 = ns3_desc2.create("ns3::Nepi::TunChannel")
+ tc2.connector("fd->").connect(iface2.connector("->fd"))
+
+ tc2.connector("udp").connect(tc1.connector("udp"))
+
+ app = ns3_desc1.create("ns3::V4Ping")
+ app.set_attribute_value("Remote", "10.0.0.2")
+ app.set_attribute_value("StartTime", "0s")
+ app.set_attribute_value("StopTime", "2s")
+ app.connector("node").connect(node1.connector("apps"))
+
+ if daemonize_testbed:
+ ns3_desc1.set_attribute_value(DC.DEPLOYMENT_MODE, DC.MODE_DAEMON)
+ inst_root_dir = os.path.join(root_dir1, "instance")
+ os.makedirs(inst_root_dir)
+ ns3_desc1.set_attribute_value(DC.ROOT_DIRECTORY, inst_root_dir)
+ ns3_desc1.set_attribute_value(DC.LOG_LEVEL, DC.DEBUG_LEVEL)
+
+ ns3_desc2.set_attribute_value(DC.DEPLOYMENT_MODE, DC.MODE_DAEMON)
+ inst_root_dir = os.path.join(root_dir2, "instance")
+ os.makedirs(inst_root_dir)
+ ns3_desc2.set_attribute_value(DC.ROOT_DIRECTORY, inst_root_dir)
+ ns3_desc2.set_attribute_value(DC.LOG_LEVEL, DC.DEBUG_LEVEL)
+
+ xml = exp_desc.to_xml()
+
+ if controller_access_configuration:
+ controller = ExperimentController(xml, self.root_dir)
+ else:
+ controller = proxy.create_experiment_controller(xml,
+ controller_access_configuration)
+
+ try:
+ controller.start()
+ while not controller.is_finished(app.guid):
+ time.sleep(0.5)
+ ping_result = controller.trace(iface2.guid, "FdAsciiTrace")
+ ping_exp_result = r"""r \d+\.\d+ /NodeList/0/DeviceList/0/\$ns3::FdNetDevice/Rx Payload \(size=42\)
+r \d+\.\d+ /NodeList/0/DeviceList/0/\$ns3::FdNetDevice/Rx Payload \(size=98\)
+r \d+\.\d+ /NodeList/0/DeviceList/0/\$ns3::FdNetDevice/Rx Payload \(size=42\)
+r \d+\.\d+ /NodeList/0/DeviceList/0/\$ns3::FdNetDevice/Rx Payload \(size=98\)
+"""
+ if not re.match(ping_exp_result, ping_result):
+ self.fail("Unexpected trace: %s" % (ping_result,))
+
+ finally:
+ controller.stop()
+ controller.shutdown()
+
def _test_if(self, daemonize_testbed, controller_access_configuration):
exp_desc = ExperimentDescription()
testbed_id = "ns3"
controller.stop()
controller.shutdown()
+ @test_util.skipUnless(test_util.ns3_usable(),
+ "Test requires working ns-3 bindings")
+ def test_all_daemonized_fd_net_device(self):
+ access_config = proxy.AccessConfiguration()
+ access_config.set_attribute_value(DC.DEPLOYMENT_MODE, DC.MODE_DAEMON)
+ access_config.set_attribute_value(DC.ROOT_DIRECTORY, self.root_dir)
+ access_config.set_attribute_value(DC.LOG_LEVEL, DC.DEBUG_LEVEL)
+
+ self._test_fd_net_device(
+ daemonize_testbed = True,
+ controller_access_configuration = access_config)
+
+ @test_util.skipUnless(test_util.ns3_usable(),
+ "Test requires working ns-3 bindings")
+ def test_all_ssh_daemonized_fd_net_device(self):
+ env = test_util.test_environment()
+
+ access_config = proxy.AccessConfiguration()
+ access_config.set_attribute_value(DC.DEPLOYMENT_MODE, DC.MODE_DAEMON)
+ access_config.set_attribute_value(DC.ROOT_DIRECTORY, self.root_dir)
+ access_config.set_attribute_value(DC.LOG_LEVEL, DC.DEBUG_LEVEL)
+ access_config.set_attribute_value(DC.DEPLOYMENT_COMMUNICATION, DC.ACCESS_SSH)
+ access_config.set_attribute_value(DC.DEPLOYMENT_PORT, env.port)
+ access_config.set_attribute_value(DC.USE_AGENT, True)
+
+ self._test_fd_net_device(
+ daemonize_testbed = True,
+ controller_access_configuration = access_config)
+
@test_util.skipUnless(test_util.ns3_usable(),
"Test requires working ns-3 bindings")
def test_local_if(self):
ns1.connector("protos").connect(ipv41.connector("node"))
ns1.connector("protos").connect(arp1.connector("node"))
ns1.connector("protos").connect(icmp1.connector("node"))
- ns1if = ns3.create("ns3::FileDescriptorNetDevice")
+ ns1if = ns3.create("ns3::FdNetDevice")
ns1if.enable_trace("FileDescriptorPcapTrace")
ns1if.set_attribute_value("label", "ns1if")
ns1tc = ns3.create("ns3::Nepi::TunChannel")
ns1.connector("protos").connect(ipv41.connector("node"))
ns1.connector("protos").connect(arp1.connector("node"))
ns1.connector("protos").connect(icmp1.connector("node"))
- ns1if = ns3_desc.create("ns3::FileDescriptorNetDevice")
+ ns1if = ns3_desc.create("ns3::FdNetDevice")
ns1if.enable_trace("FileDescriptorPcapTrace")
ns1if.set_attribute_value("label", "ns1if")
ns1.connector("devs").connect(ns1if.connector("node"))
ns1.connector("protos").connect(ipv41.connector("node"))
ns1.connector("protos").connect(arp1.connector("node"))
ns1.connector("protos").connect(icmp1.connector("node"))
- ns1if = ns3_desc.create("ns3::FileDescriptorNetDevice")
+ ns1if = ns3_desc.create("ns3::FdNetDevice")
ns1if.enable_trace("FileDescriptorPcapTrace")
ns1if.set_attribute_value("label", "ns1if")
ns1.connector("devs").connect(ns1if.connector("node"))
ns1.connector("protos").connect(ipv41.connector("node"))
ns1.connector("protos").connect(arp1.connector("node"))
ns1.connector("protos").connect(icmp1.connector("node"))
- ns1if = ns3_desc.create("ns3::FileDescriptorNetDevice")
+ ns1if = ns3_desc.create("ns3::FdNetDevice")
ns1if.enable_trace("FileDescriptorPcapTrace")
ns1if.set_attribute_value("label", "ns1if")
ns1.connector("devs").connect(ns1if.connector("node"))