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

#include <MplsProtocolDissector.h>

Inheritance diagram for inet::MplsProtocolDissector:
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::MplsProtocolDissector::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<MplsHeader>();
20  callback.startProtocolDataUnit(&Protocol::mpls);
21  callback.visitChunk(header, &Protocol::mpls);
22  const Protocol *encapsulatedProtocol = header->getS() ? &Protocol::ipv4 : &Protocol::mpls;
23  callback.dissectPacket(packet, encapsulatedProtocol);
24  callback.endProtocolDataUnit(&Protocol::mpls);
25 }

The documentation for this class was generated from the following files:
inet::Protocol::ipv4
static const Protocol ipv4
Definition: Protocol.h:93
inet::Protocol::mpls
static const Protocol mpls
Definition: Protocol.h:101