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

toraAgent Class Reference

#include <tora.h>

Inheritance diagram for toraAgent:

Inheritance graph
[legend]
Collaboration diagram for toraAgent:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 toraAgent (nsaddr_t id)
void recv (Packet *p, Handler *)
int command (int argc, const char *const *argv)
void rtNotifyLinkUP (nsaddr_t index)
void rtNotifyLinkDN (nsaddr_t index)
void rtNotifyLinkStatus (nsaddr_t index, u_int32_t status)
void rtRoutePacket (Packet *p)
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,...)

Protected Member Functions

nsaddr_tipaddr ()
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)
void handle (Event *)

Protected Attributes

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 uidcnt_

Private Member Functions

TORADestdst_find (nsaddr_t id)
TORADestdst_add (nsaddr_t id)
void dst_dump (void)
void rt_resolve (Packet *p)
void forward (Packet *p, nsaddr_t nexthop, Time delay=0.0)
void purge_queue (void)
void enque (TORADest *td, Packet *p)
Packetdeque (TORADest *td)
void recvTORA (Packet *p)
void recvQRY (Packet *p)
void recvUPD (Packet *p)
void recvCLR (Packet *p)
void sendQRY (nsaddr_t id)
void sendUPD (nsaddr_t id)
void sendCLR (nsaddr_t id, double tau, nsaddr_t oid)
void tora_output (Packet *p)
int initialized ()
void trace (char *fmt,...)
virtual void reset ()
void log_route_loop (nsaddr_t prev, nsaddr_t next)
void log_link_layer_feedback (Packet *p)
void log_link_layer_recycle (Packet *p)
void log_lnk_del (nsaddr_t dst)
void log_lnk_kept (nsaddr_t dst)
void log_nb_del (nsaddr_t dst, nsaddr_t id)
void log_recv_qry (Packet *p)
void log_recv_upd (Packet *p)
void log_recv_clr (Packet *p)
void log_route_table (void)
void log_dst_state_change (TORADest *td)
void logNextHopChange (TORADest *td)
void logNbDeletedLastDN (TORADest *td)
void logToraDest (TORADest *td)
void logToraNeighbor (TORANeighbor *tn)

Private Attributes

nsaddr_t index
td_head dstlist
imepAgentimepagent
Tracelogtarget
rtqueue rqueue
PriQueueifqueue

Friends

class TORANeighbor
class TORADest

Constructor & Destructor Documentation

toraAgent::toraAgent nsaddr_t  id  ) 
 

Definition at line 86 of file tora.cc.

References dstlist, imepagent, LIST_INIT, logtarget, and PT_TORA.

00086                                 :
00087         rtAgent(id, PT_TORA),
00088         rqueue()
00089 {
00090         LIST_INIT(&dstlist);
00091         imepagent = 0;
00092         logtarget = 0;
00093         ifqueue = 0;
00094 }


Member Function Documentation

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(), LmsReceiver::send_dmcast(), LmsAgent::send_downstream(), SSMSRMAgent::send_glb_sess(), LmsSender::send_lms_pkt(), SSMSRMAgent::send_loc_sess(), LmsReceiver::send_nak(), LmsReceiver::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(), LmsReceiver::send_dmcast(), SSMSRMAgent::send_glb_sess(), LmsSender::send_lms_pkt(), SSMSRMAgent::send_loc_sess(), MFTPRcvAgent::send_nak(), LmsReceiver::send_nak(), LmsReceiver::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 toraAgent::command int  argc,
const char *const *  argv
[virtual]
 

Reimplemented from Agent.

Definition at line 106 of file tora.cc.

References Agent::command(), rtqueue::command(), imepagent, imepAgent::imepRegister(), index, logtarget, and rqueue.

00107 {
00108         if(argc == 2) {
00109                 Tcl& tcl = Tcl::instance();
00110 
00111                 if(strncasecmp(argv[1], "id", 2) == 0) {
00112                         tcl.resultf("%d", index);
00113                         return TCL_OK;
00114                 }
00115         }
00116         else if(argc == 3) {
00117 
00118                 if(strcmp(argv[1], "log-target") == 0 || strcmp(argv[1], "tracetarget") == 0 ) {
00119                         logtarget = (Trace*) TclObject::lookup(argv[2]);
00120                         if(logtarget == 0)
00121                                 return TCL_ERROR;
00122                         return TCL_OK;
00123                 }
00124                 else if(strcmp(argv[1], "drop-target") == 0) {
00125                         int stat = rqueue.command(argc,argv);
00126                         if (stat != TCL_OK) return stat;
00127                         return Agent::command(argc, argv);
00128                 }
00129                 else if(strcmp(argv[1], "if-queue") == 0) {
00130                         ifqueue = (PriQueue*) TclObject::lookup(argv[2]);
00131                         if(ifqueue == 0)
00132                                 return TCL_ERROR;
00133                         return TCL_OK;
00134                 }
00135                 else if(strcmp(argv[1], "imep-agent") == 0) {
00136                         imepagent = (imepAgent*) TclObject::lookup(argv[2]);
00137                         if(imepagent == 0)
00138                                 return TCL_ERROR;
00139                         imepagent->imepRegister((rtAgent*) this);
00140                         return TCL_OK;
00141                 }
00142         }
00143         return Agent::command(argc, argv);
00144 }

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 }

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 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:

Packet* toraAgent::deque TORADest td  )  [private]
 

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(), 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(), 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(), reset(), Queue< T >::reset(), LinkDelay::reset(), AODV::rt_ll_failed(), AODV::rt_purge(), AODV::rt_resolve(), 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:

TORADest * toraAgent::dst_add nsaddr_t  id  )  [private]
 

Definition at line 162 of file tora.cc.

References dstlist, imepagent, imepAgent::imepGetBiLinks(), LIST_INSERT_HEAD, TORADest::nb_add(), and TORADest.

Referenced by recvCLR(), recvQRY(), recvUPD(), and rt_resolve().

00163 {
00164         TORADest *td = new TORADest(id, this);
00165         assert(td);
00166 
00167         LIST_INSERT_HEAD(&dstlist, td, link);
00168 
00169         int *nblist = 0, nbcnt = 0;
00170         imepagent->imepGetBiLinks(nblist, nbcnt);
00171 
00172         for(int i = 0; i < nbcnt; i++)
00173                 (void) td->nb_add(nblist[i]);
00174 
00175         if(nblist) delete[] nblist;
00176 
00177         return td;
00178 }

Here is the call graph for this function:

void toraAgent::dst_dump void   )  [private]
 

Definition at line 181 of file tora.cc.

References dstlist.

00182 {
00183         TORADest *td = dstlist.lh_first;
00184 
00185         for( ; td; td = td = td->link.le_next)
00186                 td->dump();
00187 }

TORADest * toraAgent::dst_find nsaddr_t  id  )  [private]
 

Definition at line 151 of file tora.cc.

References dstlist, and TORADest::index.

Referenced by recvCLR(), recvQRY(), recvTORA(), recvUPD(), rt_resolve(), and sendUPD().

00152 {
00153         TORADest* td = dstlist.lh_first;
00154         for( ; td; td = td->link.le_next) {
00155                 if(td->index == id)
00156                         return td;
00157         }
00158         return 0;
00159 }

