Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

LmsReceiver Class Reference

Inheritance diagram for LmsReceiver:

Inheritance graph
[legend]
Collaboration diagram for LmsReceiver:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LmsReceiver ()
int command (int argc, const char *const *argv)
void recv (Packet *pkt, Handler *)
virtual void timeout (int type, int lo, int hi)
virtual void recv (Packet *p, const char *s)
void recvOnly (Packet *)
void send (Packet *p, Handler *h)
virtual void send (int sz, AppData *data)
virtual void send (int nbytes)
virtual void timeout (int tno)
virtual void sendmsg (int sz, AppData *, const char *flags=0)
virtual void sendmsg (int nbytes, const char *flags=0)
virtual void sendto (int sz, AppData *, const char *flags, nsaddr_t dst)
virtual void sendto (int nbytes, const char *flags, nsaddr_t dst)
virtual void connect (nsaddr_t dst)
virtual void close ()
virtual void listen ()
virtual void attachApp (Application *app)
virtual int & size ()
nsaddr_taddr ()
nsaddr_tport ()
nsaddr_tdaddr ()
nsaddr_tdport ()
void set_pkttype (packet_t pkttype)
packet_t get_pkttype ()
NsObjecttarget ()
virtual void drop (Packet *p)
int isdebug () const
virtual void debug (const char *fmt,...)

Public Attributes

LmsReceivernext_

Protected Member Functions

void handle_lms_pkt (Packet *pkt)
void send_refresh ()
void send_dmcast (hdr_lms *lh, int seqno, int fid)
int add_req (Packet *rq)
void send_nak (int sqn, int lo, int hi)
void create_nak (int lo, int hi)
void delete_nak (LmsNak *n)
LmsNakfind_nak (int i)
void add_rdl (int rseq, double clock)
int exists_rdl (int rseq)
void print_stats ()
void print_all_stats (int drops)
virtual void delay_bind_init_all ()
virtual int delay_bind_dispatch (const char *varName, const char *localName, TclObject *tracer)
virtual void recvBytes (int bytes)
virtual void idle ()
Packetallocpkt () const
Packetallocpkt (int) const
void initpkt (Packet *) const
virtual void trace (TracedVar *v)
void deleteAgentTrace ()
void addAgentTrace (const char *name)
void monitorAgentTrace ()
OldValuelookupOldValue (TracedVar *v)
void insertOldValue (TracedVar *v, const char *value)
void dumpTracedVars ()
virtual void trace_event (char *eventtype)
virtual void drop (Packet *p, const char *s)
virtual void reset ()
void handle (Event *)

Protected Attributes

char uname_ [8]
RcvBufferrcvbuf_
int dataSize_
double rtt_
nsaddr_t lms_src_
nsaddr_t lms_group_
nsaddr_t upstream_lms_
int lms_cost_
Packetrql_
int rql_sz_
lms_rdlrdl_
int rdl_sz_
LmsNaknak_
int ls_last_rq_
int ls_last_seq_
int ls_smpl_ivl_
int ls_cntdown_
int req_sent_
int req_rcvd_
int dup_reqs_
ns_addr_t here_
ns_addr_t dst_
int size_
packet_t type_
int fid_
int prio_
int flags_
int defttl_
Tcl_Channel channel_
char * traceName_
OldValueoldValueList_
Applicationapp_
EventTraceet_
NsObjecttarget_
NsObjectdrop_
int debug_

Static Protected Attributes

int max_dup_naks_ = 0
int uidcnt_

Constructor & Destructor Documentation

LmsReceiver::LmsReceiver  ) 
 

Definition at line 169 of file lms-receiver.cc.

References all_lms_receivers, dataSize_, dup_reqs_, lms_cost_, lms_group_, LMS_LOSS_SMPL_IVL, LMS_NOADDR, lms_src_, ls_cntdown_, ls_last_rq_, ls_last_seq_, ls_smpl_ivl_, max_dup_naks_, nak_, next_, PT_LMS, rcv_uid_, rcvbuf_, rdl_, rdl_sz_, req_rcvd_, req_sent_, rql_, rtt_, Agent::size_, uname_, and upstream_lms_.

00169                         : Agent(PT_LMS)
00170 {
00171         sprintf (uname_, "rcv%d", rcv_uid_++);
00172         lms_cost_ = 0;
00173         lms_src_ = lms_group_ = LMS_NOADDR;
00174         rtt_ = 0.0;
00175         rcvbuf_ = new RcvBuffer;
00176         req_sent_ = req_rcvd_ = dup_reqs_ = max_dup_naks_ = 0;
00177         upstream_lms_ =  LMS_NOADDR;
00178         dataSize_ = 0;
00179         ls_smpl_ivl_ = LMS_LOSS_SMPL_IVL;
00180         ls_cntdown_ = ls_smpl_ivl_;
00181         ls_last_rq_ = ls_last_seq_ = 0;
00182         nak_ = NULL;
00183         rql_ = NULL;
00184         rdl_ = NULL;
00185         rdl_sz_ = 0;
00186 
00187         this->next_ = all_lms_receivers;
00188         all_lms_receivers = this;
00189 
00190         bind("lmsPacketSize_", &size_);
00191 
00192         // bind("off_rtp_", &off_rtp_);
00193         // bind("off_ip_", &off_ip_);
00194         // bind("off_lms_", &off_lms_);
00195 }


Member Function Documentation

void LmsReceiver::add_rdl int  rseq,
double  clock
[protected]
 

Definition at line 731 of file lms-receiver.cc.

References LMS_RDL_MAX, lms_rdl::next_, rdl_, and rdl_sz_.

Referenced by recv().

00732 {
00733         struct lms_rdl *r = new (struct lms_rdl);
00734         r->seqn_ = rseq;
00735         r->ts_ = clock;
00736         r->next_ = rdl_;
00737         rdl_ = r;
00738 
00739         if (++rdl_sz_ > LMS_RDL_MAX)
00740                 {
00741                 struct lms_rdl *r = rdl_;
00742                 for (int i = 0; i < LMS_RDL_MAX; i++)
00743                         r = r->next_;
00744                 delete r->next_;
00745                 r->next_ = NULL;
00746                 --rdl_sz_;
00747                 }
00748 }

int LmsReceiver::add_req Packet rq  )  [protected]
 

Definition at line 505 of file lms-receiver.cc.

References Packet::accessdata(), Packet::free(), HDR_LMS, hdr_lms::hi_, LMS_RQL_MAX, hdr_lms::lo_, max_dup_naks_, Packet::next_, rql_, rql_sz_, hdr_lms::tp_addr_, hdr_lms::tp_iface_, and uname_.

Referenced by handle_lms_pkt().

00506 {
00507         hdr_lms *lh = HDR_LMS(rq);
00508         Packet  *p = rql_;
00509         int     i = 0;
00510 
00511         if (!p)
00512         {
00513             rql_ = rq;
00514             rq->next_ = 0;
00515             rql_sz_ = 1;
00516             return 1;
00517         }
00518 
00519 #ifdef LMS_DEBUG
00520 printf("%s REQ: \tlo=%d \thi=%d \ttp_addr=%d \ttp_if=%d\n",
00521   uname_, lh->lo_, lh->hi_, lh->tp_addr_, lh->tp_iface_);
00522 #endif
00523 
00524       while (p)
00525         {
00526             if (++i > LMS_RQL_MAX)
00527                 break;
00528             
00529             hdr_lms *plh = HDR_LMS(p);
00530 
00531 #ifdef LMS_DEBUG
00532 printf("%s DB: \tlo=%d \thi=%d \ttp_addr=%d \ttp_if=%d\n",
00533   uname_, plh->lo_, plh->hi_, plh->tp_addr_, plh->tp_iface_);
00534 #endif            
00535             
00536 
00537             if ((plh->lo_ == lh->lo_) &&
00538                 (plh->hi_ == lh->hi_) &&
00539                 (plh->tp_addr_ == lh->tp_addr_) &&
00540                 (plh->tp_iface_ == lh->tp_iface_)) 
00541             {
00542                 struct lms_nak *nh = (struct lms_nak *)p->accessdata();
00543                 // increments the dup_cnt_ for this NAK, and updates
00544                 // max_dup_naks_ if appropriate
00545                 ++nh->dup_cnt_;
00546 
00547 #ifdef LMS_DEBUG
00548    printf ("%s got %d dup reqs, max is %d\n", uname_, nh->dup_cnt_, max_dup_naks_);
00549 #endif                
00550                 
00551                 if( nh->dup_cnt_ > max_dup_naks_)
00552                     max_dup_naks_ = nh->dup_cnt_;
00553                                 
00554                 return 0;
00555             }
00556             
00557             p = p->next_;
00558         }
00559         
00560         if (i > LMS_RQL_MAX && p && p->next_)
00561         {
00562             Packet::free (p->next_);
00563             p->next_ = 0;
00564             rql_sz_--;
00565         }
00566 
00567         rq->next_ = rql_;
00568         rql_ = rq;
00569         rql_sz_++;
00570         return 1;
00571 }

Here is the call graph for this function:

void Agent::addAgentTrace const char *  name  )  [protected, inherited]
 

Definition at line 326 of file agent.cc.

References ns_addr_t::addr_, Agent::channel_, Scheduler::clock(), Agent::dst_, Agent::here_, Scheduler::instance(), TIME_FORMAT, and Agent::traceName_.

Referenced by Agent::command().

00327 {
00328         char wrk[256];
00329         int n;
00330         double curTime = (&Scheduler::instance() == NULL ? 0 : 
00331                           Scheduler::instance().clock());
00332         
00333         sprintf(wrk, "a -t "TIME_FORMAT" -s %d -d %d -n %s",
00334                 curTime, here_.addr_, dst_.addr_, name);
00335         n = strlen(wrk);
00336         wrk[n] = '\n';
00337         wrk[n+1] = 0;
00338         if (channel_)
00339                 (void)Tcl_Write(channel_, wrk, n+1);
00340         // keep agent trace name
00341         if (traceName_ != NULL)
00342                 delete[] traceName_;
00343         traceName_ = new char[strlen(name)+1];
00344         strcpy(traceName_, name);
00345 }

Here is the call graph for this function:

nsaddr_t& Agent::addr  )  [inline, inherited]
 

Definition at line 96 of file agent.h.

References ns_addr_t::addr_, Agent::here_, and nsaddr_t.

