#include <PacketParser.h>

Public Member Functions | |
| virtual void | initialize () |
| Called on initialisation. | |
| virtual void | handleMessage (cMessage *msg) |
| Is called if the modules receives a message. | |
| virtual char * | encapsulatePayload (cPacket *msg, unsigned int *length)=0 |
| Convert a cMessage to a data block for sending it to the tun device. | |
| virtual cPacket * | decapsulatePayload (char *buf, unsigned int length)=0 |
| Parses a block of data received from the tun device. | |
Definition at line 32 of file PacketParser.h.
| virtual cPacket* PacketParser::decapsulatePayload | ( | char * | buf, | |
| unsigned int | length | |||
| ) | [pure virtual] |
Parses a block of data received from the tun device.
Pure virtual function, has to be implemented by inherited classes.
| buf | The data to be parsed | |
| length | The length of the data |
Implemented in RealWorldTestPacketParser, and GenericPacketParser.
Referenced by UdpOutDevice::decapsulate(), and RealworldApp::decapsulate().
| virtual char* PacketParser::encapsulatePayload | ( | cPacket * | msg, | |
| unsigned int * | length | |||
| ) | [pure virtual] |
Convert a cMessage to a data block for sending it to the tun device.
Pure virtual function, has to be implemented by inherited classes.
| msg | A pointer to the message to be converted | |
| length | A pointer to an integer that will hold the length of the data |
Implemented in RealWorldTestPacketParser, and GenericPacketParser.
Referenced by UdpOutDevice::encapsulate(), and RealworldApp::encapsulate().
| virtual void PacketParser::handleMessage | ( | cMessage * | msg | ) | [inline, virtual] |
Is called if the modules receives a message.
That should never happen
Definition at line 46 of file PacketParser.h.
| virtual void PacketParser::initialize | ( | ) | [inline, virtual] |
1.5.8