void Agent::dumpTracedVars  )  [protected, inherited]
 

void toraAgent::enque TORADest td,
Packet p
[private]
 

void toraAgent::forward Packet p,
nsaddr_t  nexthop,
Time  delay = 0.0
[private]
 

Definition at line 194 of file tora.cc.

References hdr_cmn::DOWN, Connector::drop(), DROP_RTR_ROUTE_LOOP, HDR_CMN, Scheduler::instance(), rtAgent::ipaddr(), log_route_loop(), NS_AF_INET, Scheduler::schedule(), Connector::target_, and tora_output().

Referenced by recvTORA(), and rt_resolve().

00195 {
00196         struct hdr_cmn *ch = HDR_CMN(p);
00197 
00198 #ifdef TORA_DISALLOW_ROUTE_LOOP
00199         if(nexthop == ch->prev_hop_) {
00200                 log_route_loop(ch->prev_hop_, nexthop);
00201                 drop(p, DROP_RTR_ROUTE_LOOP);
00202                 return;
00203         }
00204 #endif
00205         ch->next_hop() = nexthop;
00206         ch->prev_hop_ = ipaddr();
00207         ch->addr_type() = NS_AF_INET;
00208 
00209         // change the packet direction to DOWN
00210         ch->direction() = hdr_cmn::DOWN;
00211 
00212         if (0.0 == delay) {
00213           tora_output(p);
00214         } else {
00215           Scheduler::instance().schedule(target_, p, delay);
00216         }
00217 }

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 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:

int toraAgent::initialized  )  [inline, private, virtual]
 

Implements rtAgent.

Definition at line 127 of file tora.h.

References imepagent, and logtarget.

Referenced by recv().

00127                                  {
00128                  return logtarget && ifqueue && imepagent;
00129         }

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 }

nsaddr_t& rtAgent::ipaddr  )  [inline, protected, inherited]
 

Definition at line 26 of file rtproto.h.

References rtAgent::ipaddr_, and nsaddr_t.

Referenced by forward(), log_link_layer_feedback(), log_link_layer_recycle(), log_lnk_del(), log_lnk_kept(), log_nb_del(), log_recv_clr(), log_recv_qry(), log_recv_upd(), log_route_loop(), log_route_table(), logNbDeletedLastDN(), logNextHopChange(), logToraDest(), logToraNeighbor(), recv(), recvCLR(), recvQRY(), recvUPD(), rt_resolve(), rtNotifyLinkUP(), sendCLR(), sendQRY(), and sendUPD().

00026 { return ipaddr_; }

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 }

void toraAgent::log_dst_state_change TORADest td  )  [private]
 

Referenced by TORADest::update_height().

void toraAgent::log_link_layer_feedback Packet p  )  [private]
 

Definition at line 33 of file tora_logs.cc.

References BaseTrace::buffer(), CURRENT_TIME, BaseTrace::dump(), HDR_CMN, rtAgent::ipaddr(), logtarget, Trace::pt_, and verbose.

00034 {
00035         static int link_layer_feedback = 0;
00036         struct hdr_cmn *ch = HDR_CMN(p);
00037 
00038         if(! logtarget || ! verbose) return;
00039 
00040         sprintf(logtarget->pt_->buffer(),
00041                 "T %.9f _%d_ LL unable to deliver packet %d to %d (%d) (reason = %d, ifqlen = %d)",
00042                 CURRENT_TIME,
00043                 ipaddr(),
00044                 ch->uid_,
00045                 ch->next_hop_,
00046                 ++link_layer_feedback,
00047                 ch->xmit_reason_,
00048                 ifqueue->length());
00049 
00050         logtarget->pt_->dump();
00051 }

Here is the call graph for this function:

void toraAgent::log_link_layer_recycle Packet p  )  [private]
 

Definition at line 55 of file tora_logs.cc.

References BaseTrace::buffer(), CURRENT_TIME, BaseTrace::dump(), HDR_CMN, HDR_IP, rtAgent::ipaddr(), logtarget, Trace::pt_, and verbose.

Referenced by rtNotifyLinkDN().

00056 {
00057         struct hdr_cmn *ch = HDR_CMN(p);
00058         struct hdr_ip *ih = HDR_IP(p);
00059 
00060         if(! logtarget || ! verbose) return;
00061 
00062         sprintf(logtarget->pt_->buffer(),
00063                 "T %.9f _%d_ recycling packet %d (src = %d, dst = %d, prev = %d, next = %d)",
00064                 CURRENT_TIME,
00065                 ipaddr(),
00066                 ch->uid_,
00067                 //                ih->src_, ih->dst_,
00068                 ih->saddr(),ih->daddr(),
00069                 ch->prev_hop_, ch->next_hop_);
00070         logtarget->pt_->dump();
00071 }

Here is the call graph for this function:

void toraAgent::log_lnk_del nsaddr_t  dst  )  [private]
 

Definition at line 74 of file tora_logs.cc.

References BaseTrace::buffer(), CURRENT_TIME, BaseTrace::dump(), God::hops(), God::instance(), rtAgent::ipaddr(), logtarget, Trace::pt_, and verbose.

00075 {
00076         static int link_del = 0;
00077 
00078         if(! logtarget || ! verbose) return;
00079 
00080         /*
00081          *  If "god" thinks that these two nodes are still
00082          *  reachable then this is an erroneous deletion.
00083          */
00084         sprintf(logtarget->pt_->buffer(),
00085                 "T %.9f _%d_ deleting LL hop to %d (delete %d is %s)",
00086                 CURRENT_TIME,
00087                 ipaddr(),
00088                 dst,
00089                 ++link_del,
00090                 God::instance()->hops(ipaddr(), dst) != 1 ? "VALID" : "INVALID");
00091         logtarget->pt_->dump();
00092 }

Here is the call graph for this function:

void toraAgent::log_lnk_kept nsaddr_t  dst  )  [private]
 

Definition at line 95 of file tora_logs.cc.

References BaseTrace::buffer(), CURRENT_TIME, BaseTrace::dump(), God::hops(), God::instance(), rtAgent::ipaddr(), logtarget, Trace::pt_, and verbose.

00096 {
00097         static int link_kept = 0;
00098 
00099         if(! logtarget || ! verbose) return;
00100 
00101         /*
00102          *  If "god" thinks that these two nodes are now
00103          *  unreachable, then we are erroneously keeping
00104          *  a bad route.
00105          */
00106         sprintf(logtarget->pt_->buffer(),
00107                 "T %.9f _%d_ keeping LL hop to %d (keep %d is %s)",
00108                 CURRENT_TIME,
00109                 ipaddr(),
00110                 dst,
00111                 ++link_kept,
00112                 God::instance()->hops(ipaddr(), dst) == 1 ? "VALID" : "INVALID");
00113         logtarget->pt_->dump();
00114 }

Here is the call graph for this function:

void toraAgent::log_nb_del nsaddr_t  dst,
nsaddr_t  id
[private]
 

Definition at line 117 of file tora_logs.cc.

References BaseTrace::buffer(), CURRENT_TIME, BaseTrace::dump(), rtAgent::ipaddr(), logtarget, Trace::pt_, and verbose.

