TcpModule Class Reference

#include <tcp-module.h>

Inheritance diagram for TcpModule:

Inheritance graph
[legend]
Collaboration diagram for TcpModule:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TcpModule ()
virtual ~TcpModule ()
virtual void recv (Packet *p, Handler *callback)
virtual void recv (Packet *p)
virtual void recv (Packet *p, int idSrc)
virtual int command (int argc, const char *const *argv)

Protected Attributes

TcpAgent * tcpagent_

Detailed Description

TCP transport module

This class implements TCP modules for use in NS-miracle by wrapping standard NS TCP Agents into NS-miracle Modules.

Definition at line 44 of file tcp-module.h.


Member Function Documentation

void TcpModule::recv ( Packet *  p,
Handler *  callback 
) [virtual]

This method is called by TcpAgent::send() since standard ns TcpAgent see TcpModule as being their (down)target. TcpModule then forwards the packet to lower layers using SendDown()

Parameters:
p pointer to the packet to be sent
callback unused by all known TcpAgents, kept only for compatibility

Reimplemented from Module.

Definition at line 79 of file tcp-module.cc.

References Module::sendDown().

Referenced by recv().

Here is the call graph for this function:

void TcpModule::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 85 of file tcp-module.cc.

References tcpagent_.

void TcpModule::recv ( Packet *  p,
int  idSrc 
) [virtual]

Call the recv method with only the Packet parameter, by extending it it is possible to use the information stored in idSrc to understand with module has sent this packet

Parameters:
p pointer to the packet will be received
idSrc unique id of the module that has sent the packet
See also:
SAP, ChSAP

Reimplemented from Module.

Definition at line 92 of file tcp-module.cc.

References recv().

Here is the call graph for this function:

int TcpModule::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.

Definition at line 98 of file tcp-module.cc.

References Module::command(), IPModule::str2addr(), and tcpagent_.

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:52:33 2008 for NS-MIRACLE library by  doxygen 1.5.2