Referenced by LandmarkAgent::assign_lmaddress(), SSMSRMAgent::command(), IntTcpAgent::createTcpSession(), Agent::flushAVar(), LmsSender::handle_lms_pkt(), SSMSRMAgent::is_active(), QSNewRenoTcpAgent::recv(), TcpAsymSink::recv(), SRMAgent::recv(), SSMSRMAgent::recv(), QSAgent::recv(), MIPBSAgent::recv(), LmsAgent::recv(), HttpInvalAgent::recv(), CtrMcastEncap::recv(), SSMSRMAgent::recv_glb_sess(), SSMSRMAgent::recv_loc_sess(), SSMSRMAgent::recv_rep_sess(), SRMAgent::recv_sess(), TapAgent::recvpkt(), MIPMHAgent::reg(), MIPBSAgent::send_ads(), LmsSender::send_dmcast(), send_dmcast(), LmsAgent::send_downstream(), SSMSRMAgent::send_glb_sess(), LmsSender::send_lms_pkt(), SSMSRMAgent::send_loc_sess(), send_nak(), send_refresh(), SSMSRMAgent::send_rep_sess(), SRMAgent::send_sess(), MIPMHAgent::send_sols(), LmsSender::send_spm(), LmsAgent::send_upstream(), SRMAgent::sendmsg(), LmsSender::solicit_naks(), SRMAgent::start(), TcpAgent::trace_event(), TcpAgent::traceAll(), TcpAsymAgent::traceAll(), TcpAgent::traceVar(), TcpSessionAgent::traceVar(), and TcpAsymAgent::traceVar().

00096 { return here_.addr_; }

Packet * Agent::allocpkt int   )  const [protected, inherited]
 

Definition at line 517 of file agent.cc.

References Packet::allocdata(), and Agent::allocpkt().

00518 {
00519         Packet* p = allocpkt();
00520 
00521         if (n > 0)
00522                 p->allocdata(n);
00523 
00524         return(p);
00525 }

Here is the call graph for this function:

Packet * Agent::allocpkt  )  const [protected, inherited]
 

Definition at line 506 of file agent.cc.

References Packet::alloc(), and Agent::initpkt().

Referenced by TcpSink::ack(), QSTcpSink::ack(), Agent::allocpkt(), PingAgent::command(), MessageAgent::command(), mcastControlAgent::command(), LmsAgent::command(), LDPAgent::command(), LandmarkAgent::command(), IvsReceiver::command(), DSDV_Agent::command(), OmniMcastAgent::create_packet(), FloodingAgent::create_packet(), DiffusionAgent::create_packet(), SinkAgent::create_packet(), SensorQueryAgent::generate_query(), DSRAgent::getRouteForPacket(), LandmarkAgent::makeUpdate(), DSDV_Agent::makeUpdate(), TcpAgent::output(), VegasTcpAgent::output(), RFC793eduTcpAgent::output(), QSNewRenoTcpAgent::output(), IntTcpAgent::output(), AbsTcpAgent::output(), TCPTapAgent::processpkt(), AbsDelAckSink::recv(), AbsTcpSink::recv(), SAack_Agent::recv(), PingAgent::recv(), Encapsulator::recv(), TapAgent::recvpkt(), MIPMHAgent::reg(), DSRAgent::replyFromRouteCache(), DSRAgent::returnSrcRouteToRequestor(), HttpInvalAgent::send(), MIPBSAgent::send_ads(), SRMAgent::send_ctrl(), SSMSRMAgent::send_ctrl(), MFTPSndAgent::send_data(), GAFAgent::send_discovery(), LmsSender::send_dmcast(), send_dmcast(), SSMSRMAgent::send_glb_sess(), LmsSender::send_lms_pkt(), SSMSRMAgent::send_loc_sess(), MFTPRcvAgent::send_nak(), send_nak(), send_refresh(), SSMSRMAgent::send_rep_sess(), SRMAgent::send_sess(), MIPMHAgent::send_sols(), LmsSender::send_spm(), MFTPSndAgent::send_status_request(), RapAgent::SendAck(), UdpAgent::sendmsg(), SimpleTcpAgent::sendmsg(), SRMAgent::sendmsg(), SA_Agent::sendmsg(), RTPAgent::sendmsg(), PushbackAgent::sendMsg(), LmsSender::sendmsg(), FullTcpAgent::sendpacket(), BayFullTcpAgent::sendpacket(), RapAgent::SendPacket(), TfrcAgent::sendpkt(), TfrcSinkAgent::sendpkt(), SA_Agent::sendpkt(), rtProtoDV::sendpkt(), RTPAgent::sendpkt(), RTCPAgent::sendpkt(), RLM_Sender::sendpkt(), IvsSource::sendpkt(), IcmpAgent::sendredirect(), SA_Agent::sendreq(), DSRAgent::sendRouteShortening(), SA_Agent::sendteardown(), LmsSender::solicit_naks(), and AbsDelAckSink::timeout().

00507 {
00508         Packet* p = Packet::alloc();
00509         initpkt(p);
00510         return (p);
00511 }

Here is the call graph for this function:

void Agent::attachApp Application app  )  [virtual, inherited]
 

Definition at line 372 of file agent.cc.

References Agent::app_.

Referenced by HttpMInvalCache::command(), Application::command(), TcpApp::TcpApp(), and TcpApp::~TcpApp().

00373 {
00374         app_ = app;
00375 }

void Agent::close  )  [virtual, inherited]
 

Reimplemented in FullTcpAgent.

Definition at line 377 of file agent.cc.

Referenced by Agent::command().

00378 {
00379 }

int LmsReceiver::command int  argc,
const char *const *  argv
[virtual]
 

Reimplemented from Agent.

Definition at line 431 of file lms-receiver.cc.

References Agent::command(), lms_cost_, ls_cntdown_, ls_smpl_ivl_, print_all_stats(), print_stats(), and send_refresh().

00432 {
00433         if (argc == 2) {
00434                 if (strcmp(argv[1], "clear") == 0) {
00435                         return (TCL_OK);
00436                 }
00437                 if (strcmp(argv[1], "print-stats") == 0) {
00438                         print_stats ();
00439                         return (TCL_OK);
00440                 }
00441         }
00442         if (argc == 3)
00443                 {
00444                 if (strcmp(argv[1], "print-all-stats") == 0) {
00445                         print_all_stats (atoi (argv[2]));
00446                         return (TCL_OK);
00447                 }
00448                 if (strcmp(argv[1], "set-replier-cost") == 0)
00449                         {
00450                         lms_cost_  = atoi (argv[2]);
00451                         send_refresh ();
00452                         return (TCL_OK);
00453                         }
00454                 if (strcmp(argv[1], "loss-smpl-ivl") == 0)
00455                         {
00456                         ls_cntdown_ = ls_smpl_ivl_ = atoi (argv[2]);
00457                         return (TCL_OK);
00458                         }
00459                 }
00460         return (Agent::command(argc, argv));
00461 }

Here is the call graph for this function:

void Agent::connect nsaddr_t  dst  )  [virtual, inherited]
 

Definition at line 389 of file agent.cc.

Referenced by Agent::command().

00390 {
00391 /*
00392         dst_ = dst;
00393 */
00394 }

void LmsReceiver::create_nak int  lo,
int  hi
[protected]
 

Definition at line 679 of file lms-receiver.cc.

References nak_, LmsNak::nak_timeout_, LmsNak::nak_timer_, LmsNak::next_, TimerHandler::resched(), rtt_, and uname_.

Referenced by recv().

00680 {
00681 #ifdef LMS_DEBUG
00682 printf ("%s Creating NAK %d, %d\n", uname_, lo, hi);
00683 #endif
00684         LmsNak *nak = new LmsNak (this, lo, hi);
00685         nak->nak_timeout_ = rtt_ * 2.0;         // set initial timeout to twice rtt
00686         nak->nak_timer_.resched (nak->nak_timeout_);
00687         nak->next_ = nak_;
00688         nak_ = nak;
00689 }

Here is the call graph for this function:

nsaddr_t& Agent::daddr  )  [inline, inherited]
 

Definition at line 98 of file agent.h.

References ns_addr_t::addr_, Agent::dst_, and nsaddr_t.

Referenced by IntTcpAgent::createTcpSession(), DSDV_Agent::lost_link(), TcpAsymSink::recv(), CtrMcastEncap::recv(), PingResponder::reflect(), IntTcpAgent::rxmit_last(), LmsSender::send_dmcast(), LmsSender::send_lms_pkt(), IntTcpAgent::send_one(), rtProtoDV::sendpkt(), LmsSender::solicit_naks(), TcpAgent::trace_event(), TcpAgent::traceAll(), TcpAsymAgent::traceAll(), TcpAgent::traceVar(), TcpSessionAgent::traceVar(), and TcpAsymAgent::traceVar().

00098 { return dst_.addr_; }

void NsObject::debug const char *  fmt,
... 
[virtual, inherited]
 

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 }

int Agent::delay_bind_dispatch const char *  varName,
const char *  localName,
TclObject tracer
[protected, virtual, inherited]
 

Reimplemented from NsObject.

Reimplemented in BayFullTcpAgent, LDPAgent, FullTcpAgent, SackFullTcpAgent, RFC793eduTcpAgent, TcpSink, TcpAgent, and VegasTcpAgent.

Definition at line 93 of file agent.cc.

References ns_addr_t::addr_, Agent::defttl_, NsObject::delay_bind_dispatch(), Agent::dst_, Agent::fid_, Agent::flags_, Agent::here_, ns_addr_t::port_, and Agent::prio_.

Referenced by TcpAgent::delay_bind_dispatch(), TcpSink::delay_bind_dispatch(), and LDPAgent::delay_bind_dispatch().

00094 {
00095         if (delay_bind(varName, localName, "agent_addr_", (int*)&(here_.addr_), tracer)) return TCL_OK;
00096         if (delay_bind(varName, localName, "agent_port_", (int*)&(here_.port_), tracer)) return TCL_OK;
00097         if (delay_bind(varName, localName, "dst_addr_", (int*)&(dst_.addr_), tracer)) return TCL_OK;
00098         if (delay_bind(varName, localName, "dst_port_", (int*)&(dst_.port_), tracer)) return TCL_OK;
00099         if (delay_bind(varName, localName, "fid_", (int*)&fid_, tracer)) return TCL_OK;
00100         if (delay_bind(varName, localName, "prio_", (int*)&prio_, tracer)) return TCL_OK;
00101         if (delay_bind(varName, localName, "flags_", (int*)&flags_, tracer)) return TCL_OK;
00102         if (delay_bind(varName, localName, "ttl_", &defttl_, tracer)) return TCL_OK;
00103         if (delay_bind(varName, localName, "class_", (int*)&fid_, tracer)) return TCL_OK;
00104         return Connector::delay_bind_dispatch(varName, localName, tracer);
00105 }

