summaryrefslogtreecommitdiff
path: root/dev/pktfifo.hh
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2006-02-28 06:13:35 -0500
committerGabe Black <gblack@eecs.umich.edu>2006-02-28 06:13:35 -0500
commitf7360d5bca61baf4539698faf08fc36113c4fb33 (patch)
tree1551252d2ea703d26c39eddcd21e752eb94a148c /dev/pktfifo.hh
parent299efffaf5eb5fb55b2109a643e1e0e985f89ce6 (diff)
parentd207168eda13483a2990cdf060c1a7ead42cc9da (diff)
downloadgem5-f7360d5bca61baf4539698faf08fc36113c4fb33.tar.xz
Merge gblack@m5.eecs.umich.edu:/bk/multiarch
into ewok.(none):/home/gblack/m5/multiarch --HG-- extra : convert_revision : 0b3ffc0605c9043d7f5bf6c15f4a3c68846a732a
Diffstat (limited to 'dev/pktfifo.hh')
-rw-r--r--dev/pktfifo.hh29
1 files changed, 29 insertions, 0 deletions
diff --git a/dev/pktfifo.hh b/dev/pktfifo.hh
index e63fd291f..e245840a8 100644
--- a/dev/pktfifo.hh
+++ b/dev/pktfifo.hh
@@ -127,6 +127,35 @@ class PacketFifo
fifo.erase(i);
}
+ bool copyout(void *dest, int offset, int len);
+
+ int countPacketsBefore(iterator end)
+ {
+ iterator i = fifo.begin();
+ int count = 0;
+
+ while (i != end) {
+ ++count;
+ ++i;
+ }
+
+ return count;
+ }
+
+ int countPacketsAfter(iterator i)
+ {
+ iterator end = fifo.end();
+ int count = 0;
+
+ while (i != end) {
+ ++count;
+ ++i;
+ }
+
+ return count;
+ }
+
+
/**
* Serialization stuff
*/