summaryrefslogtreecommitdiff
path: root/src/dev/net/Ethernet.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/dev/net/Ethernet.py')
-rw-r--r--src/dev/net/Ethernet.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/dev/net/Ethernet.py b/src/dev/net/Ethernet.py
index 68867c00f..71665c564 100644
--- a/src/dev/net/Ethernet.py
+++ b/src/dev/net/Ethernet.py
@@ -38,6 +38,7 @@
#
# Authors: Nathan Binkert
+from m5.defines import buildEnv
from m5.SimObject import SimObject
from m5.params import *
from m5.proxy import *
@@ -103,6 +104,14 @@ class EtherTapBase(EtherObject):
dump = Param.EtherDump(NULL, "dump object")
tap = SlavePort("Ethernet interface to connect to gem5's network")
+if buildEnv['USE_TUNTAP']:
+ class EtherTap(EtherTapBase):
+ type = 'EtherTap'
+ cxx_header = "dev/net/ethertap.hh"
+ tun_clone_device = Param.String('/dev/net/tun',
+ "Path to the tun clone device node")
+ tap_device_name = Param.String('gem5-tap', "Tap device name")
+
class EtherTapStub(EtherTapBase):
type = 'EtherTapStub'
cxx_header = "dev/net/ethertap.hh"