summaryrefslogtreecommitdiff
path: root/dev/pktfifo.hh
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2006-02-28 06:03:57 -0500
committerGabe Black <gblack@eecs.umich.edu>2006-02-28 06:03:57 -0500
commitd207168eda13483a2990cdf060c1a7ead42cc9da (patch)
tree18383564b534a5fe6a7ba73bdc179fa249788013 /dev/pktfifo.hh
parente5f75c2549d4881284202208c09e881886f4fdd4 (diff)
parent29f50d934549f10b073a5492bd0d441d71534ace (diff)
downloadgem5-d207168eda13483a2990cdf060c1a7ead42cc9da.tar.xz
Merge zizzer.eecs.umich.edu:/z/m5/Bitkeeper/m5
into zizzer.eecs.umich.edu:/z/m5/Bitkeeper/multiarch --HG-- extra : convert_revision : 3a3ff8fcf472db385219a00ae434d1f3fea43b18
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
*/