INET Framework for OMNeT++/OMNEST
|
Reassembly buffer for fragmented IPv6 datagrams. More...
#include <IPv6FragBuf.h>
Classes | |
struct | DatagramBuffer |
struct | Key |
Public Member Functions | |
IPv6FragBuf () | |
Ctor. More... | |
~IPv6FragBuf () | |
Dtor. More... | |
void | init (ICMPv6 *icmp) |
Initialize fragmentation buffer. More... | |
IPv6Datagram * | addFragment (IPv6Datagram *datagram, IPv6FragmentHeader *fh, simtime_t now) |
Takes a fragment and inserts it into the reassembly buffer. More... | |
void | purgeStaleFragments (simtime_t lastupdate) |
Throws out all fragments which are incomplete and their last update (last fragment arrival) was before "lastupdate", and sends ICMP TIME EXCEEDED message about them. More... | |
Protected Types | |
typedef std::map< Key, DatagramBuffer > | Buffers |
Protected Attributes | |
Buffers | bufs |
ICMPv6 * | icmpModule = nullptr |
Reassembly buffer for fragmented IPv6 datagrams.
|
protected |
inet::IPv6FragBuf::IPv6FragBuf | ( | ) |
Ctor.
inet::IPv6FragBuf::~IPv6FragBuf | ( | ) |
Dtor.
IPv6Datagram * inet::IPv6FragBuf::addFragment | ( | IPv6Datagram * | datagram, |
IPv6FragmentHeader * | fh, | ||
simtime_t | now | ||
) |
Takes a fragment and inserts it into the reassembly buffer.
If this fragment completes a datagram, the full reassembled datagram is returned, otherwise nullptr.
Referenced by inet::IPv6::localDeliver().
void inet::IPv6FragBuf::init | ( | ICMPv6 * | icmp | ) |
Initialize fragmentation buffer.
ICMP module is needed for sending TIME_EXCEEDED ICMP message in purgeStaleFragments().
Referenced by inet::IPv6::initialize().
void inet::IPv6FragBuf::purgeStaleFragments | ( | simtime_t | lastupdate | ) |
Throws out all fragments which are incomplete and their last update (last fragment arrival) was before "lastupdate", and sends ICMP TIME EXCEEDED message about them.
Timeout should be between 60 seconds and 120 seconds (RFC1122). This method should be called more frequently, maybe every 10..30 seconds or so.
Referenced by inet::IPv6::localDeliver().
|
protected |
Referenced by addFragment(), purgeStaleFragments(), and ~IPv6FragBuf().
|
protected |
Referenced by addFragment(), init(), IPv6FragBuf(), and purgeStaleFragments().