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/ns_gige.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/ns_gige.hh')
-rw-r--r-- | dev/ns_gige.hh | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/dev/ns_gige.hh b/dev/ns_gige.hh index b7838cf6f..60dcf3fc2 100644 --- a/dev/ns_gige.hh +++ b/dev/ns_gige.hh @@ -31,9 +31,10 @@ * DP83820 ethernet controller */ -#ifndef __NS_GIGE_HH__ -#define __NS_GIGE_HH__ +#ifndef __DEV_NS_GIGE_HH__ +#define __DEV_NS_GIGE_HH__ +#include "base/inet.hh" #include "base/statistics.hh" #include "dev/etherint.hh" #include "dev/etherpkt.hh" @@ -44,9 +45,6 @@ #include "mem/bus/bus.hh" #include "sim/eventq.hh" -/** length of ethernet address in bytes */ -#define EADDR_LEN 6 - /** * Ethernet device registers */ @@ -90,7 +88,7 @@ struct dp_rom { * for perfect match memory. * the linux driver doesn't use any other ROM */ - uint8_t perfectMatch[EADDR_LEN]; + uint8_t perfectMatch[ETH_ADDR_LEN]; }; class IntrControl; @@ -302,7 +300,7 @@ class NSGigE : public PciDev * receive address filter */ bool rxFilterEnable; - bool rxFilter(PacketPtr packet); + bool rxFilter(PacketPtr &packet); bool acceptBroadcast; bool acceptMulticast; bool acceptUnicast; @@ -339,7 +337,7 @@ class NSGigE : public PciDev bool dma_data_free, Tick dma_read_delay, Tick dma_write_delay, Tick dma_read_factor, Tick dma_write_factor, PciConfigAll *cf, PciConfigData *cd, Tsunami *t, uint32_t bus, uint32_t dev, - uint32_t func, bool rx_filter, const int eaddr[6], + uint32_t func, bool rx_filter, Net::EthAddr eaddr, uint32_t tx_fifo_size, uint32_t rx_fifo_size); ~NSGigE(); @@ -352,7 +350,7 @@ class NSGigE : public PciDev bool cpuIntrPending() const; void cpuIntrAck() { cpuIntrClear(); } - bool recvPacket(PacketPtr packet); + bool recvPacket(PacketPtr &packet); void transferDone(); void setInterface(NSGigEInt *i) { assert(!interface); interface = i; } @@ -403,4 +401,4 @@ class NSGigEInt : public EtherInt virtual void sendDone() { dev->transferDone(); } }; -#endif // __NS_GIGE_HH__ +#endif // __DEV_NS_GIGE_HH__ |