00118 {
00119         if(! logtarget || ! verbose) return;
00120 
00121         sprintf(logtarget->pt_->buffer(),
00122                 "T %.9f _%d_ destination %d removing neighbor %d",
00123                 CURRENT_TIME,
00124                 ipaddr(),
00125                 dst, id);
00126         logtarget->pt_->dump();
00127 }

Here is the call graph for this function:

void toraAgent::log_recv_clr Packet p  )  [private]
 

Definition at line 162 of file tora_logs.cc.

References BaseTrace::buffer(), CURRENT_TIME, BaseTrace::dump(), HDR_IP, HDR_TORA_CLR, rtAgent::ipaddr(), logtarget, Trace::pt_, and verbose.

Referenced by recvTORA().

00163 {
00164         struct hdr_ip *ih = HDR_IP(p);
00165         struct hdr_tora_clr *ch = HDR_TORA_CLR(p);
00166 
00167         if(! logtarget || ! verbose) return;
00168 
00169         sprintf(logtarget->pt_->buffer(),
00170                 "T %.9f _%d_ received `CLR` from %d --- %d (%f %d)",
00171                 CURRENT_TIME,
00172                 ipaddr(),
00173                 // ih->src_,
00174                 ih->saddr(),
00175                 ch->tc_dst, ch->tc_tau, ch->tc_oid);
00176         logtarget->pt_->dump();
00177 }

Here is the call graph for this function:

void toraAgent::log_recv_qry Packet p  )  [private]
 

Definition at line 130 of file tora_logs.cc.

References BaseTrace::buffer(), CURRENT_TIME, BaseTrace::dump(), HDR_IP, HDR_TORA_QRY, rtAgent::ipaddr(), logtarget, Trace::pt_, and verbose.

00131 {
00132         struct hdr_ip *ih = HDR_IP(p);
00133         struct hdr_tora_qry *qh = HDR_TORA_QRY(p);
00134 
00135         if(! logtarget || ! verbose) return;
00136 
00137         sprintf(logtarget->pt_->buffer(),
00138                 "T %.9f %d received `QRY` from %d --- %d",
00139                 CURRENT_TIME, ipaddr(), ih->saddr(), qh->tq_dst);
00140         logtarget->pt_->dump();
00141 }

Here is the call graph for this function:

void toraAgent::log_recv_upd Packet p  )  [private]
 

Definition at line 144 of file tora_logs.cc.

References BaseTrace::buffer(), CURRENT_TIME, BaseTrace::dump(), HDR_IP, HDR_TORA_UPD, rtAgent::ipaddr(), logtarget, Trace::pt_, and verbose.

Referenced by recvTORA().

00145 {
00146         struct hdr_ip *ih = HDR_IP(p);
00147         struct hdr_tora_upd *uh = HDR_TORA_UPD(p);
00148 
00149         if(! logtarget || ! verbose) return;
00150 
00151         sprintf(logtarget->pt_->buffer(),
00152                 "T %.9f _%d_ received `UPD` from %d --- %d (%f %d %d %d %d)",
00153                 CURRENT_TIME,
00154                 ipaddr(),
00155                 // ih->src_, uh->tu_dst,
00156                 ih->saddr(), uh->tu_dst,
00157                 uh->tu_tau, uh->tu_oid, uh->tu_r, uh->tu_delta, uh->tu_id);
00158         logtarget->pt_->dump();
00159 }

Here is the call graph for this function:

void toraAgent::log_route_loop nsaddr_t  prev,
nsaddr_t  next
[private]
 

Definition at line 22 of file tora_logs.cc.

References BaseTrace::buffer(), CURRENT_TIME, BaseTrace::dump(), rtAgent::ipaddr(), logtarget, Trace::pt_, and verbose.

Referenced by forward().

00023 {
00024         if(! logtarget || ! verbose ) return;
00025 
00026         sprintf(logtarget->pt_->buffer(),
00027                 "T %.9f _%d_ routing loop (%d --> %d --> %d)",
00028                 CURRENT_TIME, ipaddr(), prev, ipaddr(), next);
00029         logtarget->pt_->dump();
00030 }

Here is the call graph for this function:

void toraAgent::log_route_table void   )  [private]
 

Definition at line 181 of file tora_logs.cc.

References BaseTrace::buffer(), CURRENT_TIME, Height::delta, dstlist, BaseTrace::dump(), TORANeighbor::height, TORADest::height, Height::id, TORANeighbor::index, TORADest::index, rtAgent::ipaddr(), TORANeighbor::lnk_stat, logtarget, TORADest::nb_find_next_hop(), TORADest::num_active, TORADest::num_down, TORADest::num_up, Height::oid, Trace::pt_, Height::r, TORADest::rt_req, Height::tau, TORANeighbor::time_act, TORADest::time_upd, and verbose.

00182 {
00183         TORADest *td;
00184         TORANeighbor *tn;
00185 
00186         if (!logtarget || ! verbose) return;
00187 
00188         for(td = dstlist.lh_first; td; td = td->link.le_next) {
00189                 tn = td->nb_find_next_hop();
00190 
00191                 sprintf(logtarget->pt_->buffer(),
00192                         "T %.9f _%d_ %2d (%9f %2d %2d %2d %2d) ---> %2d (%9f %2d %2d %2d %2d) %d %.9f --- (%2d a, %2d d, %2d u) %d %9f",
00193                         CURRENT_TIME,
00194                         ipaddr(),
00195                         td->index,
00196                         td->height.tau, td->height.oid, td->height.r,
00197                         td->height.delta, td->height.id,
00198                         tn ? tn->index : -1,
00199                         tn ? tn->height.tau : -1.0,
00200                         tn ? tn->height.oid : -1,
00201                         tn ? tn->height.r : -1,
00202                         tn ? tn->height.delta : -1,
00203                         tn ? tn->height.id: -1,
00204                         tn ? tn->lnk_stat : -1,
00205                         tn ? tn->time_act : -1.0,
00206                         td->num_active, td->num_down, td->num_up,
00207                         td->rt_req, td->time_upd);
00208 
00209                 logtarget->pt_->dump();
00210         }
00211 
00212         sprintf(logtarget->pt_->buffer(),
00213                 "T --------------------------------------------------");
00214         logtarget->pt_->dump();
00215 }

Here is the call graph for this function:

void toraAgent::logNbDeletedLastDN TORADest td  )  [private]
 

Definition at line 291 of file tora_logs.cc.

References BaseTrace::buffer(), CURRENT_TIME, BaseTrace::dump(), TORADest::index, rtAgent::ipaddr(), logNextHopChange(), logtarget, Trace::pt_, and verbose.

Referenced by TORADest::nb_del().

00292 {
00293         if(! verbose) return;
00294 
00295         sprintf(logtarget->pt_->buffer(), "T %.9f _%d_ lost last downstream link for destination %d",
00296                 CURRENT_TIME,
00297                 ipaddr(),
00298                 td->index);
00299         logtarget->pt_->dump();
00300 
00301         logNextHopChange(td);
00302 }

Here is the call graph for this function:

void toraAgent::logNextHopChange TORADest td  )  [private]
 

Definition at line 263 of file tora_logs.cc.

References BaseTrace::buffer(), CURRENT_TIME, BaseTrace::dump(), TORANeighbor::index, TORADest::index, rtAgent::ipaddr(), logtarget, logToraDest(), logToraNeighbor(), TORADest::nb_find_next_hop(), TORADest::nblist, Trace::pt_, and verbose.

