124 virtual int command(
int,
const char *
const *);
217 virtual void start();
274 static inline const int
285 static inline const int
330 const int &,
const int &,
const int &,
const int &,
const int &,
331 const int &,
const int &,
const double &,
const int &,
const int &);
SendTimer class is used to handle the timer of probe messages.
SendTimer(SunIPRoutingSink *m)
virtual void expire(Event *e)
Method invoked when the SinkProbeTimer timer expires.
SunIPRoutingSink class is used to represent the routing layer of a sink.
static nsaddr_t str2addr(const char *)
Returns a nsaddr_t address from an IP written as a string in the form "x.x.x.x".
int PoissonTraffic_
Enable (1) or disable (0) the Poisson traffic for SUN packets.
virtual void start()
Starts to send Probe packets.
virtual void writePathInTrace(const Packet *)
Writes in the Path Trace file the path contained in the Packet.
SunIPRoutingSink()
Constructor of SunIPRoutingNode class.
static long number_of_ackpkt_
Comulative number of Ack packets processed by SunIPRoutingNode objects.
virtual ~SunIPRoutingSink()
Constructor of SunIPRoutingNode class.
bool trace_
Flag used to enable or disable the trace file for nodes,.
virtual int recvAsyncClMsg(ClMessage *)
Cross-Layer messages asynchronous interpreter.
virtual void setProbeTimer(const double &)
Sets the probe interval timer.
static const int getProbePktHeaderSize()
Returns the size in byte of a hdr_sun_probe packet header.
static const int getAckHeaderSize()
Returns the size in byte of a hdr_sun_ack packet header.
virtual void transmit()
Sends a single Probe packet.
virtual void initPktAck(Packet *)
Initializes an ack packet passed as argument with the default values.
const double getDelay(const double &period_) const
Returns a delay value to use in transmission.
virtual void sendProbe()
Creates and sends in broadcast a probe message to notify the presence of the sink.
const long & getAckCount() const
Returns the number of Ack packets processed by the entire network.
const long & getProbeCount() const
Returns the number of Probe packets processed by the entire network.
double periodPoissonTraffic_
Period of the Poisson traffic.
char trace_separator_
Used as separator among elements in an entr of the tracefile.
bool trace_path_
Flag used to enable or disable the path trace file for nodes,.
SendTimer sendTmr_
SendTimer object.
virtual const double & getProbeTimer() const
Returns the current time interval between two consecutive probes.
char * trace_file_path_name_
Name of the trace file that contains the list of paths of the data packets received.
virtual void sendBackAck(const Packet *)
Creates an ack packet and sends it to the previous hop using the information contained in the header ...
virtual void initialize()
Initializes a SunIPRoutingNode node.
virtual string createTraceString(const string &, const double &, const int &, const int &, const int &, const int &, const int &, const int &, const int &, const double &, const int &, const int &)
Function that accept a list of string and create an entry for the trace file.
nsaddr_t ipAddr_
IP of the current node.
ostringstream osstream_
Used to convert to string.
static string printIP(const nsaddr_t &)
Return a string with an IP in the classic form "x.x.x.x" converting an ns2 nsaddr_t address.
virtual int recvSyncClMsg(ClMessage *)
Cross-Layer messages synchronous interpreter.
virtual int command(int, const char *const *)
TCL command interpreter.
virtual void writeInTrace(const string &)
Opens the trace file, writes the string passed as input and closes the file.
virtual void recv(Packet *)
Performs the reception of packets from upper and lower layers.
SunIPRoutingSink(const SunIPRoutingSink &)
Copy constructor declared as private.
virtual void tracePacket(const Packet *const, const string &position="UNDEF___")
Traces a packet.
ofstream trace_file_
Ofstream used to write the trace file in the disk.
double t_probe
Period of the probing.
int numberofnodes_
Number of nodes in the network, used for statistic purposes.
int printDebug_
Flag to enable or disable dirrefent levels of debug.
char * trace_file_name_
Name of the trace file writter for the current node.
ofstream trace_file_path_
Ofstream used to write the path trace file in the disk.
unsigned int ** arrayofstats_
Structure that contains the number of data packets received by the the sink, for different nodes and ...
static long probe_count_
Comulative number of probes sent by SunIPRoutingSink objects.
virtual void stop()
Stops to send Probe packets.
hdr_sun_ack describes acks packets used by UWSUN.
hdr_sun_probe describes probe packets used by UWSUN
Provides the Ack Messages header description.
Provides the Data Messages header description.
Provides the Path Establishment Messages header description.
Provides the Probe Messages header description.
Common structures and definition used by SUN.
Provides the UWCBR packets header description and the definition of the class UWCBR.
Cross layer messages definition for the UWIP Module.
Provides the UWIP packets header description. Definition of the class that define the network layer.