Here is the call graph for this function:

void Agent::delay_bind_init_all  )  [protected, virtual, inherited]
 

Reimplemented from NsObject.

Reimplemented in BayFullTcpAgent, LDPAgent, FullTcpAgent, SackFullTcpAgent, RFC793eduTcpAgent, TcpSink, TcpAgent, and VegasTcpAgent.

Definition at line 78 of file agent.cc.

References NsObject::delay_bind_init_all().

Referenced by TcpAgent::delay_bind_init_all(), TcpSink::delay_bind_init_all(), and LDPAgent::delay_bind_init_all().

00079 {
00080         delay_bind_init_one("agent_addr_");
00081         delay_bind_init_one("agent_port_");
00082         delay_bind_init_one("dst_addr_");
00083         delay_bind_init_one("dst_port_");
00084         delay_bind_init_one("fid_");
00085         delay_bind_init_one("prio_");
00086         delay_bind_init_one("flags_");
00087         delay_bind_init_one("ttl_");
00088         delay_bind_init_one("class_");
00089         Connector::delay_bind_init_all();
00090 }

Here is the call graph for this function:

void LmsReceiver::delete_nak LmsNak n  )  [protected]
 

Definition at line 701 of file lms-receiver.cc.

References TimerHandler::cancel(), LmsNak::hi_, LmsNak::lo_, nak_, LmsNak::nak_timer_, LmsNak::next_, and uname_.

Referenced by recv().

00702 {
00703         if (n == nak_)
00704                 nak_ = nak_->next_;
00705         else    {
00706                 LmsNak *cur, *prev = nak_;
00707                 cur = nak_->next_;
00708                 while (cur)
00709                         {
00710                         if (cur == n)
00711                                 {
00712                                 prev->next_ = cur->next_;
00713                                 break;
00714                                 }
00715                         prev = cur;
00716                         cur = cur->next_;
00717                         }
00718                 }
00719         n->nak_timer_.cancel();
00720 #ifdef LMS_DEBUG
00721 printf ("%s Deleting NAK %d, %d\n", uname_, n->lo_, n->hi_);
00722 #endif
00723         delete n;
00724 }

Here is the call graph for this function:

void Agent::deleteAgentTrace  )  [protected, inherited]
 

Definition at line 222 of file agent.cc.

References ns_addr_t::addr_, Agent::dst_, Agent::flushAVar(), Agent::here_, Scheduler::instance(), TIME_FORMAT, and Agent::traceName_.

Referenced by Agent::command().

00223 {
00224         char wrk[256];
00225 
00226         // XXX we don't know InstVar outside of Tcl! Is there any
00227         // tracedvars hidden in InstVar? If so, shall we have a tclclInt.h?
00228         TracedVar* var = tracedvar_;
00229         for ( ;  var != 0;  var = var->next_) 
00230                 flushAVar(var);
00231 
00232         // we need to flush all var values to trace file, 
00233         // so nam can do backtracing
00234         sprintf(wrk, "a -t "TIME_FORMAT" -s %d -d %d -n %s -x",
00235                 Scheduler::instance().clock(), here_.addr_,
00236                 dst_.addr_, traceName_); 
00237         if (traceName_ != NULL)
00238                 delete[] traceName_;
00239         traceName_ = NULL;
00240 }

Here is the call graph for this function:

nsaddr_t& Agent::dport  )  [inline, inherited]
 

Definition at line 99 of file agent.h.

References Agent::dst_, nsaddr_t, and ns_addr_t::port_.

Referenced by DSDV_Agent::lost_link(), TcpAsymSink::recv(), CtrMcastEncap::recv(), IntTcpAgent::rxmit_last(), IntTcpAgent::send_one(), rtProtoDV::sendpkt(), TcpAgent::trace_event(), TcpAgent::traceAll(), TcpAsymAgent::traceAll(), TcpAgent::traceVar(), TcpSessionAgent::traceVar(), and TcpAsymAgent::traceVar().

00099 { return dst_.port_; }

void Connector::drop Packet p,
const char *  s
[protected, virtual, inherited]
 

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:

void Connector::drop Packet p  )  [virtual, inherited]
 

Definition at line 106 of file connector.cc.

References Connector::drop_, Packet::free(), and NsObject::recv().

Referenced by DSRAgent::acceptRouteReply(), ARPTable::arpresolve(), JoBS::dropFront(), Vq::dropPacketForECN(), DSRAgent::dropSendBuff(), JoBS::dropTail(), dsREDQueue::edrop(), Vq::enque(), SRR::enque(), SimpleIntServ::enque(), SFQ::enque(), rtqueue::enque(), RIOQueue::enque(), REMQueue::enque(), REDQueue::enque(), RedPDQueue::enque(), PIQueue::enque(), Marker::enque(), GK::enque(), dsREDQueue::enque(), DRR::enque(), DropTail::enque(), Demarker::enque(), aodv_rqueue::enque(), toraAgent::forward(), AODV::forward(), LandmarkAgent::ForwardPacket(), DSDV_Agent::forwardPacket(), DSRAgent::getRouteForPacket(), Snoop::handle(), DSRAgent::handleFlowForwarding(), DSRAgent::handleForwarding(), DSDV_Agent::lost_link(), TCPTapAgent::processpkt(), CMUPriQueue::prq_enqueue(), rtqueue::purge(), imepAgent::purgeReXmitQ(), SessionTTLChecker::recv(), TTLChecker::recv(), toraAgent::recv(), FullTcpAgent::recv(), BayFullTcpAgent::recv(), TBF::recv(), SatLL::recv(), LL::recv(), GAFPartner::recv(), FloodAgent::recv(), Filter::recv(), DynamicLink::recv(), DSDV_Agent::recv(), AODV::recv(), AODV::recvError(), PriQueue::recvHighPriority(), AODV::recvReply(), toraAgent::reset(), Queue< T >::reset(), LinkDelay::reset(), AODV::rt_ll_failed(), AODV::rt_purge(), AODV::rt_resolve(), toraAgent::rtRoutePacket(), TCPTapAgent::sendpkt(), TapAgent::sendpkt(), IPTapAgent::sendpkt(), AODV::sendRequest(), SatLL::sendUp(), LL::sendUp(), PriQueue::Terminate(), DSRAgent::Terminate(), CMUPriQueue::Terminate(), ARPTable::Terminate(), and DSRAgent::undeliverablePkt().

00107 {
00108         if (drop_ != 0)
00109                 drop_->recv(p);
00110         else
00111                 Packet::free(p);
00112 }

Here is the call graph for this function:

void Agent::dumpTracedVars  )  [protected, inherited]
 

int LmsReceiver::exists_rdl int  rseq  )  [protected]
 

Definition at line 750 of file lms-receiver.cc.

References rdl_.

Referenced by handle_lms_pkt().

00751 {
00752         struct lms_rdl *r = rdl_;
00753         for (; r; r = r->next_)
00754                 if (r->seqn_ == rseq)
00755                         return 1;
00756         return 0;
00757 }

LmsNak * LmsReceiver::find_nak int  i  )  [protected]
 

Definition at line 691 of file lms-receiver.cc.

References abort(), LmsNak::hi_, LmsNak::lo_, nak_, LmsNak::next_, and uname_.

Referenced by recv(), and timeout().

00692 {
00693         for (LmsNak *n = nak_; n; n = n->next_)
00694                 if (n->lo_ <= i && i <= n->hi_)
00695                         return n;
00696         // NOT REACHED
00697         printf("ERROR: %s nak %d not found\n", uname_, i);
00698         abort ();
00699 }

Here is the call graph for this function:

packet_t Agent::get_pkttype  )  [inline, inherited]
 

Definition at line 101 of file agent.h.

References packet_t, and Agent::type_.

Referenced by CBR_Traffic::init().

00101 { return type_; }

void NsObject::handle Event  )  [protected, virtual, inherited]
 

Implements Handler.

Reimplemented in LinkDelay, LL, AckRecons, and Snoop.

Definition at line 91 of file object.cc.

References NsObject::recv().

00092 {
00093         recv((Packet*)e);
00094 }

Here is the call graph for this function:

void LmsReceiver::handle_lms_pkt Packet pkt  )  [protected]
 

Definition at line 354 of file lms-receiver.cc.

References abort(), Packet::accessdata(), add_req(), Scheduler::clock(), hdr_lms::cost_, hdr_ip::daddr(), dataSize_, dup_reqs_, RcvBuffer::exists_pkt(), exists_rdl(), Packet::free(), hdr_lms::from(), hdr_lms::from_, hdr_lms::group(), HDR_IP, HDR_LMS, hdr_lms::hi_, Scheduler::instance(), lms_group_, LMS_LINKS, LMS_REQ, LMS_SETUP, LMS_SPM, lms_src_, LMS_SRC_REFRESH, hdr_lms::lo_, nsaddr_t, rcvbuf_, req_rcvd_, rtt_, hdr_ip::saddr(), send_dmcast(), send_refresh(), hdr_lms::src(), hdr_lms::tp_addr_, hdr_lms::tp_iface_, hdr_lms::ts_, hdr_lms::type(), uname_, and upstream_lms_.

Referenced by recv().

