Ethernet.py (12055:945e851d846b) Ethernet.py (12056:1ad5b3161819)
1# Copyright (c) 2015 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

--- 24 unchanged lines hidden (view full) ---

33# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
34# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
35# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
36# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38#
39# Authors: Nathan Binkert
40
1# Copyright (c) 2015 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

--- 24 unchanged lines hidden (view full) ---

33# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
34# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
35# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
36# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38#
39# Authors: Nathan Binkert
40
41from m5.defines import buildEnv
41from m5.SimObject import SimObject
42from m5.params import *
43from m5.proxy import *
44from PciDevice import PciDevice
45
46class EtherObject(SimObject):
47 type = 'EtherObject'
48 abstract = True

--- 49 unchanged lines hidden (view full) ---

98class EtherTapBase(EtherObject):
99 type = 'EtherTapBase'
100 abstract = True
101 cxx_header = "dev/net/ethertap.hh"
102 bufsz = Param.Int(10000, "tap buffer size")
103 dump = Param.EtherDump(NULL, "dump object")
104 tap = SlavePort("Ethernet interface to connect to gem5's network")
105
42from m5.SimObject import SimObject
43from m5.params import *
44from m5.proxy import *
45from PciDevice import PciDevice
46
47class EtherObject(SimObject):
48 type = 'EtherObject'
49 abstract = True

--- 49 unchanged lines hidden (view full) ---

99class EtherTapBase(EtherObject):
100 type = 'EtherTapBase'
101 abstract = True
102 cxx_header = "dev/net/ethertap.hh"
103 bufsz = Param.Int(10000, "tap buffer size")
104 dump = Param.EtherDump(NULL, "dump object")
105 tap = SlavePort("Ethernet interface to connect to gem5's network")
106
107if buildEnv['USE_TUNTAP']:
108 class EtherTap(EtherTapBase):
109 type = 'EtherTap'
110 cxx_header = "dev/net/ethertap.hh"
111 tun_clone_device = Param.String('/dev/net/tun',
112 "Path to the tun clone device node")
113 tap_device_name = Param.String('gem5-tap', "Tap device name")
114
106class EtherTapStub(EtherTapBase):
107 type = 'EtherTapStub'
108 cxx_header = "dev/net/ethertap.hh"
109 port = Param.UInt16(3500, "Port helper should send packets to")
110
111class EtherDump(SimObject):
112 type = 'EtherDump'
113 cxx_header = "dev/net/etherdump.hh"

--- 154 unchanged lines hidden ---
115class EtherTapStub(EtherTapBase):
116 type = 'EtherTapStub'
117 cxx_header = "dev/net/ethertap.hh"
118 port = Param.UInt16(3500, "Port helper should send packets to")
119
120class EtherDump(SimObject):
121 type = 'EtherDump'
122 cxx_header = "dev/net/etherdump.hh"

--- 154 unchanged lines hidden ---