Public Member Functions | Protected Attributes

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.

Definition at line 30 of file IPControlInfo.h.


Constructor & Destructor Documentation

IPControlInfo::IPControlInfo (  )  [inline]

Definition at line 35 of file IPControlInfo.h.

: IPControlInfo_Base() {dgram=NULL;}

IPControlInfo::~IPControlInfo (  )  [virtual]

Definition at line 21 of file IPControlInfo.cc.

{
    if (dgram)
    {
        drop(dgram);
        delete dgram;
    }
}

IPControlInfo::IPControlInfo ( const IPControlInfo other  )  [inline]

Definition at line 37 of file IPControlInfo.h.

: IPControlInfo_Base() {dgram=NULL; operator=(other);}


Member Function Documentation

virtual IPDatagram* IPControlInfo::getOrigDatagram (  )  const [inline, virtual]

Definition at line 41 of file IPControlInfo.h.

{return dgram;}

IPControlInfo& IPControlInfo::operator= ( const IPControlInfo other  )  [inline]

Definition at line 38 of file IPControlInfo.h.

{IPControlInfo_Base::operator=(other); return *this;}

IPDatagram * IPControlInfo::removeOrigDatagram (  )  [virtual]

Definition at line 38 of file IPControlInfo.cc.

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]

Definition at line 30 of file IPControlInfo.cc.

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]

Definition at line 33 of file IPControlInfo.h.

Referenced by removeOrigDatagram(), setOrigDatagram(), and ~IPControlInfo().


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