00355 {
00356         hdr_lms* lh = HDR_LMS(pkt);
00357         hdr_ip* iph = HDR_IP(pkt);
00358         int     st = 0;
00359 #ifdef LMS_DEBUG
00360 int a1, a2;
00361 #endif
00362         switch (lh->type())
00363         {
00364                 case LMS_REQ:
00365                 {
00366                         struct lms_nak *n = (struct lms_nak *)pkt->accessdata ();
00367                         req_rcvd_++;
00368 #ifdef LMS_DEBUG
00369 a1 = lh->from(); a2 = lh->src();
00370 printf ("%s got LMS_REQ from %d:%d src %d:%d group 0x%x ",
00371   uname_, a1>>8, a1&0xff, a2>>8, a2&0xff, lh->group());
00372 printf ("TP: (%d:%d, %d)\n\n", lh->tp_addr_>>8, lh->tp_addr_&0xff, lh->tp_iface_);
00373 #endif
00374                         if ((st = add_req (pkt)) != 0)
00375                                 {
00376                                         for (int i = lh->lo_; i <= lh->hi_; i++)
00377                                                 if (!(n->nak_seqn_ == 0 && exists_rdl (i)) &&
00378                                                         (rcvbuf_->exists_pkt (i)))
00379                                                         send_dmcast (lh, i, 3);
00380                                 }
00381                         else    dup_reqs_++;
00382 
00383                         break;
00384                 }
00385                 case LMS_SETUP:
00386                         {
00387                         lms_src_ = iph->saddr();
00388                         lms_group_ = iph->daddr();
00389                         rtt_ = 2.0*(Scheduler::instance().clock() - lh->ts_);
00390                         upstream_lms_ = lh->from_;
00391                         dataSize_ = lh->cost_;          // XXX
00392 
00393                         Tcl& tcl = Tcl::instance();
00394                         char wrk[64];
00395                         sprintf (wrk, "set_max_rtt %f", rtt_);
00396                         tcl.eval (wrk); 
00397 
00398 #ifdef LMS_DEBUG
00399 a1 = lh->from(); a2 = lh->src();
00400 //printf("%d %d, %ld %ld\n\n ", a1, a2, iph->saddr(), iph->daddr());
00401 printf("%s the upstream_lms is %d\n\n", uname_, upstream_lms_);
00402 printf ("%s LMS_SETUP from %d:%d src %d:%d group 0x%x RTT %f dataSize %d\n\n",
00403   uname_, a1>>8, a1&0xff, a2>>8, a2&0xff, lh->group(), rtt_, dataSize_);
00404 #endif
00405                         send_refresh ();
00406                         break;
00407                         }
00408                 case LMS_SPM:
00409                         {
00410                         struct lms_spm *spm = (struct lms_spm *)pkt->accessdata ();
00411                         nsaddr_t adr = spm->spm_path_;
00412 #ifdef LMS_DEBUG    
00413 printf ("%s LMS_SPM seqno %d, upstream %d:%d\n\n",
00414   uname_, spm->spm_seqno_, adr>>8, adr&0xff);
00415 #endif
00416                         if (upstream_lms_ != spm->spm_path_)
00417                                 upstream_lms_ = spm->spm_path_;
00418                         }
00419                         break;
00420                 case LMS_LINKS:
00421                 case LMS_SRC_REFRESH:
00422                         break;
00423                 default:
00424                         printf ("ERROR: %s Unexpected LMS packet type: %d\n\n", uname_, lh->type());
00425                         abort ();
00426         }
00427         if (!st)
00428                 Packet::free(pkt);
00429 }

Here is the call graph for this function:

void Agent::idle  )  [protected, virtual, inherited]
 

Definition at line 363 of file agent.cc.

References Agent::app_, and Application::resume().

Referenced by FullTcpAgent::foutput(), TcpAgent::output(), VegasTcpAgent::output(), RFC793eduTcpAgent::output(), QSNewRenoTcpAgent::output(), IntTcpAgent::output(), BayFullTcpAgent::output(), UdpAgent::sendmsg(), SA_Agent::sendmsg(), and RTPAgent::sendmsg().

00364 {
00365         if (app_)
00366                 app_->resume();
00367 }

Here is the call graph for this function:

void Agent::initpkt Packet  )  const [protected, inherited]
 

Definition at line 446 of file agent.cc.

References hdr_nv::access(), hdr_flags::access(), hdr_ip::access(), hdr_cmn::access(), ns_addr_t::addr_, Scheduler::clock(), hdr_flags::cong_action_, hdr_ip::daddr(), Agent::defttl_, hdr_cmn::direction(), hdr_ip::dport(), Agent::dst_, hdr_flags::ecn_, hdr_flags::ecn_capable_, hdr_flags::ecn_to_echo_, hdr_flags::eln_, hdr_cmn::error(), Agent::fid_, hdr_ip::flowid(), hdr_flags::fs_, NixNode::GetNixVector(), NixNode::GetNodeObject(), hdr_nv::h_used, Agent::here_, hdr_cmn::iface(), Scheduler::instance(), hdr_flags::no_ts_, hdr_cmn::NONE, hdr_nv::nv(), hdr_ip::offset(), hdr_nv::offset(), ns_addr_t::port_, hdr_flags::pri_, hdr_ip::prio(), Agent::prio_, hdr_cmn::ptype(), NixVec::Reset(), hdr_ip::saddr(), hdr_cmn::size(), Agent::size_, hdr_ip::sport(), hdr_cmn::timestamp(), hdr_ip::ttl(), Agent::type_, hdr_cmn::uid(), and Agent::uidcnt_.

Referenced by Agent::allocpkt(), and PingResponder::recv().

00447 {
00448         hdr_cmn* ch = hdr_cmn::access(p);
00449         ch->uid() = uidcnt_++;
00450         ch->ptype() = type_;
00451         ch->size() = size_;
00452         ch->timestamp() = Scheduler::instance().clock();
00453         ch->iface() = UNKN_IFACE.value(); // from packet.h (agent is local)
00454         ch->direction() = hdr_cmn::NONE;
00455 
00456         ch->error() = 0;        /* pkt not corrupt to start with */
00457 
00458         hdr_ip* iph = hdr_ip::access(p);
00459         iph->saddr() = here_.addr_;
00460         iph->sport() = here_.port_;
00461         iph->daddr() = dst_.addr_;
00462         iph->dport() = dst_.port_;
00463         
00464         //DEBUG
00465         //if (dst_ != -1)
00466         //  printf("pl break\n");
00467         
00468         iph->flowid() = fid_;
00469         iph->prio() = prio_;
00470         iph->ttl() = defttl_;
00471 
00472         hdr_flags* hf = hdr_flags::access(p);
00473         hf->ecn_capable_ = 0;
00474         hf->ecn_ = 0;
00475         hf->eln_ = 0;
00476         hf->ecn_to_echo_ = 0;
00477         hf->fs_ = 0;
00478         hf->no_ts_ = 0;
00479         hf->pri_ = 0;
00480         hf->cong_action_ = 0;
00481 #ifdef HAVE_STL
00482 
00483         hdr_nv* nv = hdr_nv::access(p);
00484         if (0)
00485                 printf("Off hdr_nv %d, ip_hdr %d myaddr %ld\n",
00486                        hdr_nv::offset(), hdr_ip::offset(), here_.addr_);
00487         NixNode* pNixNode = NixNode::GetNodeObject(here_.addr_);
00488         if (0)
00489                 printf("Node Object %p\n", pNixNode);
00490         if (pNixNode) { 
00491                 // If we get non-null, indicates nixvector routing in use
00492                 // Delete any left over nv in the packet
00493                 // Get a nixvector to the target (may create new)
00494                 NixVec* pNv = pNixNode->GetNixVector(dst_.addr_);
00495                 pNv->Reset();
00496                 nv->nv() = pNv; // And set the nixvec in the packet
00497                 nv->h_used = 0; // And reset used portion to 0
00498         }
00499 #endif //HAVE_STL
00500 }

Here is the call graph for this function:

void Agent::insertOldValue TracedVar *  v,
const char *  value
[protected, inherited]
 

Definition at line 250 of file agent.cc.

References min, OldValue::next_, Agent::oldValueList_, TRACEVAR_MAXVALUELENGTH, OldValue::val_, and OldValue::var_.

Referenced by Agent::trace().

00251 {
00252         OldValue *p = new OldValue;
00253         assert(p != NULL);
00254         strncpy(p->val_, value, min(strlen(value)+1, TRACEVAR_MAXVALUELENGTH));
00255         p->var_ = v;
00256         p->next_ = NULL;
00257         if (oldValueList_ == NULL) 
00258                 oldValueList_ = p;
00259         else {
00260                 p->next_ = oldValueList_;
00261                 oldValueList_ = p;
00262         }
00263 }

int NsObject::isdebug  )  const [inline, inherited]
 

Definition at line 61 of file object.h.

References NsObject::debug_.

00061 { return debug_; }

void Agent::listen  )  [virtual, inherited]
 

Reimplemented in BayFullTcpAgent, RapAgent, and FullTcpAgent.

Definition at line 381 of file agent.cc.

Referenced by Agent::command().

00382 {
00383 }

OldValue * Agent::lookupOldValue TracedVar *  v  )  [protected, inherited]
 

Definition at line 242 of file agent.cc.

References OldValue::next_, Agent::oldValueList_, and OldValue::var_.

Referenced by Agent::trace().

00243 {
00244         OldValue *p = oldValueList_;
00245         while ((p != NULL) && (p->var_ != v))
00246                 p = p->next_;
00247         return p;
00248 }

void Agent::monitorAgentTrace  )  [protected, inherited]
 

Definition at line 310 of file agent.cc.

References ns_addr_t::addr_, Agent::channel_, Scheduler::clock(), Agent::here_, Scheduler::instance(), TIME_FORMAT, and Agent::traceName_.

Referenced by Agent::command().

00311 {
00312         char wrk[256];
00313         int n;
00314         double curTime = (&Scheduler::instance() == NULL ? 0 : 
00315                           Scheduler::instance().clock());
00316         
00317         sprintf(wrk, "v -t "TIME_FORMAT" -e monitor_agent %d %s",
00318                 curTime, here_.addr_, traceName_);
00319         n = strlen(wrk);
00320         wrk[n] = '\n';
00321         wrk[n+1] = 0;
00322         if (channel_)
00323                 (void)Tcl_Write(channel_, wrk, n+1);
00324 }

Here is the call graph for this function:

nsaddr_t& Agent::port  )  [inline, inherited]
 

Definition at line 97 of file agent.h.

References Agent::here_, nsaddr_t, and ns_addr_t::port_.

Referenced by LmsAgent::pkt2agent(), TcpAsymSink::recv(), MIPBSAgent::recv(), LmsAgent::recv(), HttpInvalAgent::recv(), CtrMcastEncap::recv(), IntTcpAgent::rxmit_last(), IntTcpAgent::send_one(), send_refresh(), IcmpAgent::sendredirect(), TcpAgent::trace_event(), TcpAgent::traceAll(), TcpAsymAgent::traceAll(), TcpAgent::traceVar(), TcpSessionAgent::traceVar(), and TcpAsymAgent::traceVar().

