40#ifndef UWICRP_MODULE_SINK_H
41#define UWICRP_MODULE_SINK_H
109 virtual int command(
int,
const char *
const *);
116 virtual void recv(Packet *);
155 virtual string printIP(
const uint8_t);
162 static inline const int
173 static inline const int
184 static inline const int
UwIcrpSink class is used to represent the routing layer of a node.
virtual void initStatusPkt(Packet *, Packet *)
Initializes a Status Packet previously allocated.
static long numberofackpkt_
Comulative number of Ack packets processed by UwIcrpSink objects.
virtual void initialize()
Initializes a UwIcrpSink node.
int printDebug_
Flag to enable or disable dirrefent levels of debug.
virtual void recv(Packet *)
Performs the reception of packets from upper and lower layers.
virtual int recvSyncClMsg(ClMessage *)
Cross-Layer messages synchronous interpreter.
uint8_t ipAddr_
IP of the current node.
static long numberofstatuspkt_
Comulative number of Status packets processed by UwIcrpSink objects.
UwIcrpSink()
Constructor of UwIcrpSink class.
virtual string printIP(const uint8_t)
Return a string with an IP in the classic form "x.x.x.x" converting an ns2 nsaddr_t address.
static const int getAckPktHeaderSize()
Returns the size in byte of a hdr_uwicrp_ack packet header.
static const int getStatusPktHeaderSize()
Returns the size in byte of a hdr_uwicrp_status packet header.
virtual void sendBackAck(const Packet *p)
Creates an ack packet and sends it to the previous hop using the information contained in the header ...
virtual int recvAsyncClMsg(ClMessage *)
Initializes a UwIcrpSink node.
static const int getDataPktHeaderSize()
Returns the size in byte of a hdr_uwicrp_data packet header.
virtual int command(int, const char *const *)
TCL command interpreter.
~UwIcrpSink()
Destructor of UwIcrpSink class.
hdr_uwicrp_ack describes acks packets used by UWICRP.
hdr_uwicrp_data describes data packets used by UWICRP
hdr_uwicrp_status describes status packets used by UWICRP
Common structures and definition used by UWICRP.
Provides the Ack Messages header description.
Provides the Data Messages header description.
Provides the Status Messages header description.
Cross layer messages definition for the UWIP Module.
Provides the UWIP packets header description. Definition of the class that define the network layer.