Added NIO TAP support

This commit is contained in:
Joe Bowen committed 2014-05-06 10:42:38 -06:00
1 parent a50c4c112e
commit 476a3c42b6
3 files changed
+21 -24

No files matched your search

-7
View File
@@ -182,13 +182,6 @@ class VPCS(IModule):
self._current_console_port = self._console_start_port_range
self._current_udp_port = self._udp_start_port_range
if self._VPCSrc and os.path.isfile(self._VPCSrc):
try:
log.info("deleting VPCSrc file {}".format(self._VPCSrc))
os.remove(self._VPCSrc)
except OSError as e:
log.warn("could not delete VPCSrc file {}: {}".format(self._VPCSrc, e))
log.info("VPCS module has been reset")
@IModule.route("VPCS.settings")
+5 -1
View File
@@ -450,7 +450,11 @@ class VPCSDevice(object):
command.extend(["-s", str(nio.lport)])
command.extend(["-c", str(nio.rport)])
command.extend(["-t", str(nio.rhost)])
elif isinstance(nio, NIO_TAP):
# TAP interface
command.extend(["-e"]) #, str(nio.tap_device)]) #TODO: Fix, currently vpcs doesn't allow specific tap_device
command.extend(["-m", str(self._id)]) #The unique ID is used to set the mac address offset
if self._script_file:
command.extend([self._script_file])