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


Public Member Functions | |
| rtqueue () | |
| void | recv (Packet *, Handler *) |
| void | enque (Packet *p) |
| int | command (int argc, const char *const *argv) |
| Packet * | deque (void) |
| Packet * | deque (nsaddr_t dst) |
| char | find (nsaddr_t dst) |
| NsObject * | target () |
| virtual void | drop (Packet *p) |
| virtual void | recv (Packet *p, const char *s) |
| virtual void | recvOnly (Packet *) |
| virtual void | delay_bind_init_all () |
| virtual int | delay_bind_dispatch (const char *varName, const char *localName, TclObject *tracer) |
| int | isdebug () const |
| virtual void | debug (const char *fmt,...) |
Protected Member Functions | |
| virtual void | drop (Packet *p, const char *s) |
| void | send (Packet *p, Handler *h) |
| virtual void | reset () |
| void | handle (Event *) |
Protected Attributes | |
| NsObject * | target_ |
| NsObject * | drop_ |
| int | debug_ |
Private Member Functions | |
| Packet * | remove_head () |
| void | purge (void) |
| void | findPacketWithDst (nsaddr_t dst, Packet *&p, Packet *&prev) |
| void | verifyQueue (void) |
Private Attributes | |
| Packet * | head_ |
| Packet * | tail_ |
| int | len_ |
| int | limit_ |
| double | timeout_ |
|
|
Definition at line 12 of file rtqueue.cc. References head_, len_, limit_, RTQ_MAX_LEN, RTQ_TIMEOUT, tail_, and timeout_.
00013 {
00014 head_ = tail_ = 0;
00015 len_ = 0;
00016
00017 limit_ = RTQ_MAX_LEN;
00018 timeout_ = RTQ_TIMEOUT;
00019 }
|
|
||||||||||||
|
Reimplemented from Connector. Definition at line 30 of file rtqueue.h. References Connector::command(). Referenced by toraAgent::command().
00031 { 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, FullTcpAgent, SackFullTcpAgent, RFC793eduTcpAgent, TcpSink, TcpAgent, and VegasTcpAgent. 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, FullTcpAgent, SackFullTcpAgent, RFC793eduTcpAgent, TcpSink, TcpAgent, and VegasTcpAgent. Definition at line 57 of file object.cc. Referenced by MPLSAddressClassifier::delay_bind_init_all(), and Agent::delay_bind_init_all().
00058 {
00059 delay_bind_init_one("debug_");
00060 }
|
|
|
Definition at line 74 of file rtqueue.cc. References findPacketWithDst(), head_, len_, Packet::next_, purge(), remove_head(), tail_, and verifyQueue().
00075 {
00076 Packet *p, *prev;
00077
00078 /*
00079 * Purge any packets that have timed out.
00080 */
00081 purge();
00082
00083 findPacketWithDst(dst, p, prev);
00084 assert(p == 0 || (p == head_ && prev == 0) || (prev->next_ == p));
00085
00086 if(p == 0) return 0;
00087
00088 if (p == head_) {
00089 p = remove_head();
00090 }
00091 else if (p == tail_) {
00092 prev->next_ = 0;
00093 tail_ = prev;
00094 len_--;
00095 }
00096 else {
00097 prev->next_ = p->next_;
00098 len_--;
00099 }
00100
00101 #ifdef DEBUG
00102 verifyQueue();
00103 #endif
00104 return p;
00105 }
|
Here is the call graph for this function:

|
|
Definition at line 56 of file rtqueue.cc. References purge(), remove_head(), and verifyQueue(). Referenced by toraAgent::recvTORA(), and toraAgent::reset().
00057 {
00058 Packet *p;
00059
00060 /*
00061 * Purge any packets that have timed out.
00062 */
00063 purge();
00064
00065 p = remove_head();
00066 #ifdef DEBUG
00067 verifyQueue();
00068 #endif
00069 return p;
00070 }
|
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:

|
Here is the call graph for this function:

|
|
Definition at line 22 of file rtqueue.cc. References CURRENT_TIME, Connector::drop(), DROP_RTR_QFULL, DROP_RTR_QTIMEOUT, HDR_CMN, head_, len_, limit_, Packet::next_, remove_head(), tail_, timeout_, and verifyQueue(). Referenced by toraAgent::rt_resolve().
00023 {
00024 struct hdr_cmn *ch = HDR_CMN(p);
00025
00026 p->next_ = 0;
00027 ch->ts_ = CURRENT_TIME + timeout_;
00028
00029 if (len_ == limit_) {
00030 Packet *p0 = remove_head(); // decrements len_
00031
00032 assert(p0);
00033
00034 if(HDR_CMN(p0)->ts_ > CURRENT_TIME) {
00035 drop(p0, DROP_RTR_QFULL);
00036 }
00037 else {
00038 drop(p0, DROP_RTR_QTIMEOUT);
00039 }
00040 }
00041 if(head_ == 0) {
00042 head_ = tail_ = p;
00043 }
00044 else {
00045 tail_->next_ = p;
00046 tail_ = p;
00047 }
00048 len_++;
00049 #ifdef DEBUG
00050 verifyQueue();
00051 #endif
00052 }
|
Here is the call graph for this function:

|
|
Definition at line 108 of file rtqueue.cc. References findPacketWithDst().
00109 {
00110 Packet *p, *prev;
00111 findPacketWithDst(dst, p, prev);
00112 if (0 == p)
00113 return 0;
00114 else
00115 return 1;
00116 }
|
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 154 of file rtqueue.cc. References HDR_IP, head_, and Packet::next_. Referenced by deque(), and find().
|
|
|
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 142 of file rtqueue.cc. References CURRENT_TIME, Connector::drop(), DROP_RTR_QTIMEOUT, HDR_CMN, head_, and remove_head(). Referenced by deque().
00143 {
00144 Packet *p;
00145
00146 while((p = head_) && HDR_CMN(p)->ts_ < CURRENT_TIME) {
00147 Packet *temp = remove_head();
00148 assert(p == temp);
00149 drop(p, DROP_RTR_QTIMEOUT);
00150 }
00151 }
|
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 26 of file rtqueue.h. References abort().
00026 { 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().
00056 {};
|
|
|
Definition at line 125 of file rtqueue.cc. References head_, len_, Packet::next_, and tail_. Referenced by deque(), enque(), and purge().
|
|
|
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, and Queue< T >. Definition at line 70 of file object.cc. Referenced by NsObject::command().
00071 {
00072 }
|
|
||||||||||||
|
Reimplemented in Agent, and LinkDelay. Definition at line 54 of file connector.h. References NsObject::recv(), and Connector::target_. Referenced by SessionTTLChecker::recv(), TTLChecker::recv(), DequeTrace::recv(), Trace::recv(), TraceIpMac::recv(), TraceIp::recv(), SatDequeTrace::recv(), SALink::recv(), SnoopQueueEDrop::recv(), SnoopQueueTagger::recv(), SnoopQueueDrop::recv(), SnoopQueueOut::recv(), SnoopQueueIn::recv(), PktCounter::recv(), NetworkInterface::recv(), MeasureMod::recv(), Filter::recv(), Connector::recv(), CMUTrace::recv(), CBQClass::recv(), and AddSR::recv().
|
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(), QSAgent::recv(), and MIPMHAgent::reg().
00048 { return target_; }
|
|
|
Definition at line 171 of file rtqueue.cc. References head_, len_, Packet::next_, and tail_. Referenced by deque(), and enque().
|
|
|
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(), RedPDQueue::enque(), PushbackQueue::enque(), NsObject::isdebug(), NsObject::NsObject(), TfrcAgent::recv(), PushbackQueue::reportDrop(), and REDQueue::reset(). |
|
|
Definition at line 57 of file connector.h. Referenced by Connector::command(), Connector::drop(), and ErrorModel::recv(). |
|
|
Definition at line 53 of file rtqueue.h. Referenced by deque(), enque(), findPacketWithDst(), purge(), remove_head(), rtqueue(), and verifyQueue(). |
|
|
Definition at line 56 of file rtqueue.h. Referenced by deque(), enque(), remove_head(), rtqueue(), and verifyQueue(). |
|
|
|
|
|
Definition at line 54 of file rtqueue.h. Referenced by deque(), enque(), remove_head(), rtqueue(), and verifyQueue(). |
|
|
|
|
1.3.3