DESERT 3.5.1
Loading...
Searching...
No Matches
sun-ipr-sink.cpp
Go to the documentation of this file.
1//
2// Copyright (c) 2017 Regents of the SIGNET lab, University of Padova.
3// All rights reserved.
4//
5// Redistribution and use in source and binary forms, with or without
6// modification, are permitted provided that the following conditions
7// are met:
8// 1. Redistributions of source code must retain the above copyright
9// notice, this list of conditions and the following disclaimer.
10// 2. Redistributions in binary form must reproduce the above copyright
11// notice, this list of conditions and the following disclaimer in the
12// documentation and/or other materials provided with the distribution.
13// 3. Neither the name of the University of Padova (SIGNET lab) nor the
14// names of its contributors may be used to endorse or promote products
15// derived from this software without specific prior written permission.
16//
17// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
19// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
21// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
22// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
23// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
24// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
26// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
27// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28//
29
39#include "sun-ipr-sink.h"
41#include "mphy_pktheader.h"
42
43extern packet_t PT_SUN_ACK;
44extern packet_t PT_SUN_DATA;
45extern packet_t PT_SUN_PROBE;
46extern packet_t PT_SUN_PATH_EST;
47
50
54static class SunSinkModuleClass : public TclClass
55{
56public:
58 : TclClass("Module/UW/SUNSink")
59 {
60 }
61
62 TclObject *
63 create(int, const char *const *)
64 {
65 return (new SunIPRoutingSink());
66 }
68
69// Timer.
70void
72{
73 module->transmit();
74}
75
77 : t_probe(30)
79 , sendTmr_(this)
80 , trace_(false)
82{ // Binding to TCL variables.
83 if (STACK_TRACE)
84 std::cout << "> SunIPRoutingSink()" << std::endl;
85 bind("t_probe", &t_probe);
86 bind("ipAddr_", &ipAddr_);
87 bind("PoissonTraffic_", &PoissonTraffic_);
88 bind("periodPoissonTraffic_", &periodPoissonTraffic_);
89 bind("printDebug_", &printDebug_);
90 trace_separator_ = '\t';
91}
92
94{
95 if (STACK_TRACE)
96 std::cout << "> ~SunIPRoutingSink()" << std::endl;
97 if (printDebug_ > 10)
98 std::cout << "S: " << this->printIP(ipAddr_) << " deleted." << std::endl;
99}
100
101int
103{
104 if (STACK_TRACE)
105 std::cout << "> recvSyncClMsg()" << std::endl;
106 return Module::recvSyncClMsg(m);
107}
108
109int
111{
112 if (STACK_TRACE)
113 std::cout << "> recvAsyncClMsg()" << std::endl;
114 if (m->type() == UWIP_CLMSG_SEND_ADDR) {
116 ipAddr_ = m_->getAddr();
117 }
118 return Module::recvAsyncClMsg(m);
119}
120
121int
122SunIPRoutingSink::command(int argc, const char *const *argv)
123{
124 if (STACK_TRACE)
125 std::cout << "> command()" << std::endl;
126 Tcl &tcl = Tcl::instance();
127 if (argc == 2) {
128 if (strcasecmp(argv[1], "initialize") == 0) {
129 this->initialize();
130 return TCL_OK;
131 } else if (strcasecmp(argv[1], "start") == 0) { // TCL command to start
132 // the packet generation
133 // and transmission.
134 this->start();
135 return TCL_OK;
136 } else if (strcasecmp(argv[1], "stop") ==
137 0) { // TCL command to stop the packet generation.
138 this->stop();
139 return TCL_OK;
140 } else if (strcasecmp(argv[1], "sendprobe") == 0) {
141 this->sendProbe();
142 return TCL_OK;
143 } else if (strcasecmp(argv[1], "getprobetimer") == 0) {
144 this->getProbeTimer();
145 return TCL_OK;
146 } else if (strcasecmp(argv[1], "getprobepktcount") == 0) {
147 tcl.resultf("%lu", this->getProbeCount());
148 return TCL_OK;
149 } else if (strcasecmp(argv[1], "getackcount") == 0) {
150 tcl.resultf("%lu", this->getAckCount());
151 return TCL_OK;
152 } else if (strcasecmp(argv[1], "getprobepktheadersize") == 0) {
153 tcl.resultf("%i", this->getProbePktHeaderSize());
154 return TCL_OK;
155 } else if (strcasecmp(argv[1], "getackheadersize") == 0) {
156 tcl.resultf("%d", this->getAckHeaderSize());
157 return TCL_OK;
158 }
159 } else if (argc == 3) {
160 if (strcasecmp(argv[1], "setnumberofnodes") == 0) {
162 arrayofstats_ = new unsigned int *[numberofnodes_];
163 for (int i = 0; i < numberofnodes_; i++) {
164 arrayofstats_[i] = new unsigned int[MAX_HOP_NUMBER];
165 for (int j = 0; j < MAX_HOP_NUMBER; j++)
166 arrayofstats_[i][j] = 0;
167 }
168 return TCL_OK;
169 } else if (strcasecmp(argv[1], "addr") == 0) {
170 ipAddr_ = str2addr((char *) argv[2]);
171 if (ipAddr_ == 0) {
172 fprintf(stderr, "0.0.0.0 is not a valid IP address");
173 return TCL_ERROR;
174 }
175 return TCL_OK;
176 } else if (strcasecmp(argv[1], "trace") == 0) {
177 string tmp_ = ((char *) argv[2]);
178 trace_file_name_ = new char[tmp_.length() + 1];
179 strcpy(trace_file_name_, tmp_.c_str());
180 if (trace_file_name_ == NULL) {
181 fprintf(stderr, "Empty string for the trace file name");
182 return TCL_ERROR;
183 }
184 trace_ = true;
187 trace_file_.close();
188 return TCL_OK;
189 } else if (strcasecmp(argv[1], "tracepaths") == 0) {
190 string tmp_ = ((char *) argv[2]);
191 trace_file_path_name_ = new char[tmp_.length() + 1];
194 fprintf(stderr, "Empty string for the trace file name");
195 return TCL_ERROR;
196 }
197 trace_path_ = true;
200 trace_file_path_.close();
201 return TCL_OK;
202 }
203 } else if (argc == 4) {
204 if (strcasecmp(argv[1], "getstats") == 0) {
205 if (numberofnodes_ != 0) {
206 if ((atoi(argv[2])) < numberofnodes_) {
207 if ((atoi(argv[3])) < MAX_HOP_NUMBER) {
208 tcl.resultf("%d",
209 arrayofstats_[atoi(argv[2])][atoi(argv[3])]);
210 return TCL_OK;
211 } else {
212 tcl.resultf(0);
213 return TCL_OK;
214 }
215 }
216 }
217 }
218 }
219 return Module::command(argc, argv);
220}
221
222void
224{
225 if (STACK_TRACE)
226 std::cout << "> recv()" << std::endl;
227 hdr_cmn *ch = HDR_CMN(p);
228 hdr_uwip *iph = HDR_UWIP(p);
230
231 if (!ch->error()) {
232 if (trace_)
233 this->tracePacket(p, "RECV_PKT");
234 if (ch->direction() == hdr_cmn::UP) {
235 if ((ch->ptype() != PT_SUN_PATH_EST) &&
236 (ch->ptype() != PT_SUN_ACK) &&
237 (ch->ptype() != PT_SUN_PROBE)) { // Sink nodes accept only
238 // data packets.
239 // cout << "S: " << this->printIP(ipAddr_) << "
240 // - P: " << ch->uid() << " - Packet Received -
241 // UP." << endl;
242 if (ch->next_hop() == ipAddr_ || iph->daddr() == ipAddr_) {
243
244 if (printDebug_ > 5) {
245 std::cout << "[" << NOW
246 << "]::Node[IP:" << this->printIP(ipAddr_)
247 << "]::RECEIVED_PACKET_FROM:" << printIP(iph->saddr())
248 << "::UID:" << ch->uid()
249 << "::::::PREV_HOP:" << printIP(ch->prev_hop_)
250 << std::endl;
251 }
252
253 this->sendBackAck(p);
254
255 if (numberofnodes_ != 0) {
256 if (numberofnodes_ >= hdata->list_of_hops_length()) {
257 // cout <<
258 // printIP(iph->saddr())
259 // << endl;
260 int ip_ = (iph->saddr() & 0x000000ff);
261 arrayofstats_[ip_ - 1]
262 [hdata->list_of_hops_length()]++;
263 }
264 } else {
265 ;
266 }
267 if (trace_)
268 this->tracePacket(p, "RECV_DTA");
269 if (trace_path_)
270 this->writePathInTrace(p);
271 ch->size() -= sizeof(hdr_sun_data);
272 sendUp(p);
273 return;
274 } else {
275 Packet::free(p);
276 return;
277 }
278 } else {
279 Packet::free(p);
280 return;
281 }
282 } else if (ch->direction() == hdr_cmn::DOWN) {
283 return;
284 }
285 } else {
286 Packet::free(p);
287 return;
288 }
289}
290
291void
293{
294 if (STACK_TRACE)
295 std::cout << "> initialize()" << std::endl;
296 // Asking for the IP of the current Node.
297 if (ipAddr_ == 0) {
298 UWIPClMsgReqAddr *m = new UWIPClMsgReqAddr(getId());
299 m->setDest(CLBROADCASTADDR);
301 }
302}
303
304void
306{
307 if (STACK_TRACE)
308 std::cout << "> sendProbe()" << std::endl;
309 Packet *p = Packet::alloc();
310
311 hdr_cmn *ch = HDR_CMN(p);
312 ch->uid() = sunuid_++;
313 ch->ptype() = PT_SUN_PROBE;
314 // ch->size() = pktSize_; Look Down;
315 ch->direction() = hdr_cmn::DOWN;
316 ch->next_hop() = UWIP_BROADCAST; // TODO: check these values
317
318 // IP Header.
319 hdr_uwip *iph = HDR_UWIP(p);
320 iph->daddr() = UWIP_BROADCAST; // A Probe is always sent in broadcast.
321 // iph->dport() = 0;
322 iph->saddr() = ipAddr_;
323 // iph->sport() = 0;
324
325 ch->size() += sizeof(hdr_sun_probe);
326 ch->timestamp() = Scheduler::instance().clock();
327
328 if (printDebug_ > 5) {
329 std::cout << "[" << NOW
330 << "]::Node[IP:" << this->printIP(ipAddr_)
331 << "]::PROBE_SENT"
332 << "::UID:" << ch->uid()
333 << std::endl;
334 }
335
336 probe_count_++; // Only for statistics
337 if (trace_)
338 this->tracePacket(p, "SEND_PRB");
339 sendDown(p, this->getDelay(periodPoissonTraffic_));
340}
341
342string
343SunIPRoutingSink::printIP(const nsaddr_t &ip_)
344{
345 if (STACK_TRACE)
346 std::cout << "> printIP()" << std::endl;
348 out << ((ip_ & 0xff000000) >> 24);
349 out << ".";
350 out << ((ip_ & 0x00ff0000) >> 16);
351 out << ".";
352 out << ((ip_ & 0x0000ff00) >> 8);
353 out << ".";
354 out << ((ip_ & 0x000000ff));
355 return out.str();
356}
357
358/* This function convert an IP from a ns_addr_t to a string in the
359 * classical form: x.x.x.x
360 */
361string
362SunIPRoutingSink::printIP(const ns_addr_t &ipt_)
363{
364 return SunIPRoutingSink::printIP(ipt_.addr_);
365} /* SunIPRoutingSink::printIP */
366
367nsaddr_t
369{
370 if (STACK_TRACE)
371 std::cout << "> str2addr()" << std::endl;
372 int level[4] = {0, 0, 0, 0};
373 char tmp[20];
374 strncpy(tmp, str, 19);
375 tmp[19] = '\0';
376 char *p = strtok(tmp, ".");
377 for (int i = 0; p && i < 4; p = strtok(NULL, "."), i++) {
378 level[i] = atoi(p);
379 if (level[i] > 255)
380 level[i] = 255;
381 else if (level[i] < 0)
382 level[i] = 0;
383 }
384 nsaddr_t addr = 0;
385 for (int i = 0; i < 4; i++) {
386 addr += (level[i] << 8 * (3 - i));
387 }
388 return addr;
389} /* SunIPRoutingSink::str2addr */
390
391void
393{
394 if (STACK_TRACE)
395 std::cout << "> start()" << std::endl;
396 sendTmr_.resched(this->getProbeTimer());
397}
398
399void
401{
402 if (STACK_TRACE)
403 std::cout << "> stop()" << std::endl;
404 sendTmr_.force_cancel();
405}
406
407void
409{
410 if (STACK_TRACE)
411 std::cout << "> transmit()" << std::endl;
412 this->sendProbe();
413 sendTmr_.resched(this->getProbeTimer());
414}
415
416void
418{
419 if (STACK_TRACE)
420 std::cout << "> setProbeTimer()" << std::endl;
421 if (t_ > 0) {
422 t_probe = t_;
423 }
424}
425
426const double &
428{
429 if (STACK_TRACE)
430 std::cout << "> getProbeTimer()" << std::endl;
431 return t_probe;
432}
433
434void
436{
437 if (STACK_TRACE)
438 std::cout << "> sendBackAck()" << std::endl;
439 hdr_cmn *ch = HDR_CMN(p);
441
442 Packet *p_ack = Packet::alloc();
443 this->initPktAck(p_ack);
444
448
449 ch_ack->next_hop() = ch->prev_hop_;
450 iph_ack->daddr() = ch->prev_hop_;
451 hack->uid() = uwcbrh->sn();
452
453 if (printDebug_ > 5) {
454 std::cout << "[" << NOW
455 << "]::Node[IP:" << this->printIP(ipAddr_)
456 << "]::UID:" << ch->uid()
457 << "::ACK_TO:" << printIP(ch->prev_hop_)
458 << std::endl;
459 }
461 // cout << printIP(ipAddr_) << ":ack:" << printIP(ch->prev_hop_) << endl;
462 if (trace_)
463 this->tracePacket(p_ack, "SEND_ACK");
464 sendDown(p_ack, this->getDelay(periodPoissonTraffic_));
465} /* SunIPRoutingSink::sendBackAck */
466
467void
469{
470 if (STACK_TRACE)
471 std::cout << "> initPktPathEstSearch()" << std::endl;
472
473 // Common header.
474 hdr_cmn *ch = HDR_CMN(p);
475 ch->uid() = sunuid_++;
476 ch->ptype() = PT_SUN_ACK;
477 // ch->size() = 0; // Look down.
478 ch->direction() = hdr_cmn::DOWN;
479 // ch->next_hop() = 0;
480 ch->prev_hop_ = ipAddr_;
481
482 // IP header.
483 // iph->daddr() = 0;
484 // iph->dport() = 0;
485 // iph->saddr() = 0;
486 // iph->sport() = 0;
487
488 ch->size() += sizeof(hdr_sun_ack);
489 ch->timestamp() = Scheduler::instance().clock();
490} /* SunIPRoutingSink::initPktAck */
491
492void
493SunIPRoutingSink::tracePacket(const Packet *const p, const string &position)
494{
495 if (STACK_TRACE)
496 std::cout << "> tracePacket()" << std::endl;
497 hdr_MPhy *ph = HDR_MPHY(p);
498 hdr_uwip *iph = HDR_UWIP(p);
499 hdr_cmn *ch = HDR_CMN(p);
502 if (trace_) {
503 double snr_ = 0;
504 if (ph->Pn == 0) { // TODO: trick for CMRE logs
505 snr_ = -999;
506 } else {
507 snr_ = 10 * log10(ph->Pr / ph->Pn);
508 }
509 if (ch->ptype() == PT_SUN_ACK) {
510 this->writeInTrace(this->createTraceString(position,
511 Scheduler::instance().clock(),
512 ipAddr_,
513 ch->uid(),
514 hack->uid(),
515 ch->prev_hop_,
516 ch->next_hop(),
517 iph->saddr(),
518 iph->daddr(),
519 snr_,
520 ch->direction(),
521 ch->ptype()));
522 } else {
523 this->writeInTrace(this->createTraceString(position,
524 Scheduler::instance().clock(),
525 ipAddr_,
526 ch->uid(),
527 uwcbrh->sn(),
528 ch->prev_hop_,
529 ch->next_hop(),
530 iph->saddr(),
531 iph->daddr(),
532 snr_,
533 ch->direction(),
534 ch->ptype()));
535 }
536 }
537} /* SunIPRoutingSink::tracePacket */
538
539string
540SunIPRoutingSink::createTraceString(const string &info_string,
541 const double &simulation_time_, const int &node_id_, const int &pkt_id_,
542 const int &pkt_sn_, const int &pkt_from_, const int &pkt_next_hop,
543 const int &pkt_source_, const int &pkt_destination_, const double &snr_,
544 const int &direction_, const int &pkt_type)
545{
546 if (STACK_TRACE)
547 std::cout << "> createTraceString()" << std::endl;
548 osstream_.clear();
549 osstream_.str("");
550 osstream_ << info_string << this->trace_separator_ << simulation_time_
551 << this->trace_separator_ << (node_id_ & 0x000000ff)
552 << this->trace_separator_ << (pkt_id_ & 0x000000ff)
553 << this->trace_separator_ << (pkt_sn_ & 0x000000ff)
554 << this->trace_separator_ << (pkt_from_ & 0x000000ff)
555 << this->trace_separator_ << (pkt_next_hop & 0x000000ff)
556 << this->trace_separator_ << (pkt_source_ & 0x000000ff)
557 << this->trace_separator_ << (pkt_destination_ & 0x000000ff)
558 << this->trace_separator_ << snr_ << this->trace_separator_
559 << direction_ << this->trace_separator_ << pkt_type;
560 return osstream_.str();
561} /* SunIPRoutingSink::createTraceString */
562
563void
564SunIPRoutingSink::writeInTrace(const string &string_to_write_)
565{
566 if (STACK_TRACE)
567 std::cout << "> writeInTrace()" << std::endl;
568
569 trace_file_.open(trace_file_name_, fstream::app);
571 trace_file_.close();
572} /* SunIPRoutingNode::writeInTrace */
573
574void
576{
577 if (STACK_TRACE)
578 std::cout << "> writePathInTrace()" << std::endl;
579
580 hdr_uwip *iph = HDR_UWIP(p);
581 hdr_cmn *ch = HDR_CMN(p);
583
584 trace_file_path_.open(trace_file_path_name_, fstream::app);
585 osstream_.clear();
586 osstream_.str("");
587 osstream_ << Scheduler::instance().clock() << '\t' << ch->uid() << '\t'
588 << hdata->list_of_hops_length() + 1 << '\t'
589 << this->printIP(iph->saddr());
590 for (int i = 0; i < hdata->list_of_hops_length(); i++) {
591 osstream_ << '\t' << this->printIP(hdata->list_of_hops()[i]);
592 }
593 osstream_ << '\t' << this->printIP(iph->daddr());
594 trace_file_path_ << osstream_.str() << endl;
595 trace_file_path_.close();
596} /* SunIPRoutingSink::writePathInTrace */
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.
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.
Adds the module for SunIPRoutingSink in ns2.
TclObject * create(int, const char *const *)
Class that manages cross layer messages that require the IP of the node.
Definition uwip-clmsg.h:57
Class used to answer to UWIPClMsgReqAddr cross layer messages.
Definition uwip-clmsg.h:68
nsaddr_t getAddr()
hdr_sun_ack describes acks packets used by UWSUN.
Definition sun-hdr-ack.h:52
hdr_sun_data describes data packets used by UWSUN
uint8_t * list_of_hops()
Pointer to the list_of_hops_ variable.
hdr_sun_probe describes probe packets used by UWSUN
hdr_uwcbr describes UWCBR packets.
hdr_uwip describes UWIP packets.
Definition uwip-module.h:70
uint8_t & daddr()
Reference to the daddr_ variable.
uint8_t & saddr()
Reference to the saddr_ variable.
Definition uwip-module.h:95
#define HDR_SUN_ACK(p)
Definition sun-hdr-ack.h:45
#define HDR_SUN_DATA(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.
SunSinkModuleClass class_module_sun_sink
Dinamic source routing protocol, this file contains Sinks specifications.
#define HDR_UWCBR(p)
static const int MAX_HOP_NUMBER
Maximum number of hops contained in a SUN Path Establishment packet.
static const uint8_t UWIP_BROADCAST
Variable used to represent a broadcast UWIP.
Definition uwip-module.h:62
#define HDR_UWIP(P)
Definition uwip-module.h:58