Referenced by logNbDeletedLastDN(), and recvTORA().

00264 {
00265         if(! verbose) return;
00266 
00267         TORANeighbor *n;
00268 
00269         assert(td);
00270 
00271         logToraDest(td);
00272 
00273         for(n = td->nblist.lh_first; n; n = n->link.le_next)
00274                 logToraNeighbor(n);
00275 
00276         n = td->nb_find_next_hop();
00277         if(n) {
00278                 sprintf(logtarget->pt_->buffer(), "T %.9f _%d_ nexthop for %d is %d", 
00279                         CURRENT_TIME, ipaddr(), td->index, n->index);
00280                 logtarget->pt_->dump();
00281         }
00282 
00283         sprintf(logtarget->pt_->buffer(),
00284                 "T %.9f _%d_ --------------------------------------------------",
00285                 CURRENT_TIME,
00286                 ipaddr());
00287         logtarget->pt_->dump();
00288 }

Here is the call graph for this function:

void toraAgent::logToraDest TORADest td  )  [private]
 

Definition at line 221 of file tora_logs.cc.

References BaseTrace::buffer(), CURRENT_TIME, Height::delta, BaseTrace::dump(), TORADest::height, Height::id, TORADest::index, rtAgent::ipaddr(), logtarget, TORADest::num_active, TORADest::num_down, TORADest::num_up, Height::oid, Trace::pt_, Height::r, TORADest::rt_req, Height::tau, TORADest::time_upd, and verbose.

Referenced by logNextHopChange().

00222 {
00223         if(! verbose) return;
00224 
00225         assert(td);
00226 
00227         sprintf(logtarget->pt_->buffer(),
00228                 "T %.9f _%d_ TD %2d (%9f %2d %2d %2d %2d) --- (%2d a, %2d d, %2d u) %d %9f",
00229                         CURRENT_TIME,
00230                         ipaddr(),
00231                         td->index,
00232                         td->height.tau, td->height.oid, td->height.r,
00233                         td->height.delta, td->height.id,
00234                         td->num_active, td->num_down, td->num_up,
00235                         td->rt_req, td->time_upd);
00236         logtarget->pt_->dump();
00237 }

Here is the call graph for this function:

void toraAgent::logToraNeighbor TORANeighbor tn  )  [private]
 

Definition at line 241 of file tora_logs.cc.

References BaseTrace::buffer(), CURRENT_TIME, Height::delta, BaseTrace::dump(), TORANeighbor::height, Height::id, TORANeighbor::index, rtAgent::ipaddr(), TORANeighbor::lnk_stat, logtarget, Height::oid, Trace::pt_, Height::r, Height::tau, TORANeighbor::time_act, and verbose.

Referenced by logNextHopChange().

00242 {
00243         if(! verbose) return;
00244 
00245         assert(tn);
00246 
00247         sprintf(logtarget->pt_->buffer(),
00248                 "T %.9f _%d_ TN %2d (%.9f %2d %2d %2d %2d) %d %.9f",
00249                 CURRENT_TIME,
00250                 ipaddr(),
00251                 tn->index,
00252                 tn->height.tau,
00253                 tn->height.oid,
00254                 tn->height.r,
00255                 tn->height.delta,
00256                 tn->height.id,
00257                 tn->lnk_stat,
00258                 tn->time_act);
00259         logtarget->pt_->dump();
00260 }

Here is the call graph for this function:

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(), LmsReceiver::send_refresh(), IcmpAgent::sendredirect(), TcpAgent::trace_event(), TcpAgent::traceAll(), TcpAsymAgent::traceAll(), TcpAgent::traceVar(), TcpSessionAgent::traceVar(), and TcpAsymAgent::traceVar().

00097 { return here_.port_; }

void toraAgent::purge_queue void   )  [private]
 

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 toraAgent::recv Packet p,
Handler
[virtual]
 

Reimplemented from Agent.

Definition at line 257 of file tora.cc.

References Connector::drop(), DROP_RTR_ROUTE_LOOP, DROP_RTR_TTL, HDR_CMN, HDR_IP, initialized(), IP_DEF_TTL, IP_HDR_LEN, rtAgent::ipaddr(), PT_TORA, recvTORA(), and rt_resolve().

00258 {
00259         struct hdr_cmn *ch = HDR_CMN(p);
00260         struct hdr_ip *ih = HDR_IP(p);
00261 
00262         assert(initialized());
00263 
00264         if(ch->ptype() == PT_TORA) {
00265                 recvTORA(p);
00266                 return;
00267         }
00268 
00269         /*
00270          *  Must be a packet I'm originating...
00271          */
00272         if(ih->saddr() == ipaddr() && ch->num_forwards() == 0) {
00273                 /*
00274                  *  Add the IP Header.
00275                  */
00276                 ch->size() += IP_HDR_LEN;
00277                 
00278                 ih->ttl_ = IP_DEF_TTL;
00279         }
00280 
00281 #ifdef TORA_DISALLOW_ROUTE_LOOP
00282         /*
00283          *  I received a packet that I sent.  Probably
00284          *  a routing loop.
00285          */
00286         else if(ih->saddr() == ipaddr()) {
00287                 drop(p, DROP_RTR_ROUTE_LOOP);
00288                 return;
00289         }
00290 #endif
00291         /*
00292          *  Packet I'm forwarding...
00293          */
00294         else {
00295                 /*
00296                  *  Check the TTL.  If it is zero, then discard.
00297                  */
00298                 if(--ih->ttl_ == 0) {
00299                         drop(p, DROP_RTR_TTL);
00300                         return;
00301                 }
00302         }
00303 
00304         rt_resolve(p);
00305 }

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 toraAgent::recvCLR Packet p  )  [private]
 

Definition at line 599 of file tora.cc.

References Scheduler::clock(), CURRENT_TIME, dst_add(), dst_find(), HDR_IP, HDR_TORA_CLR, TORANeighbor::height, TORADest::height, index, TORADest::index, TORANeighbor::index, Scheduler::instance(), rtAgent::ipaddr(), Height::isNull(), LINK_DN, LINK_UN, TORANeighbor::lnk_stat, TORADest::nb_find(), TORADest::nblist, nsaddr_t, Height::Null(), TORADest::num_active, TORADest::num_down, TORADest::num_up, Height::oid, Height::r, TORADest::rt_req, sendCLR(), sendUPD(), Height::tau, TORADest::time_upd, trace(), TORADest::update_height(), and Height::Zero().

Referenced by recvTORA().