00097 { return here_.port_; }

void LmsReceiver::print_all_stats int  drops  )  [protected]
 

Definition at line 573 of file lms-receiver.cc.

References all_lms_receivers, RcvBuffer::delay_sum_, dup_reqs_, RcvBuffer::duplicates_, max, RcvBuffer::max_delay_, max_dup_naks_, min, RcvBuffer::min_delay_, next_, RcvBuffer::pkts_recovered_, rcvbuf_, and rtt_.

Referenced by command().

00574 {
00575         LmsReceiver     *r = all_lms_receivers;
00576         int             nrcvs = 0; 
00577         int             cnt1 = 0; 
00578         int             cnt2 = 0; 
00579         int             dup_replies = 0;
00580         double          avg_norm_latency = 0.0;
00581         double          min = 1000000.0, max = 0.0;
00582         float           aveTotalDupReqs = 0.0;
00583         
00584         while (r)
00585         {
00586             ++nrcvs;
00587 
00588             // first, we'll add up all dupReqs, and after the loop we'll
00589             // div. by nrcvrs
00590             aveTotalDupReqs += float(r->dup_reqs_);
00591 
00592             if (r->rcvbuf_->duplicates_)
00593             {
00594                 cnt1++;
00595                 dup_replies += r->rcvbuf_->duplicates_;
00596             }
00597             if (r->rcvbuf_->pkts_recovered_)
00598             {
00599                 cnt2++;
00600                 double avl = r->rcvbuf_->delay_sum_/(double)r->rcvbuf_->pkts_recovered_;
00601                 avg_norm_latency += avl / r->rtt_;
00602                 
00603                 double m = r->rcvbuf_->min_delay_/r->rtt_;
00604                 double x = r->rcvbuf_->max_delay_/r->rtt_;
00605                 if (m < min)
00606                     min = m;
00607                 if (x > max)
00608                     max = x;
00609             }
00610             r = r->next_;
00611         }
00612         if(drops) 
00613             aveTotalDupReqs = (float(aveTotalDupReqs) / float(nrcvs)) / float(drops);
00614         else 
00615             aveTotalDupReqs = 0.0;
00616         
00617         //
00618         // Print stats in the form: <avg duplicate replies> <avg recovery latency> <min> <max>
00619         //
00620         if (drops)
00621                 {
00622                     printf ("\t%.5lf\t  %d\t%.4lf", aveTotalDupReqs, max_dup_naks_,
00623                                  ((double)dup_replies/(double)(nrcvs*drops)) );
00624                 }
00625         else    {
00626                 printf ("\t0.0\t  0\t0.0");
00627                 }
00628 
00629         //printf ("\t%d/%d/%.2lf", nrcvs, cnt1, (cnt1)?((double)dup_replies/(double)cnt1):0.0);
00630         if (cnt2) 
00631                 {
00632                 printf ("\t%.2lf\t%.2lf\t%.2lf\n", avg_norm_latency/(double)cnt2, min, max);
00633                 }
00634         else
00635                 {
00636                 printf ("\t0.0\t0.0\t0.0\n");
00637                 }
00638         printf ("\n");
00639 
00640         //printf ("Avg duplicates: %lf\n", (double)dup_replies / (double) cnt1);
00641         //printf ("Avg norm latency: %lf\n", avg_norm_latency / (double) cnt2);
00642 }

void LmsReceiver::print_stats  )  [protected]
 

Definition at line 644 of file lms-receiver.cc.

References RcvBuffer::delay_sum_, dup_reqs_, RcvBuffer::duplicates_, RcvBuffer::max_delay_, RcvBuffer::maxpkt_, RcvBuffer::min_delay_, RcvBuffer::nextpkt_, RcvBuffer::pkts_recovered_, rcvbuf_, req_rcvd_, req_sent_, rtt_, and uname_.

Referenced by command().

00645 {
00646         printf ("%s:\n", uname_);
00647         printf ("\tLast packet:\t\t%d\n", rcvbuf_->nextpkt_-1);
00648         printf ("\tMax packet:\t\t%d\n", rcvbuf_->maxpkt_);
00649         printf ("\tRequests sent:\t\t%d\n", req_sent_);
00650         printf ("\tRequests received:\t%d\n", req_rcvd_);
00651         if (rcvbuf_->pkts_recovered_)
00652                 {
00653                 printf ("\tPackets recovered:\t%d\n", rcvbuf_->pkts_recovered_);
00654                 printf ("\tNormalized latency (min, max, avg):\t%lf, %lf, %lf\n",
00655                         rcvbuf_->min_delay_/rtt_, rcvbuf_->max_delay_/rtt_,
00656                         (rcvbuf_->delay_sum_/(double)rcvbuf_->pkts_recovered_)/rtt_);
00657                 }
00658         printf ("\tDuplicate Replies:\t%d\n", rcvbuf_->duplicates_);
00659         printf ("\tDuplicate Requests:\t%d\n", dup_reqs_);
00660         printf ("\tRtt:\t\t\t%lf\n", rtt_);
00661         printf ("\n");
00662 }

void NsObject::recv Packet p,
const char *  s
[virtual, inherited]
 

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:

void LmsReceiver::recv Packet pkt,
Handler
[virtual]
 

Reimplemented from Agent.

Definition at line 268 of file lms-receiver.cc.

References abs(), RcvBuffer::add_pkt(), add_rdl(), Scheduler::clock(), create_nak(), dataSize_, delete_nak(), RcvBuffer::exists_pkt(), find_nak(), Packet::free(), handle_lms_pkt(), HDR_CMN, HDR_RTP, LmsNak::hi_, Scheduler::instance(), lms_cost_, LMS_COST_THR, LmsNak::lo_, ls_cntdown_, ls_last_rq_, ls_smpl_ivl_, RcvBuffer::nextpkt_, PT_LMS, hdr_cmn::ptype_, rcvbuf_, req_sent_, send_nak(), send_refresh(), hdr_rtp::seqno(), hdr_cmn::size_, and uname_.

00269 {
00270         hdr_cmn* h = HDR_CMN(pkt);
00271 
00272         // handle LMS packet
00273         if (h->ptype_ == PT_LMS)
00274                 {
00275                 handle_lms_pkt (pkt);
00276                 return;
00277                 }
00278 
00279         // DATA packet
00280         double          clock = Scheduler::instance().clock();
00281         hdr_rtp*        rh = HDR_RTP(pkt);
00282         int             rseq = rh->seqno();
00283 
00284         dataSize_ = h->size_;  
00285 
00286 #ifdef LMS_DEBUG
00287 printf ("%s got data pkt %d\n", uname_, rseq);
00288 #endif
00289         // GAP: send retransmission request
00290         if (rcvbuf_->nextpkt_ <  rseq)
00291                 {
00292                 int lo = rcvbuf_->nextpkt_;
00293                 int hi = rseq - 1;
00294                 req_sent_++;
00295 #ifdef LMS_DEBUG
00296 printf ("%s Sending REQ, lo %d, hi %d\n", uname_, lo, hi);
00297 #endif
00298                 create_nak (lo, hi);
00299                 send_nak (0, lo, hi);
00300                 }
00301         // RETRANSMISSION
00302         else if (rcvbuf_->nextpkt_ >  rseq &&
00303                  !rcvbuf_->exists_pkt (rseq))
00304                 {
00305                 add_rdl (rseq, clock);  // remember rdata
00306 
00307                 LmsNak *nak = find_nak (rseq);
00308                 if (nak->lo_ !=  nak->hi_)
00309                         {
00310                         if (rseq == nak->lo_)
00311                                 create_nak (rseq+1, nak->hi_);
00312                         else if (rseq == nak->hi_)
00313                                 create_nak (nak->lo_, rseq-1);
00314                         else    {
00315                                 create_nak (nak->lo_, rseq-1);
00316                                 create_nak (rseq+1, nak->hi_);
00317                                 }
00318                         }
00319                 delete_nak (nak);
00320                 }
00321 
00322         rcvbuf_->add_pkt (rseq, clock);
00323 
00324         // The LMS replier cost is sampled and refreshed every
00325         // LMS_LOSS_SMPL_IVL packets - data or retransmnissions.
00326         // New cost is the number of lost packets during LMS_LOSS_SMPL_IVL.
00327         // We update cost only if loss >= LMS_COST_THR.
00328         // The previous value is forgotten, making cost refresh very responsive.
00329         //
00330         // (XXX: We need a better algorithm here.
00331         if (ls_smpl_ivl_ && --ls_cntdown_ == 0)
00332                 {
00333                 int newcost = req_sent_ - ls_last_rq_;
00334                 assert (newcost >= 0);
00335                 if (abs (newcost - lms_cost_) >= LMS_COST_THR)
00336                         {
00337                         lms_cost_ = newcost;
00338                         if (newcost > 0)
00339                                 ls_last_rq_ = req_sent_;
00340 #ifdef LMS_DEBUG
00341 printf ("%s NEW LMS_COST %d\n", uname_, lms_cost_);
00342 #endif
00343                         }
00344                 send_refresh ();
00345                 ls_cntdown_ = ls_smpl_ivl_;
00346                 }
00347 
00348         Packet::free(pkt);
00349 }

Here is the call graph for this function:

void Agent::recvBytes int  bytes  )  [protected, virtual, inherited]
 

Definition at line 354 of file agent.cc.

References Agent::app_, and Application::recv().

Referenced by DelAckSink::recv(), TcpSink::recv(), QSTcpSink::recv(), FullTcpAgent::recv(), and TcpAsymSink::recv().

00355 {
00356         if (app_)
00357                 app_->recv(nbytes);     
00358 }

Here is the call graph for this function:

void Agent::recvOnly Packet  )  [inline, virtual, inherited]
 

Reimplemented from NsObject.

Definition at line 78 of file agent.h.

00078 {};

void NsObject::reset  )  [protected, virtual, inherited]
 

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 }

virtual void Agent::send int  nbytes  )  [inline, virtual, inherited]
 

Reimplemented in SRMAgent.

Definition at line 89 of file agent.h.

References Agent::sendmsg().

00089 { sendmsg(nbytes); }

