INET Framework for OMNeT++/OMNEST
inet::UDPPacket Class Reference

#include <UDPPacket.h>

Inheritance diagram for inet::UDPPacket:
inet::UDPPacket_Base inet::ITransportPacket

Public Member Functions

 UDPPacket (const char *name=NULL, int kind=0)
 
 UDPPacket (const UDPPacket &other)
 
UDPPacketoperator= (const UDPPacket &other)
 
virtual UDPPacketdup () const override
 
int getTotalLengthField () const override
 getter/setter for totalLength field of UDP packet if set to -1, then getter returns getByteLength() More...
 
virtual unsigned int getSourcePort () const override
 
virtual void setSourcePort (unsigned int port) override
 
virtual unsigned int getDestinationPort () const override
 
virtual void setDestinationPort (unsigned int port) override
 
- Public Member Functions inherited from inet::UDPPacket_Base
virtual ~UDPPacket_Base ()
 
virtual void parsimPack (omnetpp::cCommBuffer *b) const override
 
virtual void parsimUnpack (omnetpp::cCommBuffer *b) override
 
virtual unsigned short getSrcPort () const
 
virtual void setSrcPort (unsigned short srcPort)
 
virtual unsigned short getDestPort () const
 
virtual void setDestPort (unsigned short destPort)
 
virtual void setTotalLengthField (int totalLengthField)
 
- Public Member Functions inherited from inet::ITransportPacket
virtual ~ITransportPacket ()
 

Private Member Functions

void copy (const UDPPacket &other)
 

Additional Inherited Members

- Protected Member Functions inherited from inet::UDPPacket_Base
bool operator== (const UDPPacket_Base &)
 
 UDPPacket_Base (const char *name=nullptr, short kind=0)
 
 UDPPacket_Base (const UDPPacket_Base &other)
 
UDPPacket_Baseoperator= (const UDPPacket_Base &other)
 
- Protected Attributes inherited from inet::UDPPacket_Base
unsigned short srcPort
 
unsigned short destPort
 
int totalLengthField
 

Constructor & Destructor Documentation

inet::UDPPacket::UDPPacket ( const char *  name = NULL,
int  kind = 0 
)
inline
32 : UDPPacket_Base(name,kind) {}
UDPPacket_Base(const char *name=nullptr, short kind=0)
inet::UDPPacket::UDPPacket ( const UDPPacket other)
inline
33 : UDPPacket_Base(other) {copy(other);}
UDPPacket_Base(const char *name=nullptr, short kind=0)
void copy(const UDPPacket &other)
Definition: UDPPacket.h:29

Member Function Documentation

void inet::UDPPacket::copy ( const UDPPacket other)
inlineprivate
29 {}
virtual UDPPacket* inet::UDPPacket::dup ( ) const
inlineoverridevirtual

Reimplemented from inet::UDPPacket_Base.

36 { return new UDPPacket(*this); }
UDPPacket(const char *name=NULL, int kind=0)
Definition: UDPPacket.h:32
int inet::UDPPacket::getTotalLengthField ( ) const
inlineoverridevirtual

getter/setter for totalLength field of UDP packet if set to -1, then getter returns getByteLength()

Reimplemented from inet::UDPPacket_Base.

42 { return totalLengthField == -1 ? getByteLength() : totalLengthField; }
int totalLengthField
Definition: UDPPacket_m.h:96
UDPPacket& inet::UDPPacket::operator= ( const UDPPacket other)
inline
34 {if (this==&other) return *this; UDPPacket_Base::operator=(other); copy(other); return *this;}
UDPPacket_Base & operator=(const UDPPacket_Base &other)
void copy(const UDPPacket &other)
Definition: UDPPacket.h:29
virtual void inet::UDPPacket::setDestinationPort ( unsigned int  port)
inlineoverridevirtual
virtual void inet::UDPPacket::setSourcePort ( unsigned int  port)
inlineoverridevirtual

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