00600 {
00601         struct hdr_ip *ih = HDR_IP(p);
00602         struct hdr_tora_clr *th = HDR_TORA_CLR(p);
00603         TORADest *td;
00604         TORANeighbor *tn;
00605 
00606         if(th->tc_dst == ipaddr()) {
00607                 return;
00608         }
00609 
00610         td = dst_find(th->tc_dst);
00611         if(td == 0)
00612                 td = dst_add(th->tc_dst);
00613         assert(td);
00614 
00615         if(td->height.tau == th->tc_tau &&
00616            td->height.oid == th->tc_oid &&
00617            td->height.r == 1) {                                 // I
00618                 double temp_tau = td->height.tau;
00619                 nsaddr_t temp_oid = td->height.oid;
00620 
00621                 td->height.Null();
00622                 td->num_up = 0;
00623                 td->num_down = 0;
00624 
00625                 for(tn = td->nblist.lh_first; tn; tn = tn->link.le_next) {
00626                         if(tn->index == td->index) {
00627                                 tn->height.Zero();
00628                                 tn->lnk_stat = LINK_DN;
00629                         }
00630                         else {
00631                                 tn->height.Null();
00632                                 tn->lnk_stat = LINK_UN;
00633                         }
00634                 }
00635                 if(td->num_active > 1) {                        // I, A
00636                         sendCLR(td->index, temp_tau, temp_oid);
00637                 }
00638                 else {                                          // I, B
00639                 }
00640         }
00641         else {
00642                 tn = td->nb_find(ih->saddr());                  // II
00643                 if(tn == 0) {
00644                         /*
00645                          *  XXX - update link status?
00646                          */
00647                         trace("T %.9f _%d_ received `CLR` from non-neighbor %d",
00648                                CURRENT_TIME, index, ih->saddr());               
00649 #ifdef DEBUG
00650                         fprintf(stderr,
00651                                 "node %d received `CLR` from non-neighbor %d\n",
00652                                 index, ih->src_);
00653 #endif
00654                         return;
00655                 }
00656 
00657                 tn->height.Null();
00658                 tn->lnk_stat = LINK_UN;
00659 
00660                 for(tn = td->nblist.lh_first; tn; tn = tn->link.le_next) {
00661                         if(tn->height.tau == th->tc_tau &&
00662                            tn->height.oid == th->tc_oid &&
00663                            tn->height.r == 1) {
00664                                 tn->height.Null();
00665                                 tn->lnk_stat = LINK_UN;
00666                         }
00667                 }
00668                 if(td->num_down == 0) {                         // II, A
00669                         if(td->num_up == 0) {                   // II, A, 1
00670                                 if(td->height.isNull()) {       // II, A, 1, a
00671                                 }
00672                                 else {
00673                                         td->height.Null();
00674                                         td->time_upd = Scheduler::instance().clock();
00675                                         sendUPD(td->index);
00676                                 }
00677                         }
00678                         else {
00679                                 td->update_height(Scheduler::instance().clock(),
00680                                                   ipaddr(),
00681                                                   0,
00682                                                   0,
00683                                                   ipaddr());
00684                                 td->rt_req = 0;
00685                                 td->time_upd = Scheduler::instance().clock();
00686                                 sendUPD(td->index);
00687                         }
00688                 }
00689                 else {
00690                                                                 // II, B
00691                 }
00692         }
00693 }

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 toraAgent::recvQRY Packet p  )  [private]
 

Definition at line 372 of file tora.cc.

References Scheduler::clock(), CURRENT_TIME, Height::delta, dst_add(), dst_find(), HDR_IP, HDR_TORA_QRY, TORANeighbor::height, TORADest::height, TORADest::index, index, Scheduler::instance(), rtAgent::ipaddr(), TORADest::nb_find(), TORADest::nb_find_min_height(), TORADest::num_active, Height::oid, Height::r, TORADest::rt_req, sendQRY(), sendUPD(), Height::tau, TORANeighbor::time_act, TORADest::time_rt_req, TORADest::time_upd, and TORADest::update_height().

Referenced by recvTORA().

00373 {
00374         struct hdr_ip *ih = HDR_IP(p);
00375         struct hdr_tora_qry *qh = HDR_TORA_QRY(p);
00376         TORADest *td;
00377         TORANeighbor *tn;
00378 
00379         if(qh->tq_dst == ipaddr()) {
00380 #ifdef DEBUG
00381                 fprintf(stderr, "node %d received `QRY` for itself.\n", index);
00382 #endif
00383                 return;
00384         }
00385 
00386         td = dst_find(qh->tq_dst);
00387         if(td == 0)
00388                 td = dst_add(qh->tq_dst);
00389 
00390         if(td->rt_req) {
00391                 return;
00392         }
00393 
00394         if(td->height.r == 0) {                                 // II, A
00395                 tn = td->nb_find(ih->saddr());
00396 
00397                 if(tn && tn->time_act > td->time_upd) {         // II, A, 1
00398                         td->time_upd = Scheduler::instance().clock();
00399                         sendUPD(td->index);
00400                 }
00401                 else {                                          // II, A, 2
00402                 }
00403         }
00404         else {
00405                 tn = td->nb_find_min_height(0);
00406 
00407                 if(tn) {                                        // II, B, 1
00408                         td->update_height(tn->height.tau,
00409                                           tn->height.oid,
00410                                           tn->height.r,
00411                                           tn->height.delta + 1,
00412                                           ipaddr());
00413 
00414                         td->time_upd = Scheduler::instance().clock();
00415 
00416                         sendUPD(td->index);
00417                 }
00418                 else {
00419                         td->rt_req = 1;
00420                         td->time_rt_req = CURRENT_TIME;
00421 
00422                         if(td->num_active > 1) {                // II, B, 1, a
00423                                 sendQRY(td->index);
00424                         }
00425                         else {                                  // II, B, 1, b
00426 
00427                         }
00428                 }
00429         }
00430 }

Here is the call graph for this function:

void toraAgent::recvTORA Packet p  )  [private]
 

Definition at line 308 of file tora.cc.

References __PRETTY_FUNCTION__, ARP_SEPARATION_DELAY, rtqueue::deque(), dst_find(), forward(), Packet::free(), HDR_IP, HDR_TORA, TORANeighbor::index, TORADest::index, log_recv_clr(), log_recv_upd(), logNextHopChange(), TORADest::nb_find_next_hop(), recvCLR(), recvQRY(), recvUPD(), rqueue, RT_PORT, Time, TORATYPE_CLR, TORATYPE_QRY, and TORATYPE_UPD.

Referenced by recv().

00309 {
00310         struct hdr_ip *ih = HDR_IP(p);
00311         struct hdr_tora *th = HDR_TORA(p);
00312         TORADest *td;
00313         TORANeighbor *tn;
00314 
00315         /*
00316          * Fix the source IP address.
00317          */
00318         assert(ih->sport() == RT_PORT);
00319         assert(ih->dport() == RT_PORT);
00320 
00321         /*
00322          * Incoming Packets.
00323          */
00324         switch(th->th_type) {
00325                 case TORATYPE_QRY:
00326                         recvQRY(p);
00327                         Packet::free(p);
00328                         return;         // don't add/change routing state
00329 
00330                 case TORATYPE_UPD:
00331                         log_recv_upd(p);
00332                         recvUPD(p);
00333                         break;
00334 
00335                 case TORATYPE_CLR:
00336                         log_recv_clr(p);
00337                         recvCLR(p);
00338                         break;
00339 
00340                 default:
00341                         fprintf(stderr,
00342                                 "%s: Invalid TORA type (%x)\n",
00343                                 __PRETTY_FUNCTION__, th->th_type);
00344                         exit(1);
00345         }
00346 
00347         if((td = dst_find(th->th_dst)) == 0) {
00348                 Packet::free(p);
00349                 return;
00350         }
00351 
00352         logNextHopChange(td);
00353 
00354         if((tn = td->nb_find_next_hop())) {
00355                 Packet *p0;
00356                 Time delay = 0.0;
00357 
00358                 while((p0 = rqueue.deque(td->index))) {
00359                         forward(p0, tn->index, delay);
00360                         delay += ARP_SEPARATION_DELAY;
00361                 }
00362         }
00363         Packet::free(p);
00364 }