Here is the call graph for this function:

virtual void Agent::send int  sz,
AppData data
[inline, virtual, inherited]
 

Reimplemented in HttpInvalAgent.

Definition at line 84 of file agent.h.

References Agent::sendmsg().

00084 { sendmsg(sz, data, 0); }

Here is the call graph for this function:

void Agent::send Packet p,
Handler h
[inline, inherited]
 

Reimplemented from Connector.

Definition at line 80 of file agent.h.

References NsObject::recv(), and Connector::target_.

Referenced by TcpSink::ack(), QSTcpSink::ack(), SinkAgent::bcast_interest(), PingAgent::command(), MessageAgent::command(), mcastControlAgent::command(), LmsAgent::command(), LDPAgent::command(), SinkAgent::data_ready(), DSDV_Agent::forwardPacket(), FullTcpAgent::foutput(), TcpAgent::output(), VegasTcpAgent::output(), RFC793eduTcpAgent::output(), QSNewRenoTcpAgent::output(), IntTcpAgent::output(), BayFullTcpAgent::output(), AbsTcpAgent::output(), AbsDelAckSink::recv(), AbsTcpSink::recv(), SRAgent::recv(), PingAgent::recv(), NatAgent::recv(), MIPBSAgent::recv(), Encapsulator::recv(), Decapsulator::recv(), MIPMHAgent::reg(), HttpInvalAgent::send(), GAFAgent::send_discovery(), RapAgent::SendAck(), SimpleTcpAgent::sendmsg(), PushbackAgent::sendMsg(), FullTcpAgent::sendpacket(), BayFullTcpAgent::sendpacket(), RapAgent::SendPacket(), TfrcAgent::sendpkt(), TfrcSinkAgent::sendpkt(), SinkAgent::sendpkt(), IcmpAgent::sendredirect(), and AbsDelAckSink::timeout().

00080 { target_->recv(p, h); }

Here is the call graph for this function:

void LmsReceiver::send_dmcast hdr_lms lh,
int  seqno,
int  fid
[protected]
 

Definition at line 466 of file lms-receiver.cc.

References Agent::addr(), Agent::allocpkt(), hdr_ip::daddr(), dataSize_, hdr_ip::dport(), hdr_ip::flowid(), hdr_lms::from_, hdr_lms::group_, HDR_CMN, HDR_IP, HDR_LMS, HDR_RTP, LMS_DMCAST, lms_group_, lms_src_, PT_CBR, hdr_cmn::ptype_, NsObject::recv(), hdr_rtp::seqno(), hdr_cmn::size(), hdr_cmn::size_, hdr_lms::src_, Connector::target_, hdr_lms::tp_addr_, hdr_lms::tp_iface_, hdr_lms::tp_port_, hdr_lms::type_, and uname_.

Referenced by handle_lms_pkt().

00467 {
00468         Packet  *p = allocpkt();
00469         hdr_cmn *ch = HDR_CMN(p);
00470         hdr_rtp *rh = HDR_RTP(p);
00471         hdr_ip  *piph = HDR_IP(p);
00472 #ifdef LMS_DEBUG
00473 printf ("%s Sending DMCAST %d to %d:%d, size is %d\n",
00474   uname_, seqno, lh->tp_addr_>>8, lh->tp_addr_&0xff, ch->size_);
00475 #endif
00476 
00477         hdr_lms *plh = HDR_LMS(p);
00478         ch->ptype_ = PT_CBR;
00479         ch->size() = dataSize_; 
00480 
00481         rh->seqno() = seqno;
00482 
00483         piph->daddr() = lh->tp_addr_;
00484         piph->dport() = lh->tp_port_;
00485         piph->flowid() = fid;           // to color packets in NAM
00486 
00487         plh->type_ = LMS_DMCAST;
00488         plh->from_ = addr();
00489         plh->src_ = lms_src_;
00490         plh->group_ = lms_group_;
00491         plh->tp_addr_ = lh->tp_addr_;
00492         plh->tp_port_ = lh->tp_port_;
00493         plh->tp_iface_ = lh->tp_iface_;
00494 
00495         target_->recv(p);
00496 }

Here is the call graph for this function:

void LmsReceiver::send_nak int  sqn,
int  lo,
int  hi
[protected]
 

Definition at line 200 of file lms-receiver.cc.

References Packet::accessdata(), Agent::addr(), Agent::allocpkt(), Scheduler::clock(), hdr_ip::daddr(), hdr_ip::flowid(), hdr_lms::from_, hdr_lms::group_, HDR_CMN, HDR_IP, HDR_LMS, hdr_lms::hi_, Scheduler::instance(), lms_group_, LMS_NOADDR, LMS_NOIFACE, LMS_REQ, lms_src_, hdr_lms::lo_, NsObject::recv(), Agent::size_, hdr_cmn::size_, hdr_lms::src_, Connector::target_, hdr_lms::tp_addr_, hdr_lms::tp_iface_, hdr_lms::tp_port_, hdr_lms::type_, uname_, and upstream_lms_.

Referenced by recv(), and timeout().

00201 {
00202         Packet* p = allocpkt(sizeof (struct lms_nak));
00203         struct lms_nak  *n = (struct lms_nak*)p->accessdata ();
00204 
00205         hdr_ip* iph = HDR_IP(p);
00206         hdr_cmn* ch = HDR_CMN(p);  
00207 
00208         ch->size_ = sizeof(struct lms_nak) + sizeof(hdr_lms); 
00209         iph->daddr() = upstream_lms_;
00210         iph->flowid() = 8;
00211         double now= Scheduler::instance().clock();
00212 #ifdef LMS_DEBUG
00213 printf("at %f %s send nak to upstream lms %d, size is %d\n\n",
00214   now,uname_, upstream_lms_, (HDR_CMN(p))->size_);
00215 #endif
00216         hdr_lms* lh = HDR_LMS(p);
00217         lh->type_   = LMS_REQ;
00218         lh->from_   = addr();
00219         lh->src_    = lms_src_;
00220         lh->group_  = lms_group_;
00221 
00222         lh->tp_addr_ = LMS_NOADDR;
00223         lh->tp_port_ = -1;
00224         lh->tp_iface_ = LMS_NOIFACE;
00225         lh->lo_ = n->nak_lo_ = lo;
00226         lh->hi_ = n->nak_hi_ = hi;
00227         n->nak_seqn_ = sqn;
00228         n->dup_cnt_ = 0;
00229         
00230         target_->recv(p);
00231 }

Here is the call graph for this function:

void LmsReceiver::send_refresh  )  [protected]
 

Definition at line 236 of file lms-receiver.cc.

References Packet::accessdata(), Agent::addr(), Agent::allocpkt(), hdr_ip::daddr(), hdr_ip::flowid(), hdr_lms::from_, hdr_lms::group_, HDR_CMN, HDR_IP, HDR_LMS, lms_cost_, lms_group_, LMS_REFRESH, lms_src_, Agent::port(), NsObject::recv(), Agent::size_, hdr_cmn::size_, hdr_lms::src_, Connector::target_, hdr_lms::type_, uname_, and upstream_lms_.

Referenced by command(), handle_lms_pkt(), and recv().

00237 {
00238         Packet* p = allocpkt (sizeof (struct lms_ctl));
00239         struct lms_ctl  *ctl = (struct lms_ctl*)p->accessdata ();
00240 
00241         hdr_ip* iph = HDR_IP(p);
00242         hdr_cmn *ch = HDR_CMN(p);  
00243 
00244         ch->size_ = sizeof(struct lms_ctl) + sizeof(hdr_lms); 
00245         iph->daddr() = upstream_lms_;
00246         iph->flowid() = 7;              // mark refresh packets black for nam
00247 #ifdef LMS_DEBUG
00248 printf("%s send refresh packet, size is %d\n\n",
00249   uname_, (HDR_CMN(p))->size_);
00250 #endif
00251         hdr_lms* lh = HDR_LMS(p);
00252         lh->type_   = LMS_REFRESH;
00253         lh->from_   = addr();
00254         lh->src_    = lms_src_;
00255         lh->group_  = lms_group_;
00256 
00257         ctl->cost_ = lms_cost_;
00258         ctl->hop_cnt_ = 0;
00259         ctl->downstream_lms_.addr_ = addr();
00260         ctl->downstream_lms_.port_ = port();
00261         
00262         target_->recv(p);
00263 }

Here is the call graph for this function:

void Agent::sendmsg int  nbytes,
const char *  flags = 0
[virtual, inherited]
 

Reimplemented in SA_Agent, RTPAgent, UdpAgent, LmsSender, SRMAgent, FullTcpAgent, TcpAgent, TfrcAgent, and SimpleTcpAgent.

Definition at line 415 of file agent.cc.

00416 {
00417 }

void Agent::sendmsg int  sz,
AppData ,
const char *  flags = 0
[virtual, inherited]
 

Reimplemented in UdpAgent.

Definition at line 400 of file agent.cc.

References abort().

Referenced by Agent::command(), Application::send(), Agent::send(), TrafficTrace::timeout(), TelnetApp::timeout(), EXPOO_Traffic::timeout(), and CBR_PP_Traffic::timeout().

00401 {
00402         fprintf(stderr, 
00403         "Agent::sendmsg(int, AppData*, const char*) not implemented\n");
00404         abort();
00405 }

Here is the call graph for this function:

virtual void Agent::sendto int  nbytes,
const char *  flags,
nsaddr_t  dst
[virtual, inherited]
 

void Agent::sendto int  sz,
AppData ,
const char *  flags,
nsaddr_t  dst
[virtual, inherited]
 

Definition at line 407 of file agent.cc.

References abort().

Referenced by Agent::command().

00409 {
00410         fprintf(stderr, 
00411         "Agent::sendmsg(int, AppData*, const char*) not implemented\n");
00412         abort();
00413 }

Here is the call graph for this function:

void Agent::set_pkttype packet_t  pkttype  )  [inline, inherited]
 

Definition at line 100 of file agent.h.

References Agent::type_.

Referenced by Agent::command(), HttpUInvalClass::create(), RA_Traffic::init(), POO_Traffic::init(), EXPOO_Traffic::init(), CBR_Traffic::init(), and CBR_PP_Traffic::init().

00100 { type_ = pkttype; }

virtual int& Agent::size  )  [inline, virtual, inherited]
 

