diff options
Diffstat (limited to 'dev/pktfifo.hh')
-rw-r--r-- | dev/pktfifo.hh | 29 |
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 */ |