diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2006-04-24 19:31:50 -0400 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2006-04-24 19:31:50 -0400 |
commit | 8f8d09538f58d2e56d7f61b595e64bd06cce8484 (patch) | |
tree | 1f11c7191ddfdf7d061764a3746f3c030d6b5271 /base | |
parent | 6dc3b2fa395601852cb3efff302229907b1759f8 (diff) | |
download | gem5-8f8d09538f58d2e56d7f61b595e64bd06cce8484.tar.xz |
Mostly done with all device models for new memory system. Still need to get timing packets working and get sinic working
after merge from head. Checkpointing may need some work now. Endian-happiness still not complete.
SConscript:
add all devices back into make file
base/inet.hh:
dev/etherbus.cc:
dev/etherbus.hh:
dev/etherdump.cc:
dev/etherdump.hh:
dev/etherint.hh:
dev/etherlink.cc:
dev/etherlink.hh:
dev/etherpkt.cc:
dev/etherpkt.hh:
dev/ethertap.cc:
dev/ethertap.hh:
dev/pktfifo.cc:
dev/pktfifo.hh:
rename PacketPtr EthPacketPtr so it doesn't conflict with the PacketPtr type in the memory system
configs/test/fs.py:
add nics to fs.py
cpu/cpu_exec_context.cc:
remove this check, as it's not valid. We may want to add something else back in to make sure that no one can delete the
static virtual ports in the exec context
cpu/simple/cpu.cc:
cpu/simple/cpu.hh:
dev/alpha_console.cc:
dev/ide_ctrl.cc:
use new methods for accessing packet data
dev/ide_disk.cc:
add some more dprintfs
dev/io_device.cc:
delete packets when we are done with them. Update for new packet methods to access data
dev/isa_fake.cc:
dev/pciconfigall.cc:
dev/tsunami_cchip.cc:
dev/tsunami_io.cc:
dev/tsunami_pchip.cc:
dev/uart8250.cc:
dev/uart8250.hh:
mem/physical.cc:
mem/port.cc:
dUpdate for new packet methods to access data
dev/ns_gige.cc:
Update for new memory system
dev/ns_gige.hh:
python/m5/objects/Ethernet.py:
update for new memory system
dev/sinic.cc:
dev/sinic.hh:
Update for new memory system. Untested as need to merge in head because of kernel driver differences between versions
mem/packet.hh:
Add methods to access data instead of accessing it directly.
--HG--
extra : convert_revision : 223f43876afd404e68337270cd9a5e44d0bf553e
Diffstat (limited to 'base')
-rw-r--r-- | base/inet.hh | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/base/inet.hh b/base/inet.hh index e07e01935..e5d0473f9 100644 --- a/base/inet.hh +++ b/base/inet.hh @@ -117,11 +117,11 @@ class EthPtr { protected: friend class IpPtr; - PacketPtr p; + EthPacketPtr p; public: EthPtr() {} - EthPtr(const PacketPtr &ptr) : p(ptr) { } + EthPtr(const EthPacketPtr &ptr) : p(ptr) { } EthHdr *operator->() { return (EthHdr *)p->data; } EthHdr &operator*() { return *(EthHdr *)p->data; } @@ -131,10 +131,10 @@ class EthPtr const EthHdr &operator*() const { return *(const EthHdr *)p->data; } operator const EthHdr *() const { return (const EthHdr *)p->data; } - const EthPtr &operator=(const PacketPtr &ptr) { p = ptr; return *this; } + const EthPtr &operator=(const EthPacketPtr &ptr) { p = ptr; return *this; } - const PacketPtr packet() const { return p; } - PacketPtr packet() { return p; } + const EthPacketPtr packet() const { return p; } + EthPacketPtr packet() { return p; } bool operator!() const { return !p; } operator bool() const { return p; } }; @@ -174,13 +174,13 @@ class IpPtr protected: friend class TcpPtr; friend class UdpPtr; - PacketPtr p; + EthPacketPtr p; const IpHdr *h() const { return (const IpHdr *)(p->data + sizeof(eth_hdr)); } IpHdr *h() { return (IpHdr *)(p->data + sizeof(eth_hdr)); } - void set(const PacketPtr &ptr) + void set(const EthPacketPtr &ptr) { EthHdr *eth = (EthHdr *)ptr->data; if (eth->type() == ETH_TYPE_IP) @@ -191,7 +191,7 @@ class IpPtr public: IpPtr() {} - IpPtr(const PacketPtr &ptr) { set(ptr); } + IpPtr(const EthPacketPtr &ptr) { set(ptr); } IpPtr(const EthPtr &ptr) { set(ptr.p); } IpPtr(const IpPtr &ptr) : p(ptr.p) { } @@ -203,12 +203,12 @@ class IpPtr const IpHdr &operator*() const { return *h(); } operator const IpHdr *() const { return h(); } - const IpPtr &operator=(const PacketPtr &ptr) { set(ptr); return *this; } + const IpPtr &operator=(const EthPacketPtr &ptr) { set(ptr); return *this; } const IpPtr &operator=(const EthPtr &ptr) { set(ptr.p); return *this; } const IpPtr &operator=(const IpPtr &ptr) { p = ptr.p; return *this; } - const PacketPtr packet() const { return p; } - PacketPtr packet() { return p; } + const EthPacketPtr packet() const { return p; } + EthPacketPtr packet() { return p; } bool operator!() const { return !p; } operator bool() const { return p; } operator bool() { return p; } @@ -272,13 +272,13 @@ struct TcpHdr : public tcp_hdr class TcpPtr { protected: - PacketPtr p; + EthPacketPtr p; int off; const TcpHdr *h() const { return (const TcpHdr *)(p->data + off); } TcpHdr *h() { return (TcpHdr *)(p->data + off); } - void set(const PacketPtr &ptr, int offset) { p = ptr; off = offset; } + void set(const EthPacketPtr &ptr, int offset) { p = ptr; off = offset; } void set(const IpPtr &ptr) { if (ptr->proto() == IP_PROTO_TCP) @@ -303,8 +303,8 @@ class TcpPtr const TcpPtr &operator=(const IpPtr &i) { set(i); return *this; } const TcpPtr &operator=(const TcpPtr &t) { set(t.p, t.off); return *this; } - const PacketPtr packet() const { return p; } - PacketPtr packet() { return p; } + const EthPacketPtr packet() const { return p; } + EthPacketPtr packet() { return p; } bool operator!() const { return !p; } operator bool() const { return p; } operator bool() { return p; } @@ -362,13 +362,13 @@ struct UdpHdr : public udp_hdr class UdpPtr { protected: - PacketPtr p; + EthPacketPtr p; int off; const UdpHdr *h() const { return (const UdpHdr *)(p->data + off); } UdpHdr *h() { return (UdpHdr *)(p->data + off); } - void set(const PacketPtr &ptr, int offset) { p = ptr; off = offset; } + void set(const EthPacketPtr &ptr, int offset) { p = ptr; off = offset; } void set(const IpPtr &ptr) { if (ptr->proto() == IP_PROTO_UDP) @@ -393,8 +393,8 @@ class UdpPtr const UdpPtr &operator=(const IpPtr &i) { set(i); return *this; } const UdpPtr &operator=(const UdpPtr &t) { set(t.p, t.off); return *this; } - const PacketPtr packet() const { return p; } - PacketPtr packet() { return p; } + const EthPacketPtr packet() const { return p; } + EthPacketPtr packet() { return p; } bool operator!() const { return !p; } operator bool() const { return p; } operator bool() { return p; } |