INET Framework for OMNeT++/OMNEST
|
Generic reassembly buffer for a fragmented datagram (or a fragmented anything). More...
#include <ReassemblyBuffer.h>
Classes | |
struct | Region |
Public Member Functions | |
ReassemblyBuffer () | |
Ctor. More... | |
~ReassemblyBuffer () | |
Dtor. More... | |
bool | addFragment (ushort beg, ushort end, bool islast) |
Add a fragment, and returns true if reassembly has completed (i.e. More... | |
ushort | getTotalLength () const |
Returns the total (assembled) length of the datagram. More... | |
Protected Types | |
typedef std::vector< Region > | RegionVector |
Protected Member Functions | |
void | merge (ushort beg, ushort end, bool islast) |
void | mergeFragments () |
Protected Attributes | |
Region | main |
RegionVector * | fragments |
Generic reassembly buffer for a fragmented datagram (or a fragmented anything).
Currently used in IPv4FragBuf and IPv6FragBuf.
|
protected |
inet::ReassemblyBuffer::ReassemblyBuffer | ( | ) |
Ctor.
inet::ReassemblyBuffer::~ReassemblyBuffer | ( | ) |
Dtor.
Add a fragment, and returns true if reassembly has completed (i.e.
we have everything from offset 0 to the last fragment).
Referenced by inet::IPv4FragBuf::addFragment(), and inet::IPv6FragBuf::addFragment().
|
inline |
Returns the total (assembled) length of the datagram.
Can only be called after addFragment() returned true.
Referenced by inet::IPv4FragBuf::addFragment(), and inet::IPv6FragBuf::addFragment().
Referenced by addFragment().
|
protected |
Referenced by merge().
|
protected |
Referenced by merge(), mergeFragments(), ReassemblyBuffer(), and ~ReassemblyBuffer().
|
protected |
Referenced by addFragment(), merge(), mergeFragments(), and ReassemblyBuffer().