from nepi.resources.ns3.ns3fdnetdevice import NS3BaseFdNetDevice
devices = self.get_connected(NS3BaseFdNetDevice.get_rtype())
if not devices or len(devices) != 1:
- msg = "linux::ns3::TunTapFdLink must be connected to exactly one FdNetDevice"
+ msg = "TunTapFdLink must be connected to exactly one FdNetDevice"
self.error(msg)
raise RuntimeError, msg
from nepi.resources.linux.tap import LinuxTap
devices = self.get_connected(LinuxTap.get_rtype())
if not devices or len(devices) != 1:
- msg = "linux::ns3::TunTapLink must be connected to exactly one LinuxTap"
+ msg = "TunTapLink must be connected to exactly one Tap or Tun"
self.error(msg)
raise RuntimeError, msg
linux_passfd = os.path.join(os.path.dirname(__file__),
"..",
"scripts",
- "linux-passfd.py")
+ "linux-tap-passfd.py")
scripts.append(linux_passfd)
@property
def _start_command(self):
- vif_name = self.ec.get(self.tap.guid, "deviceName")
- vif_type = self.tap.vif_type_flag
- pi = self.ec.get(self.tap.guid, "pi")
address = base64.b64encode(self.send_address)
command = []
- # Use pl-vif-passfd.py to send fd from TAP to FdNetDevice
+ # Use tap-passfd.py to send fd from TAP to FdNetDevice
+ command.append("sudo -S")
command.append("PYTHONPATH=$PYTHONPATH:${SRC}")
- command.append("python ${SRC}/linux-passfd.py")
+ command.append("python ${SRC}/linux-tap-passfd.py")
command.append("-a %s" % address)
- command.append("-N %s " % vif_name)
- command.append("-t %s " % vif_type)
- if pi:
- command.append("-p")
+ command.append("-S %s " % self.tap.sock_name)
command = " ".join(command)
command = self.replace_paths(command)