Reimplemented in FullTcpAgent.

Definition at line 95 of file agent.h.

References Agent::size_.

Referenced by rtProtoDV::command(), RLM_Sender::command(), imepAgent::getResponseListSize(), LandmarkAgent::makeUpdate(), Agent::recv(), SSMSRMAgent::send_glb_sess(), SSMSRMAgent::send_loc_sess(), SSMSRMAgent::send_rep_sess(), SRMAgent::send_sess(), and TelnetApp::timeout().

00095 { return size_; }

NsObject* Connector::target  )  [inline, inherited]
 

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_; }

void Agent::timeout int  tno  )  [virtual, inherited]
 

Reimplemented in SA_Agent, RTPAgent, FtpClientAgent, BayFullTcpAgent, SinkAgent, RLM_Sender, MIPBSAgent, MIPMHAgent, RapAgent, RTCPAgent, TcpAsymSink, FackTcpAgent, FullTcpAgent, QSNewRenoTcpAgent, RBPVegasTcpAgent, RBPRenoTcpAgent, SackRHTcpAgent, Sack1TcpAgent, TcpSessionAgent, DelAckSink, TcpAgent, RenoTcpAgent, VegasTcpAgent, and SimpleTcpAgent.

Definition at line 347 of file agent.cc.

Referenced by SimpleTimer::expire().

00348 {
00349 }

void LmsReceiver::timeout int  type,
int  lo,
int  hi
[virtual]
 

Definition at line 664 of file lms-receiver.cc.

References Scheduler::clock(), find_nak(), Scheduler::instance(), LMS_NAK_TIMEOUT, LmsNak::nak_timeout_, LmsNak::nak_timer_, TimerHandler::resched(), send_nak(), LmsNak::seqn_, and uname_.

Referenced by LmsNak::timeout().

00665 {
00666         if (type == LMS_NAK_TIMEOUT)
00667                 {
00668 #ifdef LMS_DEBUG
00669 double now= Scheduler::instance().clock();
00670 printf ("at %f %s LMS_NAK_TIMEOUT for %d, %d\n", now, uname_, lo, hi);
00671 #endif
00672                 LmsNak *nak = find_nak (lo);
00673                 send_nak (++nak->seqn_, lo, hi);
00674                 nak->nak_timeout_ *= 2.0;                       // exponential back-off
00675                 nak->nak_timer_.resched (nak->nak_timeout_);
00676                 }
00677 }

Here is the call graph for this function:

void Agent::trace TracedVar *  v  )  [protected, virtual, inherited]
 

Reimplemented in TcpAgent.

Definition at line 266 of file agent.cc.

References ns_addr_t::addr_, Agent::channel_, Agent::dst_, Agent::here_, Agent::insertOldValue(), Scheduler::instance(), Agent::lookupOldValue(), min, TIME_FORMAT, Agent::traceName_, TRACEVAR_MAXVALUELENGTH, and OldValue::val_.

Referenced by TcpAgent::trace().

00267 {
00268         if (channel_ == 0)
00269                 return;
00270         char wrk[256], value[128];
00271         int n;
00272 
00273         // XXX we need to keep track of old values. What's the best way?
00274         v->value(value, 128);
00275 
00276         // XXX hack: how do I know ns has not started yet?
00277         // if there's nothing in value, return
00278         static int started = 0;
00279         if (!started) {
00280                 Tcl::instance().evalc("[Simulator instance] is-started");
00281                 if (Tcl::instance().result()[0] == '0')
00282                         // Simulator not started, do nothing
00283                         return;
00284                 // remember for next time (so we don't always have to call to tcl)
00285                 started = 1;
00286         };
00287 
00288         OldValue *ov = lookupOldValue(v);
00289         if (ov != NULL) {
00290                 sprintf(wrk, 
00291                         "f -t "TIME_FORMAT" -s %d -d %d -n %s -a %s -v %s -o %s -T v",
00292                         Scheduler::instance().clock(), here_.addr_,
00293                         dst_.addr_, v->name(), traceName_, value, ov->val_);
00294                 strncpy(ov->val_, 
00295                         value,
00296                         min(strlen(value)+1, TRACEVAR_MAXVALUELENGTH));
00297         } else {
00298                 // if there is value, insert it into old value list
00299                 sprintf(wrk, "f -t "TIME_FORMAT" -s %d -d %d -n %s -a %s -v %s -T v",
00300                         Scheduler::instance().clock(), here_.addr_,
00301                         dst_.addr_, v->name(), traceName_, value);
00302                 insertOldValue(v, value);
00303         }
00304         n = strlen(wrk);
00305         wrk[n] = '\n';
00306         wrk[n+1] = 0;
00307         (void)Tcl_Write(channel_, wrk, n+1);
00308 }

Here is the call graph for this function:

virtual void Agent::trace_event char *  eventtype  )  [inline, protected, virtual, inherited]
 

Reimplemented in TcpAgent.

Definition at line 146 of file agent.h.

00146 {}


Member Data Documentation

Application* Agent::app_ [protected, inherited]
 

Reimplemented in BayFullTcpAgent.

Definition at line 134 of file agent.h.

Referenced by Agent::attachApp(), Agent::idle(), RapAgent::IpgTimeout(), UdpAgent::recv(), SimpleTcpAgent::recv(), RapAgent::recv(), HttpInvalAgent::recv(), Agent::recv(), and Agent::recvBytes().

Tcl_Channel Agent::channel_ [protected, inherited]
 

Definition at line 130 of file agent.h.

Referenced by Agent::addAgentTrace(), Agent::command(), Agent::flushAVar(), Agent::monitorAgentTrace(), TcpAsymSink::recv(), Agent::trace(), TcpAgent::traceAll(), TcpAsymAgent::traceAll(), TcpAgent::traceVar(), TcpSessionAgent::traceVar(), and TcpAsymAgent::traceVar().

int LmsReceiver::dataSize_ [protected]
 

Definition at line 94 of file lms-receiver.cc.

Referenced by handle_lms_pkt(), LmsReceiver(), recv(), and send_dmcast().

int NsObject::debug_ [protected, inherited]
 

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().

int Agent::defttl_ [protected, inherited]
 

Definition at line 121 of file agent.h.

Referenced by Agent::delay_bind_dispatch(), and Agent::initpkt().

NsObject* Connector::drop_ [protected, inherited]
 

Definition at line 57 of file connector.h.

Referenced by Connector::command(), Connector::drop(), and ErrorModel::recv().

ns_addr_t Agent::dst_ [protected, inherited]
 

Reimplemented in AckRecons.

Definition at line 115 of file agent.h.

Referenced by Agent::addAgentTrace(), Agent::daddr(), Agent::delay_bind_dispatch(), Agent::deleteAgentTrace(), Agent::dport(), DSRProto::DSRProto(), Agent::flushAVar(), Agent::initpkt(), SRMAgent::recv(), SSMSRMAgent::recv(), NatAgent::recv(), SRMAgent::sendmsg(), PushbackAgent::sendMsg(), and Agent::trace().

int LmsReceiver::dup_reqs_ [protected]
 

Definition at line 117 of file lms-receiver.cc.

Referenced by handle_lms_pkt(), LmsReceiver(), print_all_stats(), and print_stats().

EventTrace* Agent::et_ [protected, inherited]
 

Definition at line 145 of file agent.h.

Referenced by TcpAgent::command(), and TcpAgent::trace_event().

int Agent::fid_ [protected, inherited]
 

Definition at line 118 of file agent.h.

Referenced by Agent::delay_bind_dispatch(), AbsTcpAgent::flowid(), Agent::initpkt(), FullTcpAgent::recv(), CtrMcastEncap::recv(), AbsTcpAgent::send_batch(), Sack1TcpAgent::timeout(), and TcpAgent::trace_event().

int Agent::flags_ [protected, inherited]
 

Reimplemented in BayFullTcpAgent, RapAgent, and FullTcpAgent.

Definition at line 120 of file agent.h.

Referenced by Agent::delay_bind_dispatch().

ns_addr_t Agent::here_ [protected, inherited]
 

Definition at line 114 of file agent.h.

Referenced by Agent::addAgentTrace(), Agent::addr(), SinkAgent::bcast_interest(), SinkAgent::data_ready(), OmniMcastAgent::DataForSink(), FloodingAgent::DataForSink(), DiffusionAgent::DataForSink(), Agent::delay_bind_dispatch(), Agent::deleteAgentTrace(), DiffusionProb::ForwardData(), DiffusionProb::ForwardTxFailed(), DiffusionRate::FwdOriginal(), DiffusionProb::FwdPosReinf(), DiffusionRate::FwdSubsample(), OmniMcastAgent::GodForwardData(), Agent::initpkt(), OmniMcastAgent::MACprepare(), FloodingAgent::MACprepare(), DiffusionAgent::MACprepare(), Agent::monitorAgentTrace(), Agent::port(), OmniMcastAgent::prepare_message(), FloodingAgent::prepare_message(), DiffusionAgent::prepare_message(), SSMSRMAgent::recv(), PingAgent::recv(), NatAgent::recv(), DumbAgent::recv(), SinkAgent::sendpkt(), SinkAgent::set_addr(), SinkAgent::Terminate(), and Agent::trace().

int LmsReceiver::lms_cost_ [protected]
 

Definition at line 101 of file lms-receiver.cc.

Referenced by command(), LmsReceiver(), recv(), and send_refresh().

nsaddr_t LmsReceiver::lms_group_ [protected]
 

Definition at line 97 of file lms-receiver.cc.

Referenced by handle_lms_pkt(), LmsReceiver(), send_dmcast(), send_nak(), and send_refresh().

nsaddr_t LmsReceiver::lms_src_ [protected]
 

Definition at line 96 of file lms-receiver.cc.

Referenced by handle_lms_pkt(), LmsReceiver(), send_dmcast(), send_nak(), and send_refresh().

int LmsReceiver::ls_cntdown_ [protected]
 

Definition at line 112 of file lms-receiver.cc.

Referenced by command(), LmsReceiver(), and recv().

int LmsReceiver::ls_last_rq_ [protected]
 

Definition at line 109 of file lms-receiver.cc.

Referenced by LmsReceiver(), and recv().

int LmsReceiver::ls_last_seq_ [protected]
 

Definition at line 110 of file lms-receiver.cc.

Referenced by LmsReceiver().

