#include <SimpleNetwLayer.h>
Inherits BasicLayer.
Inherited by Flood.
Inheritance diagram for SimpleNetwLayer:
Public Member Functions | |
Module_Class_Members (SimpleNetwLayer, BasicLayer, 0) | |
virtual void | initialize (int) |
Initialization of the module and some variables. | |
Protected Member Functions | |
virtual cMessage * | decapsMsg (NetwPkt *) |
decapsulate higher layer message from NetwPkt | |
virtual NetwPkt * | encapsMsg (cMessage *) |
Encapsulate higher layer packet into an NetwPkt. | |
Handle Messages | |
Functions to redefine by the programmer
These are the functions provided to add own functionality to your modules. These functions are called whenever a self message or a data message from the upper or lower layer arrives respectively. | |
virtual void | handleUpperMsg (cMessage *msg) |
Handle messages from upper layer. | |
virtual void | handleLowerMsg (cMessage *msg) |
Handle messages from lower layer. | |
virtual void | handleSelfMsg (cMessage *msg) |
Handle self messages. | |
virtual void | handleLowerControl (cMessage *msg) |
Handle control messages from lower layer. | |
Protected Attributes | |
int | headerLength |
Length of the NetwPkt header Read from omnetpp.ini. | |
SimpleArp * | arp |
Pointer to the arp module. | |
int | myNetwAddr |
cached variable of my networ address |
|
decapsulate higher layer message from NetwPkt Decapsulates the packet from the received Network packet |
|
Encapsulate higher layer packet into an NetwPkt. Encapsulates the received ApplPkt into a NetwPkt and set all needed header fields. |
|
Handle messages from lower layer. Redefine this function if you want to process messages from lower layers before they are forwarded to upper layers If you want to forward the message to upper layers please use sendUp which will take care of decapsulation and thelike Implements BasicLayer. Reimplemented in Flood. |
|
Handle messages from upper layer. Redefine this function if you want to process messages from upper layers before they are send to lower layers. For the SimpleNetwLayer we just use the destAddr of the network message as a nextHop To forward the message to lower layers after processing it please use sendDown. It will take care of anything needed Implements BasicLayer. Reimplemented in Flood. |