IPAddressCodec Class Reference

#include <ip-address-codec.h>

Inheritance diagram for IPAddressCodec:

Inheritance graph
[legend]
Collaboration diagram for IPAddressCodec:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 IPAddressCodec ()
 ~IPAddressCodec ()
virtual int command (int argc, const char *const *argv)
virtual void recv (Packet *p)

Private Attributes

int up_

Detailed Description

This class implements the module which converts the IPAddress (MrclAddress) to the old ns address format (ns_addr_t) and correspondly sets the opportune header fields in order to guarantee backward compatibility with ns modules which exploit old ns address format

Definition at line 47 of file ip-address-codec.h.


Constructor & Destructor Documentation

IPAddressCodec::IPAddressCodec (  ) 

Class constructor

Definition at line 43 of file ip-address-codec.cc.

IPAddressCodec::~IPAddressCodec (  ) 

Class destructor

Definition at line 47 of file ip-address-codec.cc.


Member Function Documentation

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

TCL command interpreter. It implements the following OTcl methods:

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:
Module

Reimplemented from Module.

Definition at line 51 of file ip-address-codec.cc.

References Module::command(), MrclAddress::getAddr(), and up_.

Here is the call graph for this function:

void IPAddressCodec::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.

Definition at line 105 of file ip-address-codec.cc.

References RoutingHdr::daddr(), HDR_ROUTING, RoutingHdr::saddr(), Module::sendDown(), Module::sendUp(), UP, and up_.

Here is the call graph for this function:


Member Data Documentation

int IPAddressCodec::up_ [private]

TRUE defines that the codec is placed above the routing module

Definition at line 76 of file ip-address-codec.h.

Referenced by command(), and recv().


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