Here is the call graph for this function:

void toraAgent::recvUPD Packet p  )  [private]
 

Definition at line 437 of file tora.cc.

References BaseTrace::buffer(), Scheduler::clock(), CURRENT_TIME, Height::delta, dst_add(), dst_find(), BaseTrace::dump(), HDR_IP, HDR_TORA_UPD, TORADest::height, TORANeighbor::height, TORANeighbor::index, TORADest::index, index, Scheduler::instance(), rtAgent::ipaddr(), Height::isNull(), LINK_DN, LINK_UN, TORANeighbor::lnk_stat, logtarget, TORADest::nb_check_same_ref(), TORADest::nb_find(), TORADest::nb_find_max_height(), TORADest::nb_find_min_height(), TORADest::nb_find_min_nonnull_height(), TORADest::nblist, nsaddr_t, Height::Null(), TORADest::num_down, TORADest::num_up, Height::oid, Trace::pt_, Height::r, TORADest::rt_req, sendCLR(), sendUPD(), Height::tau, TORADest::time_upd, trace(), TORADest::update_height(), TORADest::update_height_nb(), and Height::Zero().

Referenced by recvTORA().

00438 {
00439         struct hdr_ip *ih = HDR_IP(p);
00440         struct hdr_tora_upd *uh = HDR_TORA_UPD(p);
00441         TORADest *td;
00442         TORANeighbor *tn;
00443 
00444         if(uh->tu_dst == ipaddr()) {
00445                 return;
00446         }
00447 
00448         td = dst_find(uh->tu_dst);
00449         if(td == 0)
00450                 td = dst_add(uh->tu_dst);
00451 
00452         tn = td->nb_find(ih->saddr());
00453         if(tn == 0) {
00454                 /*
00455                  * update link status? -josh
00456                  */
00457 
00458                  // No, don't update linkstatus: it may be an update
00459                  // that was delayed in the IMEP layer for sequencing -dam
00460                  // no way at the TORA level to tell if we're connected...
00461                  trace("T %.9f _%d_ received `UPD` from non-neighbor %d",
00462                        CURRENT_TIME, ipaddr(), ih->saddr());             
00463 #ifdef DEBUG
00464                 fprintf(stderr,
00465                         "node %d received `UPD` from non-neighbor %d\n",
00466                         index, ih->src_);
00467 #endif
00468                 return;
00469         }
00470 
00471         /*
00472          *  Update height and link status for neighbor [j][k].
00473          */
00474         td->update_height_nb(tn, uh);
00475 
00476         if(td->rt_req && tn->height.r == 0) {                                                           // I
00477 
00478                 td->update_height(tn->height.tau,
00479                                   tn->height.oid,
00480                                   tn->height.r,
00481                                   tn->height.delta + 1,
00482                                   ipaddr());
00483 
00484                 td->rt_req = 0;
00485 
00486                 td->time_upd = Scheduler::instance().clock();
00487 
00488                 sendUPD(td->index);
00489         }
00490         else if(td->num_down == 0) {                                                                    // II
00491                 if(td->num_up == 0) {                                                                   // II, A
00492                         if(td->height.isNull())                                                         // II, A, 1
00493                                 return;                                                                 // II, A, 1, a
00494                         else {
00495                                 td->height.Null();                                                      // II, A, 1, b 
00496 
00497                                 td->time_upd = Scheduler::instance().clock();
00498 
00499                                 sendUPD(td->index);
00500                         }
00501                 }
00502                 else {
00503                         if(td->nb_check_same_ref()) {                                                   // II, A, 2
00504                                 TORANeighbor *tn;
00505 
00506                                 if( (tn = td->nb_find_min_height(0)) ) {                        // II, A, 2, a
00507                                         td->update_height(tn->height.tau,                               // II, A, 2, a, i 
00508                                                           tn->height.oid,
00509                                                           1,
00510                                                           0,
00511                                                           ipaddr());
00512                                         td->time_upd = Scheduler::instance().clock();
00513 
00514                                         sendUPD(td->index);
00515                                 }
00516                                 else {
00517                                         if(td->height.oid == ipaddr()) {                                        // II, A, 2, a, ii
00518                                                 double temp_tau = td->height.tau;                       // II, A, 2, a, ii, x 
00519                                                 nsaddr_t temp_oid = td->height.oid;
00520 
00521                                                 td->height.Null();
00522                                                 td->num_down = 0;
00523                                                 td->num_up = 0;
00524 
00525                                                 /*
00526                                                  *  For every active link n, if the neighbor connected
00527                                                  *  via link n is the destination j, set HT_NEIGH[j][n]=ZERO
00528                                                  *  and LNK_STAT[j][n] = DN.
00529                                                  *  Otherwise, set HT_NEIGH[j][n] = NULL and LNK_STAT[j][n] = UN.
00530                                                  */
00531                                                 for(tn = td->nblist.lh_first; tn; tn = tn->link.le_next) {
00532                                                         if(tn->index == td->index) {
00533                                                                 tn->height.Zero();
00534                                                                 tn->lnk_stat = LINK_DN;
00535 
00536                                                         }
00537                                                         else {
00538                                                                 tn->height.Null();
00539                                                                 tn->lnk_stat = LINK_UN;
00540                                                         }
00541                                                 }
00542 
00543                                                 sendCLR(td->index, temp_tau, temp_oid);
00544                                         }
00545                                         else {
00546                                                 td->update_height(Scheduler::instance().clock(),        // II, A, 2, a, ii, y
00547                                                                   ipaddr(),
00548                                                                   0,
00549                                                                   0,
00550                                                                   ipaddr());
00551                                                 td->rt_req = 0;
00552                                                 td->time_upd = Scheduler::instance().clock();
00553 
00554 #ifdef DEBUG
00555                                                 // under what circumstances does this rule fire?
00556                                                 // seems like it will prevent the detection of 
00557                                                 // partitions...??? -dam 8/24/98
00558 
00559                                                 if (logtarget) 
00560                                                   {
00561                                                     sprintf(logtarget->pt_->buffer(), "T %.9f _%d_ rule IIA2a(ii)x fires %d",
00562                                                             Scheduler::instance().clock(), ipaddr(), td->index);
00563                                                     logtarget->pt_->dump();
00564                                                   }
00565 #endif
00566                                                 sendUPD(td->index);
00567                                         }
00568                                 }
00569 
00570                         }
00571                         else {
00572                                 TORANeighbor *n = td->nb_find_max_height();                             // II, A, 2, b
00573                                 assert(n);
00574                                 TORANeighbor *m = td->nb_find_min_nonnull_height(&n->height);
00575                                 assert(m);
00576 
00577                                 td->update_height(m->height.tau,
00578                                                   m->height.oid,
00579                                                   m->height.r,
00580                                                   m->height.delta - 1,
00581                                                   ipaddr());
00582 
00583                                 td->time_upd = Scheduler::instance().clock();
00584 
00585                                 sendUPD(td->index);
00586                         }
00587                 }
00588         }
00589         else {                                                                                          // II, B
00590 
00591         }
00592 }

