50 std::cout <<
"> sendBackAck()" << std::endl;
66 std::cout <<
"[" <<
NOW
69 <<
"]::ACK_SENT_TO:" <<
printIP(ch_ack->next_hop())
83 std::cout <<
"> initPktPathEstSearch()" << std::endl;
90 ch->direction() = hdr_cmn::DOWN;
102 ch->timestamp() = Scheduler::instance().clock();
114 std::cout <<
"[" <<
NOW
117 <<
"]::GENERATING_ROUTE_ERROR"
121 std::cout <<
"> createRouteError()" << std::endl;
137 ch->next_hop() =
hdata->list_of_hops()[
hdata->pointer() - 1];
144 hpest->list_of_hops_length() =
146 hpest->pointer() = 1;
152 for (
int i = 0;
i <
hdata->pointer();
i++) {
163 std::cout <<
"> sendRouteErrorBack()" << std::endl;
168 if (
hpest->pointer() <
hpest->list_of_hops_length()) {
169 ch->next_hop() =
hpest->list_of_hops()[
hpest->pointer()];
171 ch->next_hop() =
iph->daddr();
static string printIP(const nsaddr_t &)
Returns a string with an IP in the classic form "x.x.x.x" converting an ns2 nsaddr_t address.
ostringstream osstream_
Used to convert to string.
virtual void createRouteError(const Packet *, Packet *)
Used to create a route error packet.
bool trace_
Flag used to enable or disable the trace file for nodes,.
static long number_of_ackpkt_
Comulative number of Ack packets processed by SunIPRoutingNode objects.
virtual const int & getNumberOfHopToSink() const
Returns the number of hops that separate the node to the sink.
virtual void initPktPathEstSearch(Packet *) const
Initializes a Path Establishment Search packet (previously allocated).
static long number_of_pathestablishment_
Comulative number of Path Establishment packets processed by SunIPRoutingNode objects.
virtual void initPktAck(Packet *)
Initializes an ack packet passed as argument with the default values.
double period_status_
Period of the Poisson traffic for status and ack packets.
virtual void sendBackAck(const Packet *)
Creates an ack packet and sends it to the previous hop using the information contained in the header ...
const double getDelay(const double &period_) const
Returns a delay value to use in transmission.
int printDebug_
Flag to enable or disable dirrefent levels of debug.
virtual void sendRouteErrorBack(Packet *)
Send back an error packet to the previous hop.
virtual void tracePacket(const Packet *const, const string &position="UNDEF___")
Traces a packet.
nsaddr_t ipAddr_
IP of the current node.
hdr_sun_ack describes acks packets used by UWSUN.
hdr_sun_data describes data packets used by UWSUN
hdr_sun_path_est describes path establishment packets used by UWSUN
hdr_uwcbr describes UWCBR packets.
hdr_uwip describes UWIP packets.
#define HDR_SUN_PATH_EST(p)
Common structures and definition used by SUN.
#define STACK_TRACE
Used to keep track of methods call.
static int sunuid_
Unique identifier for UWSUN packets.
Dinamic source routing protocol, this file contains Nodes specifications.