#include <aodv_rqueue.h>
Inheritance diagram for aodv_rqueue:


Definition at line 50 of file aodv_rqueue.h.
Public Member Functions | |
| aodv_rqueue () | |
| int | command (int argc, const char *const *argv) |
| virtual void | debug (const char *fmt,...) |
| virtual int | delay_bind_dispatch (const char *varName, const char *localName, TclObject *tracer) |
| virtual void | delay_bind_init_all () |
| Packet * | deque (nsaddr_t dst) |
| Packet * | deque (void) |
| virtual void | drop (Packet *p) |
| void | enque (Packet *p) |
| char | find (nsaddr_t dst) |
| int | isdebug () const |
| virtual void | recv (Packet *p, const char *s) |
| void | recv (Packet *, Handler *) |
| virtual void | recvOnly (Packet *) |
| void | setDropTarget (NsObject *dt) |
| void | target (NsObject *target) |
| NsObject * | target () |
Protected Member Functions | |
| virtual void | drop (Packet *p, const char *s) |
| void | handle (Event *) |
| virtual void | reset () |
| void | send (Packet *p, Handler *h) |
Protected Attributes | |
| int | debug_ |
| NsObject * | drop_ |
| NsObject * | target_ |
Private Member Functions | |
| bool | findAgedPacket (Packet *&p, Packet *&prev) |
| void | findPacketWithDst (nsaddr_t dst, Packet *&p, Packet *&prev) |
| void | purge (void) |
| Packet * | remove_head () |
| void | verifyQueue (void) |
Private Attributes | |
| Packet * | head_ |
| int | len_ |
| int | limit_ |
| Packet * | tail_ |
| double | timeout_ |
|
|
Definition at line 43 of file aodv_rqueue.cc. References AODV_RTQ_MAX_LEN, AODV_RTQ_TIMEOUT, head_, len_, limit_, tail_, and timeout_. 00043 { 00044 head_ = tail_ = 0; 00045 len_ = 0; 00046 limit_ = AODV_RTQ_MAX_LEN; 00047 timeout_ = AODV_RTQ_TIMEOUT; 00048 }
|
|
||||||||||||
|
Reimplemented from Connector. Definition at line 58 of file aodv_rqueue.h. References Connector::command(). Referenced by AODV::command(). 00059 { return Connector::command(argc, argv); }
Here is the call graph for this function: ![]() |
|
||||||||||||
|
Definition at line 102 of file object.cc. References NsObject::debug_. 00103 { 00104 if (!debug_) 00105 return; 00106 va_list ap; 00107 va_start(ap, fmt); 00108 vprintf(fmt, ap); 00109 }
|
|
||||||||||||||||
|
Reimplemented in BayFullTcpAgent, Agent, MPLSAddressClassifier, LDPAgent, HbAfterRtoSctpAgent, MfrHbAfterRtoSctpAgent, MfrTimestampSctpAgent, MultipleFastRtxSctpAgent, NewRenoSctpAgent, TimestampSctpAgent, SctpAgent, FullTcpAgent, SackFullTcpAgent, RFC793eduTcpAgent, TcpSink, TcpAgent, VegasTcpAgent, XcpAgent, and XcpSink. Definition at line 63 of file object.cc. References NsObject::debug_. Referenced by MPLSAddressClassifier::delay_bind_dispatch(), and Agent::delay_bind_dispatch(). 00064 { 00065 if (delay_bind_bool(varName, localName, "debug_", &debug_, tracer)) 00066 return TCL_OK; 00067 return TclObject::delay_bind_dispatch(varName, localName, tracer); 00068 }
|
|
|
Reimplemented in BayFullTcpAgent, Agent, MPLSAddressClassifier, LDPAgent, HbAfterRtoSctpAgent, MfrHbAfterRtoSctpAgent, MfrTimestampSctpAgent, MultipleFastRtxSctpAgent, NewRenoSctpAgent, TimestampSctpAgent, SctpAgent, FullTcpAgent, SackFullTcpAgent, RFC793eduTcpAgent, TcpSink, TcpAgent, VegasTcpAgent, XcpAgent, and XcpSink. Definition at line 57 of file object.cc. Referenced by MPLSAddressClassifier::delay_bind_init_all(), and Agent::delay_bind_init_all().
|
|
|
Definition at line 107 of file aodv_rqueue.cc. References findPacketWithDst(), head_, len_, Packet::next_, purge(), remove_head(), tail_, and verifyQueue(). 00107 { 00108 Packet *p, *prev; 00109 00110 /* 00111 * Purge any packets that have timed out. 00112 */ 00113 purge(); 00114 00115 findPacketWithDst(dst, p, prev); 00116 assert(p == 0 || (p == head_ && prev == 0) || (prev->next_ == p)); 00117 00118 if(p == 0) return 0; 00119 00120 if (p == head_) { 00121 p = remove_head(); 00122 } 00123 else if (p == tail_) { 00124 prev->next_ = 0; 00125 tail_ = prev; 00126 len_--; 00127 } 00128 else { 00129 prev->next_ = p->next_; 00130 len_--; 00131 } 00132 00133 #ifdef QDEBUG 00134 verifyQueue(); 00135 #endif // QDEBUG 00136 return p; 00137 00138 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 89 of file aodv_rqueue.cc. References purge(), remove_head(), and verifyQueue(). Referenced by AODV::recvReply(), AODV::recvRequest(), AODV::rt_purge(), and AODV::sendRequest(). 00089 { 00090 Packet *p; 00091 00092 /* 00093 * Purge any packets that have timed out. 00094 */ 00095 purge(); 00096 00097 p = remove_head(); 00098 #ifdef QDEBUG 00099 verifyQueue(); 00100 #endif // QDEBUG 00101 return p; 00102 00103 }
Here is the call graph for this function: ![]() |
|
||||||||||||
|
Definition at line 114 of file connector.cc. References Connector::drop_, Packet::free(), and NsObject::recv(). 00115 { 00116 if (drop_ != 0) 00117 drop_->recv(p, s); 00118 else 00119 Packet::free(p); 00120 }
Here is the call graph for this function: ![]() |
|
|
|
Definition at line 51 of file aodv_rqueue.cc. References CURRENT_TIME, Connector::drop(), DROP_RTR_QFULL, DROP_RTR_QTIMEOUT, HDR_CMN, head_, len_, limit_, Packet::next_, purge(), remove_head(), tail_, timeout_, hdr_cmn::ts_, and verifyQueue(). Referenced by AODV::local_rt_repair(), and AODV::rt_resolve(). 00051 { 00052 struct hdr_cmn *ch = HDR_CMN(p); 00053 00054 /* 00055 * Purge any packets that have timed out. 00056 */ 00057 purge(); 00058 00059 p->next_ = 0; 00060 ch->ts_ = CURRENT_TIME + timeout_; 00061 00062 if (len_ == limit_) { 00063 Packet *p0 = remove_head(); // decrements len_ 00064 00065 assert(p0); 00066 if(HDR_CMN(p0)->ts_ > CURRENT_TIME) { 00067 drop(p0, DROP_RTR_QFULL); 00068 } 00069 else { 00070 drop(p0, DROP_RTR_QTIMEOUT); 00071 } 00072 } 00073 00074 if(head_ == 0) { 00075 head_ = tail_ = p; 00076 } 00077 else { 00078 tail_->next_ = p; 00079 tail_ = p; 00080 } 00081 len_++; 00082 #ifdef QDEBUG 00083 verifyQueue(); 00084 #endif // QDEBUG 00085 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 141 of file aodv_rqueue.cc. References findPacketWithDst(). Referenced by AODV::rt_purge(). 00141 { 00142 Packet *p, *prev; 00143 00144 findPacketWithDst(dst, p, prev); 00145 if (0 == p) 00146 return 0; 00147 else 00148 return 1; 00149 00150 }
Here is the call graph for this function: ![]() |
|
||||||||||||
|
Definition at line 220 of file aodv_rqueue.cc. References CURRENT_TIME, HDR_CMN, head_, Packet::next_, and hdr_cmn::ts_. Referenced by purge(). 00220 { 00221 00222 p = prev = 0; 00223 for(p = head_; p; p = p->next_) { 00224 if(HDR_CMN(p)->ts_ < CURRENT_TIME) { 00225 return true; 00226 } 00227 prev = p; 00228 } 00229 return false; 00230 }
|
|
||||||||||||||||
|
Definition at line 177 of file aodv_rqueue.cc. References HDR_IP, head_, and Packet::next_. Referenced by deque(), and find(). 00177 { 00178 00179 p = prev = 0; 00180 for(p = head_; p; p = p->next_) { 00181 // if(HDR_IP(p)->dst() == dst) { 00182 if(HDR_IP(p)->daddr() == dst) { 00183 return; 00184 } 00185 prev = p; 00186 } 00187 }
|
|
|
Implements Handler. Reimplemented in LinkDelay, LL, AckRecons, and Snoop. Definition at line 91 of file object.cc. References NsObject::recv().
Here is the call graph for this function: ![]() |
|
|
Definition at line 61 of file object.h. References NsObject::debug_. 00061 { return debug_; }
|
|
|
Definition at line 233 of file aodv_rqueue.cc. References findAgedPacket(), head_, len_, Packet::next_, remove_head(), tail_, and verifyQueue(). Referenced by deque(), and enque(). 00233 { 00234 Packet *p, *prev; 00235 00236 while ( findAgedPacket(p, prev) ) { 00237 assert(p == 0 || (p == head_ && prev == 0) || (prev->next_ == p)); 00238 00239 if(p == 0) return; 00240 00241 if (p == head_) { 00242 p = remove_head(); 00243 } 00244 else if (p == tail_) { 00245 prev->next_ = 0; 00246 tail_ = prev; 00247 len_--; 00248 } 00249 else { 00250 prev->next_ = p->next_; 00251 len_--; 00252 } 00253 #ifdef QDEBUG 00254 verifyQueue(); 00255 #endif // QDEBUG 00256 00257 p = prev = 0; 00258 } 00259 00260 }
Here is the call graph for this function: ![]() |
|
||||||||||||
|
Reimplemented in CMUTrace. Definition at line 96 of file object.cc. References Packet::free(). 00097 { 00098 Packet::free(p); 00099 }
Here is the call graph for this function: ![]() |
|
||||||||||||
|
Reimplemented from Connector. Definition at line 54 of file aodv_rqueue.h. References abort(). 00054 { abort(); }
Here is the call graph for this function: ![]() |
|
|
Reimplemented in Agent, and Trace. Definition at line 56 of file object.h. Referenced by Trace::recvOnly().
|
|
|
Definition at line 160 of file aodv_rqueue.cc. References head_, len_, Packet::next_, and tail_. Referenced by deque(), enque(), and purge(). 00160 { 00161 Packet *p = head_; 00162 00163 if(head_ == tail_) { 00164 head_ = tail_ = 0; 00165 } 00166 else { 00167 head_ = head_->next_; 00168 } 00169 00170 if(p) len_--; 00171 00172 return p; 00173 00174 }
|
|
|
Reimplemented in BayFullTcpAgent, HashClassifier, IvsSource, dsREDQueue, DiffusionRate, SinkAgent, DiffusionAgent, FloodingAgent, OmniMcastAgent, LinkDelay, CBQueue, DropTail, ErrorModel, PIQueue, Queue< T >, RedPDQueue, REDQueue, REMQueue, RIOQueue, Snoop, FackTcpAgent, FullTcpAgent, SackFullTcpAgent, RFC793eduTcpAgent, Sack1TcpAgent, TcpSink, DelAckSink, TcpAgent, VegasTcpAgent, toraAgent, Queue< T >, and XcpSink. Definition at line 70 of file object.cc. Referenced by NsObject::command().
|
|
||||||||||||
|
Reimplemented in Agent, and LinkDelay. Definition at line 56 of file connector.h. References NsObject::recv(), and Connector::target_. Referenced by SessionTTLChecker::recv(), TTLChecker::recv(), Trace::recv(), TraceIpMac::recv(), TraceIp::recv(), SnoopQueueEDrop::recv(), SnoopQueueTagger::recv(), SnoopQueueDrop::recv(), SnoopQueueOut::recv(), SnoopQueueIn::recv(), PktCounter::recv(), NetworkInterface::recv(), MeasureMod::recv(), Filter::recv(), Connector::recv(), CMUTrace::recv(), and AddSR::recv().
Here is the call graph for this function: ![]() |
|
|
Definition at line 51 of file connector.h. References Connector::drop_. Referenced by XCPWrapQ::command(). 00051 {drop_ = dt; }
|
|
|
Definition at line 49 of file connector.h. References Connector::target(), and Connector::target_.
Here is the call graph for this function: ![]() |
|
|
Definition at line 48 of file connector.h. References Connector::target_. Referenced by JoBS::assignRateDropsADC(), FQ::deque(), MIPMHAgent::reg(), MIPBSAgent::send_ads(), and Connector::target(). 00048 { return target_; }
|
|
|
Definition at line 191 of file aodv_rqueue.cc. References head_, and Packet::next_. Referenced by deque(), enque(), and purge(). 00191 { 00192 Packet *p, *prev = 0; 00193 int cnt = 0; 00194 00195 for(p = head_; p; p = p->next_) { 00196 cnt++; 00197 prev = p; 00198 } 00199 assert(cnt == len_); 00200 assert(prev == tail_); 00201 00202 }
|
|
|
Reimplemented in FECModel, FloodAgent, and LandmarkAgent. Definition at line 66 of file object.h. Referenced by REDQueue::command(), RedPDQueue::command(), PushbackQueue::command(), NsObject::debug(), NsObject::delay_bind_dispatch(), PushbackQueue::enque(), NsObject::isdebug(), NsObject::NsObject(), TfrcAgent::recv(), PushbackQueue::reportDrop(), SctpAgent::Reset(), REDQueue::reset(), DropTail::shrink_queue(), and Delayer::try_send(). |
|
|
Definition at line 59 of file connector.h. Referenced by XCPWrapQ::command(), Connector::command(), Connector::drop(), ErrorModel::recv(), and Connector::setDropTarget(). |
|
|
Definition at line 82 of file aodv_rqueue.h. Referenced by aodv_rqueue(), deque(), enque(), findAgedPacket(), findPacketWithDst(), purge(), remove_head(), and verifyQueue(). |
|
|
Definition at line 85 of file aodv_rqueue.h. Referenced by aodv_rqueue(), deque(), enque(), purge(), and remove_head(). |
|
|
Definition at line 87 of file aodv_rqueue.h. Referenced by aodv_rqueue(), and enque(). |
|
|
Definition at line 83 of file aodv_rqueue.h. Referenced by aodv_rqueue(), deque(), enque(), purge(), and remove_head(). |
|
|
|
Definition at line 88 of file aodv_rqueue.h. Referenced by aodv_rqueue(), and enque(). |
1.4.6