Here is the call graph for this function:

void toraAgent::reset  )  [private, virtual]
 

Reimplemented from NsObject.

Definition at line 97 of file tora.cc.

References rtqueue::deque(), Connector::drop(), DROP_END_OF_SIMULATION, and rqueue.

00098 {
00099         Packet *p;
00100         while((p = rqueue.deque())) {
00101                 drop(p,DROP_END_OF_SIMULATION);
00102         }
00103 }

Here is the call graph for this function:

void toraAgent::rt_resolve Packet p  )  [private]
 

Definition at line 221 of file tora.cc.

References CURRENT_TIME, dst_add(), dst_find(), rtqueue::enque(), forward(), HDR_IP, TORANeighbor::index, Scheduler::instance(), rtAgent::ipaddr(), TORADest::nb_find_next_hop(), rqueue, TORADest::rt_req, sendQRY(), TORADest::time_tx_qry, and trace().

Referenced by recv(), rtNotifyLinkDN(), and rtRoutePacket().

00222 {
00223         struct hdr_ip *ih = HDR_IP(p);
00224         TORADest *td;
00225         TORANeighbor *tn;
00226 
00227         td = dst_find(ih->daddr());
00228         if(td == 0) {
00229                 td = dst_add(ih->daddr());
00230         }
00231 
00232         tn = td->nb_find_next_hop();
00233         if(tn == 0) {
00234                 rqueue.enque(p);
00235 
00236                 trace("T %.9f _%d_ tora enq %d->%d",
00237                       Scheduler::instance().clock(), ipaddr(), 
00238                       ih->saddr(), ih->daddr());
00239 
00240                 if(!td->rt_req)
00241                   { // if no QRY pending, then send one
00242                     sendQRY(ih->daddr());
00243                     td->time_tx_qry = CURRENT_TIME;
00244                     td->rt_req = 1;
00245                   }
00246         }
00247         else {
00248                 forward(p, tn->index);
00249         }
00250 }

Here is the call graph for this function:

void toraAgent::rtNotifyLinkDN nsaddr_t  index  )  [virtual]
 

Implements rtAgent.

Definition at line 76 of file tora_api.cc.

References dstlist, TORADest::index, log_link_layer_recycle(), TORADest::nb_del(), Packet::next_, rt_resolve(), and sendUPD().

00077 {
00078         TORADest *td = dstlist.lh_first;
00079 
00080         /*
00081          *  Purge each Destination's Neighbor List
00082          */
00083         for( ; td; td = td->link.le_next) {
00084                 if(td->nb_del(index)) {
00085                         /*
00086                          * Send an UPD packet if you've lost the last
00087                          * downstream link.
00088                          */
00089                         sendUPD(td->index);
00090                 }
00091         }
00092 
00093         /*
00094          *  Now purge the Network Interface queues that
00095          *  may have packets destined for this broken
00096          *  neighbor.
00097          */
00098         {
00099                 Packet *head = 0;
00100                 Packet *p;
00101                 Packet *np = 0;
00102 
00103                 while((p = ifqueue->filter(index))) {
00104                         p->next_ = head;
00105                         head = p;
00106                 }
00107 
00108                 for(p = head; p; p = np) {
00109                         np = p->next_;
00110                         /*
00111                          * This make a lot of sense for TORA since we
00112                          * will almost always have multiple routes to
00113                          * a destination.
00114                          */
00115                         log_link_layer_recycle(p);
00116                         rt_resolve(p);
00117                 }
00118         }
00119 }

Here is the call graph for this function:

void toraAgent::rtNotifyLinkStatus nsaddr_t  index,
u_int32_t  status
[virtual]
 

Implements rtAgent.

Definition at line 123 of file tora_api.cc.

References abort().

00124 {
00125         abort();
00126 }

Here is the call graph for this function:

void toraAgent::rtNotifyLinkUP nsaddr_t  index  )  [virtual]
 

Implements rtAgent.

Definition at line 48 of file tora_api.cc.

References CURRENT_TIME, dstlist, TORADest::index, Scheduler::instance(), rtAgent::ipaddr(), TORADest::nb_add(), TORADest::nb_find(), TORADest::rt_req, sendQRY(), TORADest::time_tx_qry, and trace().

00049 {
00050         TORADest *td = dstlist.lh_first;
00051 
00052         /*
00053          * Update the destination lists...
00054          */
00055         for( ; td; td = td->link.le_next) {
00056                 if(td->nb_find(index) == 0) {
00057                         (void) td->nb_add(index);
00058                 }
00059                 if (td->rt_req) 
00060                   { // must send a new query for this dest so the new
00061                     // neighbor can hear it
00062                     // IMEP will take care of aggregating all these into
00063                     // one physical pkt
00064 
00065                     trace("T %.9f _%d_ QRY %d for %d (rtreq set)",
00066                           Scheduler::instance().clock(), ipaddr(), 
00067                           td->index, index);
00068 
00069                     sendQRY(td->index);
00070                     td->time_tx_qry = CURRENT_TIME;
00071                 }
00072         }
00073 }

Here is the call graph for this function:

void toraAgent::rtRoutePacket Packet p  )  [virtual]
 

Implements rtAgent.

Definition at line 129 of file tora_api.cc.

References DATA_PACKET, Connector::drop(), DROP_RTR_MAC_CALLBACK, HDR_CMN, HDR_IP, IP_BROADCAST, nsaddr_t, and rt_resolve().

00130 {
00131         struct hdr_cmn *ch = HDR_CMN(p);
00132         struct hdr_ip *ip = HDR_IP(p);
00133 
00134         // Non-data packets and BROADCAST packets can be dropped.
00135         if(DATA_PACKET(ch->ptype()) == 0 || 
00136            ip->daddr() == (nsaddr_t) IP_BROADCAST) {
00137                 drop(p, DROP_RTR_MAC_CALLBACK);
00138                 return;
00139         }
00140 
00141         rt_resolve(p);
00142 }

Here is the call graph for this function:

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 toraAgent::sendCLR nsaddr_t  id,
double  tau,
nsaddr_t  oid
[private]
 

Definition at line 119 of file tora_io.cc.

References Packet::alloc(), CLR_HDR_LEN, HDR_CMN, HDR_IP, HDR_TORA_CLR, IP_BROADCAST, rtAgent::ipaddr(), NS_AF_NONE, PT_TORA, RT_PORT, tora_output(), TORATYPE_CLR, and Agent::uidcnt_.

Referenced by recvCLR(), and recvUPD().

00120 {
00121         Packet *p = Packet::alloc();
00122         struct hdr_cmn *ch = HDR_CMN(p);
00123         struct hdr_ip *ih = HDR_IP(p);
00124         struct hdr_tora_clr *th = HDR_TORA_CLR(p);
00125 
00126         ch->uid() = uidcnt_++;
00127         ch->ptype() = PT_TORA;
00128         ch->size() = CLR_HDR_LEN;
00129         ch->iface() = -2;
00130         ch->error() = 0;
00131         ch->addr_type() = NS_AF_NONE;
00132         ch->prev_hop_ = ipaddr();
00133 
00134         ih->saddr() = ipaddr();
00135         ih->daddr() = IP_BROADCAST;
00136         ih->sport() = RT_PORT;
00137         ih->dport() = RT_PORT;
00138         ih->ttl_ = 1;
00139 
00140         th->tc_type = TORATYPE_CLR;
00141         th->tc_dst = id;
00142         th->tc_tau = tau;
00143         th->tc_oid = oid;
00144 
00145         tora_output(p);
00146 }

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:

