INET Framework for OMNeT++/OMNEST
IPControlInfo Class Reference

#include <IPControlInfo.h>

List of all members.

Public Member Functions

 IPControlInfo ()
virtual ~IPControlInfo ()
 IPControlInfo (const IPControlInfo &other)
IPControlInfooperator= (const IPControlInfo &other)
virtual void setOrigDatagram (IPDatagram *d)
virtual IPDatagram * getOrigDatagram () const
virtual IPDatagram * removeOrigDatagram ()

Protected Attributes

IPDatagram * dgram

Detailed Description

Control information for sending/receiving packets over IP.

See the IPControlInfo.msg file for more info.


Constructor & Destructor Documentation

IPControlInfo::IPControlInfo ( ) [inline]
: IPControlInfo_Base() {dgram=NULL;}
IPControlInfo::~IPControlInfo ( ) [virtual]
{
    if (dgram)
    {
        drop(dgram);
        delete dgram;
    }
}
IPControlInfo::IPControlInfo ( const IPControlInfo other) [inline]
: IPControlInfo_Base() {dgram=NULL; operator=(other);}

Member Function Documentation

virtual IPDatagram* IPControlInfo::getOrigDatagram ( ) const [inline, virtual]
{return dgram;}
IPControlInfo& IPControlInfo::operator= ( const IPControlInfo other) [inline]
{IPControlInfo_Base::operator=(other); return *this;}
IPDatagram * IPControlInfo::removeOrigDatagram ( ) [virtual]

Referenced by SCTP::handleMessage(), and ICMP::sendErrorMessage().

{
    if (!dgram)
        opp_error("IPControlInfo::removeOrigDatagram(): no datagram attached "
                  "(already removed, or maybe this IPControlInfo does not come "
                  "from the IP module?)");
    IPDatagram *ret = dgram;
    drop(dgram);
    dgram = NULL;
    return ret;
}
void IPControlInfo::setOrigDatagram ( IPDatagram *  d) [virtual]

Referenced by IP::decapsulateIP().

{
    if (dgram)
        opp_error("IPControlInfo::setOrigDatagram(): a datagram is already attached");
    dgram = d;
    take(dgram);
}

Member Data Documentation

IPDatagram* IPControlInfo::dgram [protected]

The documentation for this class was generated from the following files: