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

Class generated from inet/common/ProtocolTag.msg:153 by opp_msgtool. More...

#include <ProtocolTag_m.h>

Inheritance diagram for inet::PacketProtocolTag:
inet::ProtocolTagBase inet::TagBase inet::IPrintableObject

Public Member Functions

 PacketProtocolTag ()
 
 PacketProtocolTag (const PacketProtocolTag &other)
 
virtual ~PacketProtocolTag ()
 
PacketProtocolTagoperator= (const PacketProtocolTag &other)
 
virtual PacketProtocolTagdup () const override
 
virtual void parsimPack (omnetpp::cCommBuffer *b) const override
 
virtual void parsimUnpack (omnetpp::cCommBuffer *b) override
 
virtual b getFrontOffset () const
 
virtual void setFrontOffset (b frontOffset)
 
virtual b getBackOffset () const
 
virtual void setBackOffset (b backOffset)
 
void set (const Protocol *protocol, b frontOffset=b(0), b backOffset=b(0))
 
- Public Member Functions inherited from inet::ProtocolTagBase
 ProtocolTagBase ()
 
 ProtocolTagBase (const ProtocolTagBase &other)
 
virtual ~ProtocolTagBase ()
 
ProtocolTagBaseoperator= (const ProtocolTagBase &other)
 
virtual const ProtocolfindProtocol () const
 
virtual void setProtocol (const Protocol *protocol)
 
const ProtocolgetProtocol () const
 
- Public Member Functions inherited from inet::TagBase
virtual const Ptr< TagBasedupShared () const
 
virtual const Ptr< TagBasechangeRegion (b offsetDelta, b lengthDelta) const
 
virtual void parsimPack (cCommBuffer *buffer) const override
 
virtual void parsimUnpack (cCommBuffer *buffer) override
 
virtual std::ostream & printToStream (std::ostream &stream, int level, int evFlags) const override
 Prints this object to the provided output stream. More...
 
virtual std::ostream & printFieldsToStream (std::ostream &stream, int level, int evFlags) const
 
virtual std::string str () const override
 
- Public Member Functions inherited from inet::IPrintableObject
virtual ~IPrintableObject ()
 
virtual std::string printToString () const
 
virtual std::string printToString (int level, int evFlags=0) const
 
virtual std::string getInfoStringRepresentation (int evFlags=0) const
 
virtual std::string getDetailStringRepresentation (int evFlags=0) const
 
virtual std::string getDebugStringRepresentation (int evFlags=0) const
 
virtual std::string getTraceStringRepresentation (int evFlags=0) const
 
virtual std::string getCompleteStringRepresentation (int evFlags=0) const
 

Protected Member Functions

bool operator== (const PacketProtocolTag &)=delete
 
- Protected Member Functions inherited from inet::ProtocolTagBase
bool operator== (const ProtocolTagBase &)=delete
 

Protected Attributes

b frontOffset = b(0)
 
b backOffset = b(0)
 
- Protected Attributes inherited from inet::ProtocolTagBase
const Protocolprotocol = nullptr
 

Private Member Functions

void copy (const PacketProtocolTag &other)
 

Additional Inherited Members

- Public Types inherited from inet::IPrintableObject
enum  PrintLevel {
  PRINT_LEVEL_TRACE, PRINT_LEVEL_DEBUG, PRINT_LEVEL_DETAIL, PRINT_LEVEL_INFO,
  PRINT_LEVEL_COMPLETE = INT_MIN
}
 
enum  PrintFlag { PRINT_FLAG_FORMATTED = (1 << 0), PRINT_FLAG_MULTILINE = (1 << 1) }
 

Detailed Description

Class generated from inet/common/ProtocolTag.msg:153 by opp_msgtool.

