#include <mip.h>
Inheritance diagram for MIPEncapsulator:


Public Member Functions | |
| MIPEncapsulator () | |
| void | recv (Packet *p, Handler *h) |
| 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) |
| int | command (int argc, const char *const *argv) |
| void | send (Packet *p, Handler *h) |
| virtual void | reset () |
| void | handle (Event *) |
Protected Attributes | |
| ns_addr_t | here_ |
| int | mask_ |
| int | shift_ |
| int | defttl_ |
| NsObject * | target_ |
| NsObject * | drop_ |
| int | debug_ |
|
|
Definition at line 56 of file mip.cc. References ns_addr_t::addr_, defttl_, here_, mask_, ns_addr_t::port_, and shift_.
|
|
||||||||||||
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 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:

|
|
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_; }
|
|
||||||||||||
|
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 66 of file mip.cc. References hdr_cmn::access(), hdr_ipinip::access(), hdr_ip::access(), ns_addr_t::addr_, hdr_ip::daddr(), defttl_, hdr_ip::dport(), Packet::free(), Address::get_nodeaddr(), hdr_ipinip::hdr_, here_, Address::instance(), IP_HEADER_SIZE, hdr_ipinip::next_, ns_addr_t::port_, NsObject::recv(), hdr_ip::saddr(), hdr_cmn::size(), hdr_ip::sport(), Connector::target_, hdr_ip::ttl(), and hdr_ip::ttl_.
00067 {
00068 Tcl& tcl = Tcl::instance();
00069
00070 hdr_ip* hdr = hdr_ip::access(p);
00071 hdr_ipinip **ppinhdr = (hdr_ipinip**)hdr_ipinip::access(p);
00072 if (--hdr->ttl_ <= 0) {
00073 /*
00074 * XXX this should be "dropped" somehow. Right now,
00075 * these events aren't traced.
00076 */
00077 hdr_ipinip *ptr = *ppinhdr, *temp;
00078 while (ptr != NULL) {
00079 temp = ptr;
00080 ptr = ptr->next_;
00081 delete temp;
00082 }
00083 *ppinhdr = NULL;
00084 Packet::free(p);
00085 return;
00086 }
00087 hdr_ipinip *inhdr = new hdr_ipinip;
00088 //int dst = ((hdr->dst() >> shift_) & mask_);
00089 int dst = Address::instance().get_nodeaddr(hdr->daddr());
00090 tcl.evalf("%s tunnel-exit %d", name_, dst);
00091 int te = atoi(tcl.result());
00092
00093 inhdr->next_ = *ppinhdr;
00094 *ppinhdr = inhdr;
00095 inhdr->hdr_ = *hdr;
00096
00097 hdr->saddr() = here_.addr_;
00098 hdr->sport() = here_.port_;
00099 //hdr->dst() = addr_ & ~(~(nsaddr_t)0 << shift_) | (te & mask_) << shift_;;
00100 hdr->daddr() = te;
00101 hdr->dport() = 1;
00102 hdr->ttl() = defttl_;
00103 hdr_cmn::access(p)->size() += IP_HEADER_SIZE;
00104
00105 target_->recv(p,h);
00106 }
|
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 {};
|
|
|
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_; }
|
|
|
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 109 of file mip.h. Referenced by MIPEncapsulator(), and recv(). |
|
|
Definition at line 57 of file connector.h. Referenced by Connector::command(), Connector::drop(), and ErrorModel::recv(). |
|
|
Definition at line 106 of file mip.h. Referenced by MIPEncapsulator(), and recv(). |
|
|
Definition at line 107 of file mip.h. Referenced by MIPEncapsulator(). |
|
|
Definition at line 108 of file mip.h. Referenced by MIPEncapsulator(). |
|
1.3.3