void toraAgent::sendQRY nsaddr_t  id  )  [private]
 

Definition at line 49 of file tora_io.cc.

References Packet::alloc(), HDR_CMN, HDR_IP, HDR_TORA_QRY, Scheduler::instance(), IP_BROADCAST, rtAgent::ipaddr(), NS_AF_NONE, PT_TORA, QRY_HDR_LEN, RT_PORT, tora_output(), TORATYPE_QRY, trace(), and Agent::uidcnt_.

Referenced by recvQRY(), rt_resolve(), and rtNotifyLinkUP().

00050 {
00051         Packet *p = Packet::alloc();
00052         struct hdr_cmn *ch = HDR_CMN(p);
00053         struct hdr_ip *ih = HDR_IP(p);
00054         struct hdr_tora_qry *th = HDR_TORA_QRY(p);
00055 
00056         ch->uid() = uidcnt_++;
00057         ch->ptype() = PT_TORA;
00058         ch->size() = QRY_HDR_LEN;
00059         ch->iface() = -2;
00060         ch->error() = 0;
00061         ch->addr_type() = NS_AF_NONE;
00062         ch->prev_hop_ = ipaddr();
00063 
00064         ih->saddr() = ipaddr();
00065         ih->daddr() = IP_BROADCAST;
00066         ih->sport() = RT_PORT;
00067         ih->dport() = RT_PORT;
00068         ih->ttl_ = 1;
00069 
00070         th->tq_type = TORATYPE_QRY;
00071         th->tq_dst = id;
00072 
00073         trace("T %.9f _%d_ tora sendQRY %d",
00074               Scheduler::instance().clock(), ipaddr(), id);
00075 
00076         tora_output(p);
00077 }

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 toraAgent::sendUPD nsaddr_t  id  )  [private]
 

Definition at line 81 of file tora_io.cc.

References Packet::alloc(), Height::delta, dst_find(), HDR_CMN, HDR_IP, HDR_TORA_UPD, TORADest::height, Height::id, IP_BROADCAST, rtAgent::ipaddr(), NS_AF_NONE, Height::oid, PT_TORA, Height::r, RT_PORT, Height::tau, tora_output(), TORATYPE_UPD, Agent::uidcnt_, and UPD_HDR_LEN.

Referenced by recvCLR(), recvQRY(), recvUPD(), and rtNotifyLinkDN().

00082 {
00083         Packet *p = Packet::alloc();
00084         struct hdr_cmn *ch = HDR_CMN(p);
00085         struct hdr_ip *ih = HDR_IP(p);
00086         struct hdr_tora_upd *th = HDR_TORA_UPD(p);
00087         TORADest *td;
00088 
00089         td = dst_find(id);
00090         assert(td);
00091 
00092         ch->uid() = uidcnt_++;
00093         ch->ptype() = PT_TORA;
00094         ch->size() = UPD_HDR_LEN;
00095         ch->iface() = -2;
00096         ch->error() = 0;
00097         ch->addr_type() = NS_AF_NONE;
00098         ch->prev_hop_ = ipaddr();
00099 
00100         ih->saddr() = ipaddr();
00101         ih->daddr() = IP_BROADCAST;
00102         ih->sport() = RT_PORT;
00103         ih->dport() = RT_PORT;
00104         ih->ttl_ = 1;
00105 
00106         th->tu_type = TORATYPE_UPD;
00107         th->tu_dst = id;
00108         th->tu_tau = td->height.tau;
00109         th->tu_oid = td->height.oid;
00110         th->tu_r = td->height.r;
00111         th->tu_delta = td->height.delta;
00112         th->tu_id = td->height.id;
00113 
00114         tora_output(p);
00115 }

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 toraAgent::tora_output Packet p  )  [private]
 

Definition at line 149 of file tora_io.cc.

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

Referenced by forward(), sendCLR(), sendQRY(), and sendUPD().

00150 {
00151         target_->recv(p, (Handler*) 0);
00152 }

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:

void toraAgent::trace char *  fmt,
... 
[private]
 

Definition at line 696 of file tora.cc.

References BaseTrace::buffer(), BaseTrace::dump(), logtarget, and Trace::pt_.

Referenced by recvCLR(), recvUPD(), rt_resolve(), rtNotifyLinkUP(), and sendQRY().

00697 {
00698   va_list ap;
00699   
00700   if (!logtarget) return;
00701 
00702   va_start(ap, fmt);
00703   vsprintf(logtarget->pt_->buffer(), fmt, ap);
00704   logtarget->pt_->dump();
00705   va_end(ap);
00706 }

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 {}


Friends And Related Function Documentation

friend class TORADest [friend]
 

Definition at line 75 of file tora.h.

Referenced by dst_add().

friend class TORANeighbor [friend]
 

Definition at line 74 of file tora.h.


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

td_head toraAgent::dstlist [private]
 

Definition at line 131 of file tora.h.

Referenced by dst_add(), dst_dump(), dst_find(), log_route_table(), rtNotifyLinkDN(), rtNotifyLinkUP(), and toraAgent().

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

PriQueue* toraAgent::ifqueue [private]
 

Definition at line 154 of file tora.h.

imepAgent* toraAgent::imepagent [private]
 

Definition at line 133 of file tora.h.

Referenced by command(), dst_add(), initialized(), and toraAgent().

nsaddr_t toraAgent::index [private]
 

Definition at line 93 of file tora.h.

Referenced by command(), recvCLR(), recvQRY(), and recvUPD().

Trace* toraAgent::logtarget [private]
 

Definition at line 140 of file tora.h.

Referenced by command(), initialized(), log_link_layer_feedback(), log_link_layer_recycle(), log_lnk_del(), log_lnk_kept(), log_nb_del(), log_recv_clr(), log_recv_qry(), log_recv_upd(), log_route_loop(), log_route_table(), logNbDeletedLastDN(), logNextHopChange(), logToraDest(), logToraNeighbor(), recvUPD(), toraAgent(), and trace().

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

rtqueue toraAgent::rqueue [private]
 

Definition at line 148 of file tora.h.

Referenced by command(), recvTORA(), reset(), and rt_resolve().

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::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(), LmsReceiver::send_nak(), IntTcpAgent::send_one(), LmsReceiver::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(), 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(), LmsReceiver::send_dmcast(), LmsAgent::send_downstream(), SSMSRMAgent::send_glb_sess(), LmsSender::send_lms_pkt(), SSMSRMAgent::send_loc_sess(), MFTPRcvAgent::send_nak(), LmsReceiver::send_nak(), LmsReceiver::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 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(), sendCLR(), imepAgent::sendHello(), sendQRY(), DSRAgent::sendUnknownFlow(), sendUPD(), and DSRAgent::xmitFailed().


The documentation for this class was generated from the following files:
Generated on Tue Apr 20 13:33:20 2004 for NS2.26SourcesOriginal by doxygen 1.3.3