//
// This tag specifies the protocol of the packet.
//
// Packet processing at the sender
// ===============================
//
// | ApplicationData |
//     whole packet has no protocol
//     data part has no protocol
//
// | UdpHeader ApplicationData |
//     whole packet has UDP protocol
//     data part has UDP protocol
//
// | Ipv4Header UdpHeader ApplicationData |
//     whole packet has IPv4 protocol
//     data part has IPv4 protocol
//
// EthernetMacHeader | Ipv4Header UdpHeader ApplicationData |
//     whole packet has incomplete Ethernet protocol
//     data part has IPv4 protocol
//
// EthernetMacHeader | Ipv4Header UdpHeader ApplicationData | EthernetPadding EthernetFcs
//     whole packet has Ethernet protocol
//     data part has IPv4 protocol
//
// | EthernetMacHeader Ipv4Header UdpHeader ApplicationData EthernetPadding EthernetFcs |
//     whole packet has Ethernet protocol
//     data part has Ethernet protocol
//
// Packet processing at the receiver
// =================================
//
// | EthernetMacHeader Ipv4Header UdpHeader ApplicationData EthernetPadding EthernetFcs |
//     whole packet has Ethernet protocol
//     data part has Ethernet protocol
//
// EthernetMacHeader Ipv4Header UdpHeader ApplicationData EthernetPadding | EthernetFcs
//     whole packet has Ethernet protocol
//     data part has no protocol
//
// EthernetMacHeader | Ipv4Header UdpHeader ApplicationData | EthernetPadding EthernetFcs
//     whole packet has Ethernet protocol
//     data part has IPv4 protocol
//
// EthernetMacHeader Ipv4Header | UdpHeader ApplicationData | EthernetPadding EthernetFcs
//     whole packet has Ethernet protocol
//     data part has UDP protocol
//
// EthernetMacHeader Ipv4Header UdpHeader | ApplicationData | EthernetPadding EthernetFcs
//     whole packet has Ethernet protocol
//     data part has no protocol
//
class PacketProtocolTag extends ProtocolTagBase
{
    b frontOffset = b(0); // extra offset relative to the packet data part front offset
    b backOffset = b(0); // extra offset relative to the packet data part back offset
}

Constructor & Destructor Documentation

◆ PacketProtocolTag() [1/2]

inet::PacketProtocolTag::PacketProtocolTag ( )

◆ PacketProtocolTag() [2/2]

inet::PacketProtocolTag::PacketProtocolTag ( const PacketProtocolTag other)

◆ ~PacketProtocolTag()

virtual inet::PacketProtocolTag::~PacketProtocolTag ( )
virtual

Member Function Documentation

◆ copy()

void inet::PacketProtocolTag::copy ( const PacketProtocolTag other)
private

◆ dup()

virtual PacketProtocolTag* inet::PacketProtocolTag::dup ( ) const
inlineoverridevirtual

Reimplemented from inet::ProtocolTagBase.

413 {return new PacketProtocolTag(*this);}

◆ getBackOffset()

virtual b inet::PacketProtocolTag::getBackOffset ( ) const
virtual

◆ getFrontOffset()

virtual b inet::PacketProtocolTag::getFrontOffset ( ) const
virtual

◆ operator=()

PacketProtocolTag& inet::PacketProtocolTag::operator= ( const PacketProtocolTag other)

◆ operator==()

bool inet::PacketProtocolTag::operator== ( const PacketProtocolTag )
protecteddelete

◆ parsimPack()

virtual void inet::PacketProtocolTag::parsimPack ( omnetpp::cCommBuffer *  b) const
overridevirtual

Reimplemented from inet::ProtocolTagBase.

Referenced by inet::doParsimPacking().

◆ parsimUnpack()

virtual void inet::PacketProtocolTag::parsimUnpack ( omnetpp::cCommBuffer *  b)
overridevirtual

Reimplemented from inet::ProtocolTagBase.

Referenced by inet::doParsimUnpacking().

◆ set()

void inet::PacketProtocolTag::set ( const Protocol protocol,
b  frontOffset = b(0),
b  backOffset = b(0) 
)
inline
424  {
425  this->protocol = protocol;
426  this->frontOffset = frontOffset;
427  this->backOffset = backOffset;
428  }

◆ setBackOffset()

virtual void inet::PacketProtocolTag::setBackOffset ( b  backOffset)
virtual

◆ setFrontOffset()

Member Data Documentation

◆ backOffset

b inet::PacketProtocolTag::backOffset = b(0)
protected

◆ frontOffset

b inet::PacketProtocolTag::frontOffset = b(0)
protected

The documentation for this class was generated from the following file:
inet::PacketProtocolTag::backOffset
b backOffset
Definition: ProtocolTag_m.h:400
inet::ProtocolTagBase::protocol
const Protocol * protocol
Definition: ProtocolTag_m.h:79
inet::PacketProtocolTag::PacketProtocolTag
PacketProtocolTag()
inet::PacketProtocolTag::frontOffset
b frontOffset
Definition: ProtocolTag_m.h:399