diff options
author | Nathan Binkert <binkertn@umich.edu> | 2004-10-23 16:18:44 -0400 |
---|---|---|
committer | Nathan Binkert <binkertn@umich.edu> | 2004-10-23 16:18:44 -0400 |
commit | a7fd7729ab908d8f93b9bbd290d43f1f21695e3d (patch) | |
tree | ba4270879f2e8635f21c6c751c0ffc7bcbe4c6f9 /dev/etherpkt.hh | |
parent | 833c5b5ef49b4b0ff6c1736b71b6149feee50cb5 (diff) | |
download | gem5-a7fd7729ab908d8f93b9bbd290d43f1f21695e3d.tar.xz |
flesh out the TCP/IP/Ethernet support
base/refcnt.hh:
reorganize the RefCountingPtr a little bit to make it easier
to derive from
dev/etherpkt.hh:
this doesn't belong here. use the inet.hh stuff
dev/ns_gige.cc:
dev/ns_gige.hh:
use newer features in the tcp/ip/ethernet stuff
--HG--
extra : convert_revision : 32c1953c95655c1f4c70e0d8adedfd94beead624
Diffstat (limited to 'dev/etherpkt.hh')
-rw-r--r-- | dev/etherpkt.hh | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/dev/etherpkt.hh b/dev/etherpkt.hh index 9c5f00491..1b6e9858f 100644 --- a/dev/etherpkt.hh +++ b/dev/etherpkt.hh @@ -38,7 +38,6 @@ #include <assert.h> #include "base/refcnt.hh" -#include "base/inet.hh" #include "sim/host.hh" /* @@ -58,17 +57,6 @@ class PacketData : public RefCounted ~PacketData() { if (data) delete [] data; } public: - const EthHdr *eth() const { return (const EthHdr *)data; } - const IpHdr *ip() const {const EthHdr *h = eth(); return h ? h->ip() : 0;} - const TcpHdr *tcp() const {const IpHdr *h = ip(); return h ? h->tcp() : 0;} - const UdpHdr *udp() const {const IpHdr *h = ip(); return h ? h->udp() : 0;} - - EthHdr *eth() { return (EthHdr *)data; } - IpHdr *ip() { EthHdr *h = eth(); return h ? h->ip() : 0; } - TcpHdr *tcp() { IpHdr *h = ip(); return h ? h->tcp() : 0; } - UdpHdr *udp() { IpHdr *h = ip(); return h ? h->udp() : 0; } - - public: void serialize(std::ostream &os); void unserialize(Checkpoint *cp, const std::string §ion); }; |