int LmsReceiver::ls_smpl_ivl_ [protected]
 

Definition at line 111 of file lms-receiver.cc.

Referenced by command(), LmsReceiver(), and recv().

int LmsReceiver::max_dup_naks_ = 0 [static, protected]
 

Definition at line 167 of file lms-receiver.cc.

Referenced by add_req(), LmsReceiver(), and print_all_stats().

LmsNak* LmsReceiver::nak_ [protected]
 

Definition at line 106 of file lms-receiver.cc.

Referenced by create_nak(), delete_nak(), find_nak(), and LmsReceiver().

LmsReceiver* LmsReceiver::next_
 

Definition at line 73 of file lms-receiver.cc.

Referenced by LmsReceiver(), and print_all_stats().

OldValue* Agent::oldValueList_ [protected, inherited]
 

Definition at line 132 of file agent.h.

Referenced by Agent::insertOldValue(), Agent::lookupOldValue(), and Agent::~Agent().

int Agent::prio_ [protected, inherited]
 

Definition at line 119 of file agent.h.

Referenced by Agent::delay_bind_dispatch(), and Agent::initpkt().

RcvBuffer* LmsReceiver::rcvbuf_ [protected]
 

Definition at line 93 of file lms-receiver.cc.

Referenced by handle_lms_pkt(), LmsReceiver(), print_all_stats(), print_stats(), and recv().

struct lms_rdl* LmsReceiver::rdl_ [protected]
 

Definition at line 104 of file lms-receiver.cc.

Referenced by add_rdl(), exists_rdl(), and LmsReceiver().

int LmsReceiver::rdl_sz_ [protected]
 

Definition at line 105 of file lms-receiver.cc.

Referenced by add_rdl(), and LmsReceiver().

int LmsReceiver::req_rcvd_ [protected]
 

Definition at line 116 of file lms-receiver.cc.

Referenced by handle_lms_pkt(), LmsReceiver(), and print_stats().

int LmsReceiver::req_sent_ [protected]
 

Definition at line 115 of file lms-receiver.cc.

Referenced by LmsReceiver(), print_stats(), and recv().

Packet* LmsReceiver::rql_ [protected]
 

Definition at line 102 of file lms-receiver.cc.

Referenced by add_req(), and LmsReceiver().

int LmsReceiver::rql_sz_ [protected]
 

Definition at line 103 of file lms-receiver.cc.

Referenced by add_req().

double LmsReceiver::rtt_ [protected]
 

Definition at line 95 of file lms-receiver.cc.

Referenced by create_nak(), handle_lms_pkt(), LmsReceiver(), print_all_stats(), and print_stats().

int Agent::size_ [protected, inherited]
 

Reimplemented in SA_Agent, and AckRecons.

Definition at line 116 of file agent.h.

Referenced by AbsDelAckSink::AbsDelAckSink(), AbsTcpAgent::AbsTcpAgent(), AbsTcpRenoAckAgent::AbsTcpRenoAckAgent(), AbsTcpRenoDelAckAgent::AbsTcpRenoDelAckAgent(), AbsTcpSink::AbsTcpSink(), AbsTcpTahoeAckAgent::AbsTcpTahoeAckAgent(), AbsTcpTahoeDelAckAgent::AbsTcpTahoeDelAckAgent(), RTCPAgent::command(), LDPAgent::command(), SinkAgent::command(), IntTcpAgent::createTcpSession(), TfrcAgent::decrease_rate(), TcpAgent::delay_bind_dispatch(), TcpSink::delay_bind_dispatch(), FullTcpAgent::foutput(), DSRAgent::getRouteForPacket(), TfrcAgent::increase_rate(), TcpAgent::initial_window(), Agent::initpkt(), RapAgent::IpgTimeout(), IvsReceiver::IvsReceiver(), LmsAgent::LmsAgent(), LmsReceiver(), mcastControlAgent::mcastControlAgent(), MessageAgent::MessageAgent(), MIPBSAgent::MIPBSAgent(), MIPMHAgent::MIPMHAgent(), TfrcAgent::nextpkt(), IntTcpAgent::opencwnd(), PingAgent::PingAgent(), RapAgent::RapAgent(), TfrcAgent::recv(), TcpSessionAgent::recv(), NewRenoTcpAgent::recv(), TfrcAgent::reduce_rate_on_no_feedback(), RLM_Sender::RLM_Sender(), RTCPAgent::RTCPAgent(), RTPAgent::RTPAgent(), IntTcpAgent::rxmit_last(), LmsSender::send_lms_pkt(), TcpSessionAgent::send_much(), send_nak(), IntTcpAgent::send_one(), send_refresh(), UdpAgent::sendmsg(), TfrcAgent::sendmsg(), TcpAgent::sendmsg(), SRMAgent::sendmsg(), RTPAgent::sendmsg(), RapAgent::SendPacket(), TfrcAgent::sendpkt(), rtProtoDV::sendpkt(), SinkAgent::sendpkt(), SinkAgent::SinkAgent(), Agent::size(), TfrcAgent::slowstart(), TfrcAgent::start(), TfrcAgent::TfrcAgent(), TfrcSinkAgent::TfrcSinkAgent(), RTPAgent::timeout(), RTCPAgent::timeout(), and UdpAgent::UdpAgent().

NsObject* Connector::target_ [protected, inherited]
 

Definition at line 56 of file connector.h.

Referenced by SRAgent::command(), SA_Agent::command(), IvsReceiver::command(), MultiFieldFilter::command(), Filter::command(), Connector::command(), DiffusionAgent::DiffusionAgent(), DSRAgent::DSRAgent(), PromotionTimer::expire(), FloodingAgent::FloodingAgent(), toraAgent::forward(), AODV::forward(), LandmarkAgent::ForwardPacket(), DSDV_Agent::forwardPacket(), SensorQueryAgent::generate_query(), DSDVTriggerHandler::handle(), AckRecons::handle(), DSRAgent::handlePacketReceipt(), DSDV_Agent::helper_callback(), AODV::initialized(), DSDV_Agent::lost_link(), OmniMcastAgent::OmniMcastAgent(), LandmarkAgent::periodic_callback(), LandmarkAgent::ProcessHierUpdate(), TCPTapAgent::processpkt(), IPTapAgent::processpkt(), CMUPriQueue::prq_enqueue(), CMUPriQueue::prq_resume(), DequeTrace::recv(), Trace::recv(), TraceIpMac::recv(), TraceIp::recv(), TBF::recv(), SRMAgent::recv(), SSMSRMAgent::recv(), SatDequeTrace::recv(), SAack_Agent::recv(), Queue< T >::recv(), PingResponder::recv(), MIPEncapsulator::recv(), LmsAgent::recv(), HackLossyLink::recv(), GAFPartner::recv(), FQ::recv(), FloodAgent::recv(), ErrorModel::recv(), DynamicLink::recv(), DumbAgent::recv(), DSRAgent::recv(), DelayModel::recv(), LinkDelay::recv(), CtrMcastDecap::recv(), CtrMcastEncap::recv(), CMUTrace::recv(), PriQueue::recvHighPriority(), Trace::recvOnly(), TapAgent::recvpkt(), Queue< T >::resume(), LinkDelay::send(), Connector::send(), Agent::send(), MIPBSAgent::send_ads(), SRMAgent::send_ctrl(), SSMSRMAgent::send_ctrl(), MFTPSndAgent::send_data(), LmsSender::send_dmcast(), send_dmcast(), LmsAgent::send_downstream(), SSMSRMAgent::send_glb_sess(), LmsSender::send_lms_pkt(), SSMSRMAgent::send_loc_sess(), MFTPRcvAgent::send_nak(), send_nak(), send_refresh(), SSMSRMAgent::send_rep_sess(), SRMAgent::send_sess(), MIPMHAgent::send_sols(), LmsSender::send_spm(), MFTPSndAgent::send_status_request(), LmsAgent::send_upstream(), LandmarkAgent::SendChangedTagListUpdate(), AODV::sendError(), AODV::sendHello(), UdpAgent::sendmsg(), SRMAgent::sendmsg(), SA_Agent::sendmsg(), RTPAgent::sendmsg(), LmsSender::sendmsg(), DSDV_Agent::sendOutBCastPkt(), SA_Agent::sendpkt(), rtProtoDV::sendpkt(), RTPAgent::sendpkt(), RTCPAgent::sendpkt(), IvsSource::sendpkt(), AODV::sendReply(), AODV::sendRequest(), LmsSender::solicit_naks(), Connector::target(), TBF::timeout(), and toraAgent::tora_output().

char* Agent::traceName_ [protected, inherited]
 

Definition at line 131 of file agent.h.

Referenced by Agent::addAgentTrace(), Agent::command(), Agent::deleteAgentTrace(), Agent::flushAVar(), Agent::monitorAgentTrace(), and Agent::trace().

packet_t Agent::type_ [protected, inherited]
 

Definition at line 117 of file agent.h.

Referenced by Agent::get_pkttype(), Agent::initpkt(), FullTcpAgent::listen(), BayFullTcpAgent::listen(), RapAgent::SendAck(), SRMAgent::sendmsg(), RapAgent::SendPacket(), and Agent::set_pkttype().

int Agent::uidcnt_ [static, protected, inherited]
 

Definition at line 68 of file agent.cc.

Referenced by imepAgent::handlerControlTimer(), imepAgent::handlerReXmitTimer(), Agent::initpkt(), imepAgent::sendAck(), imepAgent::sendBeacon(), toraAgent::sendCLR(), imepAgent::sendHello(), toraAgent::sendQRY(), DSRAgent::sendUnknownFlow(), toraAgent::sendUPD(), and DSRAgent::xmitFailed().

char LmsReceiver::uname_[8] [protected]
 

Definition at line 92 of file lms-receiver.cc.

Referenced by add_req(), create_nak(), delete_nak(), find_nak(), handle_lms_pkt(), LmsReceiver(), print_stats(), recv(), send_dmcast(), send_nak(), send_refresh(), and timeout().

nsaddr_t LmsReceiver::upstream_lms_ [protected]
 

Definition at line 100 of file lms-receiver.cc.

Referenced by handle_lms_pkt(), LmsReceiver(), send_nak(), and send_refresh().


The documentation for this class was generated from the following file:
Generated on Tue Apr 20 12:56:16 2004 for NS2.26SourcesOriginal by doxygen 1.3.3