IPModule Class Reference

Inheritance diagram for IPModule:

Inheritance graph
[legend]
Collaboration diagram for IPModule:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 IPModule ()
virtual ~IPModule ()
virtual void recv (Packet *p)
virtual int command (int argc, const char *const *argv)
virtual int recvSyncClMsg (ClMessage *m)
nsaddr_t str2sub (const char *str)
nsaddr_t get_subnetaddr (nsaddr_t addr)

Static Public Member Functions

static nsaddr_t str2addr (const char *str)

Protected Attributes

nsaddr_t ipAddr_
nsaddr_t subnet_

Detailed Description

Definition at line 46 of file ipmodule.h.


Member Function Documentation

void IPModule::recv ( Packet *  p  )  [virtual]

Abstract method which has to be filled with the ad-hoc operations that the module has to do to the packet received

Parameters:
p pointer to the packet will be received
See also:
SAP, ChSAP

Implements Module.

Reimplemented in IPInterfaceModule, IPRoutingModule, and UmtsIPInterfaceModule.

Definition at line 99 of file ipmodule.cc.

References Module::drop(), ipAddr_, Module::sendDown(), Module::sendUp(), and UP.

Here is the call graph for this function:

int IPModule::command ( int  argc,
const char *const *  argv 
) [virtual]

TCL command interpreter. It implements the following OTcl methods:

Moreover it inherits all the OTcl method of PlugIn

Parameters:
argc number of arguments in argv
argv array of strings which are the comand parameters (Note that argv[0] is the name of the object)
Returns:
TCL_OK or TCL_ERROR whether the command has been dispatched succesfully or no
See also:
PlugIn

Reimplemented from Module.

Reimplemented in IPInterfaceModule, IPRoutingModule, and UmtsIPInterfaceModule.

Definition at line 54 of file ipmodule.cc.

References Module::command(), get_subnetaddr(), ipAddr_, str2addr(), str2sub(), and subnet_.

Referenced by IPInterfaceModule::command().

Here is the call graph for this function:

int IPModule::recvSyncClMsg ( ClMessage m  )  [virtual]

Cross-Layer messages synchronous interpreter. It has to be properly extended in order to interpret custom cross-layer messages used by this particular plug-in. This type of communication need to be directly answered in the message exchanged in order to be synchronous with the source.

Parameters:
m an instance of ClMessage that represent the message received and used for the answer
Returns:
zero if successful
See also:
NodeCore, ClMessage, ClSAP, ClTracer

Reimplemented from PlugIn.

Definition at line 210 of file ipmodule.cc.

References ClMessage::getSource(), ipAddr_, PlugIn::recvSyncClMsg(), Module::sendAsyncClMsgDown(), ClMessage::type(), and UNICAST.

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Wed Nov 26 15:48:54 2008 for NS-MIRACLE library by  doxygen 1.5.2