#include <tcp-module.h>
Inheritance diagram for TcpModule:
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_ |
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.
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()
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] |
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
p | pointer to the packet will be received | |
idSrc | unique id of the module that has sent the packet |
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
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) |
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: