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

#include <EchoProtocolDissector.h>

Inheritance diagram for inet::EchoProtocolDissector:
inet::ProtocolDissector

Public Member Functions

virtual void dissect (Packet *packet, const Protocol *protocol, ICallback &callback) const override
 Dissects the packet according to the protocol implemented by this ProtocolDissector. More...
 

Member Function Documentation

◆ dissect()

void inet::EchoProtocolDissector::dissect ( Packet packet,
const Protocol protocol,
ICallback callback 
) const
overridevirtual

Dissects the packet according to the protocol implemented by this ProtocolDissector.

Implements inet::ProtocolDissector.

18 {
19  auto header = packet->popAtFront<EchoPacket>();
20  callback.startProtocolDataUnit(&Protocol::echo);
21  callback.visitChunk(header, &Protocol::echo);
22  if (packet->getDataLength() > b(0))
23  callback.dissectPacket(packet, nullptr);
24  ASSERT(packet->getDataLength() == B(0));
25  callback.endProtocolDataUnit(&Protocol::echo);
26 }

The documentation for this class was generated from the following files:
inet::units::units::B
intscale< b, 1, 8 > B
Definition: Units.h:1168
inet::units::values::b
value< int64_t, units::b > b
Definition: Units.h:1241
inet::Protocol::echo
static const Protocol echo
Definition: Protocol.h:125