#include <tcp-sink.h>
Inheritance diagram for TcpSink:


Public Member Functions | |
| TcpSink (Acker *) | |
| void | recv (Packet *pkt, Handler *) |
| void | reset () |
| int | command (int argc, const char *const *argv) |
| TracedInt & | maxsackblocks () |
| 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_t & | addr () |
| nsaddr_t & | port () |
| nsaddr_t & | daddr () |
| nsaddr_t & | dport () |
| void | set_pkttype (packet_t pkttype) |
| packet_t | get_pkttype () |
| NsObject * | target () |
| virtual void | drop (Packet *p) |
| int | isdebug () const |
| virtual void | debug (const char *fmt,...) |
Protected Member Functions | |
| void | ack (Packet *) |
| virtual void | add_to_ack (Packet *pkt) |
| 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 () |
| Packet * | allocpkt () const |
| Packet * | allocpkt (int) const |
| void | initpkt (Packet *) const |
| virtual void | trace (TracedVar *v) |
| void | deleteAgentTrace () |
| void | addAgentTrace (const char *name) |
| void | monitorAgentTrace () |
| OldValue * | lookupOldValue (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 | |
| Acker * | acker_ |
| int | ts_echo_bugfix_ |
| TracedInt | max_sack_blocks_ |
| Packet * | save_ |
| int | generate_dsacks_ |
| int | qs_enabled_ |
| int | RFC2581_immediate_ack_ |
| int | bytes_ |
| double | lastreset_ |
| 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_ |
| OldValue * | oldValueList_ |
| Application * | app_ |
| EventTrace * | et_ |
| NsObject * | target_ |
| NsObject * | drop_ |
| int | debug_ |
Static Protected Attributes | |
| int | uidcnt_ |
Friends | |
| void | Sacker::configure (TcpSink *) |
|
|
Definition at line 174 of file tcp-sink.cc. References bytes_, max_sack_blocks_, and PT_ACK.
00174 : Agent(PT_ACK), acker_(acker), save_(NULL), 00175 lastreset_(0.0) 00176 { 00177 bytes_ = 0; 00178 00179 /* 00180 * maxSackBlocks_ does wierd tracing things. 00181 * don't make it delay-bound yet. 00182 */ 00183 #if defined(TCP_DELAY_BIND_ALL) && 0 00184 #else /* ! TCP_DELAY_BIND_ALL */ 00185 bind("maxSackBlocks_", &max_sack_blocks_); // used only by sack 00186 #endif /* TCP_DELAY_BIND_ALL */ 00187 } |
|
|
Reimplemented in QSTcpSink. Definition at line 254 of file tcp-sink.cc. References hdr_cmn::access(), hdr_flags::access(), hdr_qs::access(), hdr_ip::access(), hdr_tcp::access(), acker_, add_to_ack(), Agent::allocpkt(), Acker::append_ack(), hdr_flags::ce(), Scheduler::clock(), hdr_flags::cong_action(), Acker::ecn_unacked(), hdr_flags::ecnecho(), hdr_flags::ect(), hdr_qs::flag(), hdr_ip::flowid(), Scheduler::instance(), MWS, QS_DISABLE, qs_enabled_, QS_REQUEST, QS_RESPONSE, hdr_qs::rate(), save_, Agent::send(), Acker::Seqno(), hdr_tcp::seqno(), sf, hdr_tcp::ts(), hdr_tcp::ts_echo(), ts_echo_bugfix_, Acker::ts_to_echo(), hdr_ip::ttl(), hdr_qs::ttl(), and Acker::update_ecn_unacked(). Referenced by DelAckSink::recv(), recv(), TcpAsymSink::recv(), DelAckSink::timeout(), and TcpAsymSink::timeout().
00255 {
00256 Packet* npkt = allocpkt();
00257 // opkt is the "old" packet that was received
00258 // npkt is the "new" packet being constructed (for the ACK)
00259 double now = Scheduler::instance().clock();
00260 hdr_flags *sf;
00261
00262 hdr_tcp *otcp = hdr_tcp::access(opkt);
00263 hdr_ip *oiph = hdr_ip::access(opkt);
00264 hdr_tcp *ntcp = hdr_tcp::access(npkt);
00265
00266 if (qs_enabled_) {
00267 // QuickStart code from Srikanth Sundarrajan.
00268 hdr_qs *oqsh = hdr_qs::access(opkt);
00269 hdr_qs *nqsh = hdr_qs::access(npkt);
00270 if (otcp->seqno() == 0 && oqsh->flag() == QS_REQUEST) {
00271 nqsh->flag() = QS_RESPONSE;
00272 nqsh->ttl() = (oiph->ttl() - oqsh->ttl()) % 256;
00273 nqsh->rate() = (oqsh->rate() < MWS) ? oqsh->rate() : MWS;
00274 }
00275 else {
00276 nqsh->flag() = QS_DISABLE;
00277 }
00278 }
00279
00280
00281 // get the tcp headers
00282 ntcp->seqno() = acker_->Seqno();
00283 // get the cumulative sequence number to put in the ACK; this
00284 // is just the left edge of the receive window - 1
00285 ntcp->ts() = now;
00286 // timestamp the packet
00287
00288 if (ts_echo_bugfix_) /* TCP/IP Illustrated, Vol. 2, pg. 870 */
00289 ntcp->ts_echo() = acker_->ts_to_echo();
00290 else
00291 ntcp->ts_echo() = otcp->ts();
00292 // echo the original's time stamp
00293
00294 hdr_ip* oip = hdr_ip::access(opkt);
00295 hdr_ip* nip = hdr_ip::access(npkt);
00296 // get the ip headers
00297 nip->flowid() = oip->flowid();
00298 // copy the flow id
00299
00300 hdr_flags* of = hdr_flags::access(opkt);
00301 hdr_flags* nf = hdr_flags::access(npkt);
00302 if (save_ != NULL)
00303 sf = hdr_flags::access(save_);
00304 // Look at delayed packet being acked.
00305 if ( (save_ != NULL && sf->cong_action()) || of->cong_action() )
00306 // Sender has responsed to congestion.
00307 acker_->update_ecn_unacked(0);
00308 if ( (save_ != NULL && sf->ect() && sf->ce()) ||
00309 (of->ect() && of->ce()) )
00310 // New report of congestion.
00311 acker_->update_ecn_unacked(1);
00312 if ( (save_ != NULL && sf->ect()) || of->ect() )
00313 // Set EcnEcho bit.
00314 nf->ecnecho() = acker_->ecn_unacked();
00315 if (!of->ect() && of->ecnecho() ||
00316 (save_ != NULL && !sf->ect() && sf->ecnecho()) )
00317 // This is the negotiation for ECN-capability.
00318 // We are not checking for of->cong_action() also.
00319 // In this respect, this does not conform to the
00320 // specifications in the internet draft
00321 nf->ecnecho() = 1;
00322 acker_->append_ack(hdr_cmn::access(npkt),
00323 ntcp, otcp->seqno());
00324 add_to_ack(npkt);
00325 // the above function is used in TcpAsymSink
00326
00327 send(npkt, 0);
00328 // send it
00329 }
|
Here is the call graph for this function:

|
|
Reimplemented in TcpAsymSink. Definition at line 331 of file tcp-sink.cc. Referenced by ack(), and QSTcpSink::ack().
00332 {
00333 return;
00334 }
|
|
|
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:

|
|
|
Definition at line 517 of file agent.cc. References Packet::allocdata(), and Agent::allocpkt().
|
Here is the call graph for this function:

|
Here is the call graph for this function:

|
|
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 }
|
|
|
Reimplemented in FullTcpAgent. Definition at line 377 of file agent.cc. Referenced by Agent::command().
00378 {
00379 }
|
|
||||||||||||
|
Reimplemented from Agent. Definition at line 229 of file tcp-sink.cc. References Agent::command(), and reset().
00230 {
00231 if (argc == 2) {
00232 if (strcmp(argv[1], "reset") == 0) {
00233 reset();
00234 return (TCL_OK);
00235 }
00236 if (strcmp(argv[1], "resize_buffers") == 0) {
00237 // no need for this as seen buffer set dynamically
00238 fprintf(stderr,"DEPRECIATED: resize_buffers\n");
00239 return (TCL_OK);
00240 }
00241 }
00242
00243 return (Agent::command(argc, argv));
00244 }
|
Here is the call graph for this function:

|
|
Definition at line 389 of file agent.cc. Referenced by Agent::command().
00390 {
00391 /*
00392 dst_ = dst;
00393 */
00394 }
|
|
|
||||||||||||
|
Definition at line 102 of file object.cc. References NsObject::debug_.
00103 {
00104 if (!debug_)
00105 return;
00106 va_list ap;
00107 va_start(ap, fmt);
00108 vprintf(fmt, ap);
00109 }
|
|
||||||||||||||||
|
Reimplemented from Agent. Definition at line 206 of file tcp-sink.cc. References Agent::delay_bind_dispatch(), generate_dsacks_, max_sack_blocks_, qs_enabled_, RFC2581_immediate_ack_, Agent::size_, and ts_echo_bugfix_.
00207 {
00208 if (delay_bind(varName, localName, "packetSize_", &size_, tracer)) return TCL_OK;
00209 if (delay_bind_bool(varName, localName, "ts_echo_bugfix_", &ts_echo_bugfix_, tracer)) return TCL_OK;
00210 if (delay_bind_bool(varName, localName, "generateDSacks_", &generate_dsacks_, tracer)) return TCL_OK;
00211 if (delay_bind_bool(varName, localName, "qs_enabled_", &qs_enabled_, tracer)) return TCL_OK;
00212 if (delay_bind_bool(varName, localName, "RFC2581_immediate_ack_", &RFC2581_immediate_ack_, tracer)) return TCL_OK;
00213 #if defined(TCP_DELAY_BIND_ALL) && 0
00214 if (delay_bind(varName, localName, "maxSackBlocks_", &max_sack_blocks_, tracer)) return TCL_OK;
00215 #endif /* TCP_DELAY_BIND_ALL */
00216
00217 return Agent::delay_bind_dispatch(varName, localName, tracer);
00218 }
|
Here is the call graph for this function:

|
|
Reimplemented from Agent. Definition at line 190 of file tcp-sink.cc. References Agent::delay_bind_init_all().
00191 {
00192 delay_bind_init_one("packetSize_");
00193 delay_bind_init_one("ts_echo_bugfix_");
00194 delay_bind_init_one("bytes_"); // For throughput measurements in JOBS
00195 delay_bind_init_one("generateDSacks_"); // used only by sack
00196 delay_bind_init_one("qs_enabled_");
00197 delay_bind_init_one("RFC2581_immediate_ack_");
00198 #if defined(TCP_DELAY_BIND_ALL) && 0
00199 delay_bind_init_one("maxSackBlocks_");
00200 #endif /* TCP_DELAY_BIND_ALL */
00201
00202 Agent::delay_bind_init_all();
00203 }
|
Here is the call graph for this function:

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

|
|
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().
|
|
||||||||||||
|
Definition at line 114 of file connector.cc. References Connector::drop_, Packet::free(), and NsObject::recv().
00115 {
00116 if (drop_ != 0)
00117 drop_->recv(p, s);
00118 else
00119 Packet::free(p);
00120 }
|
Here is the call graph for this function:

|
Here is the call graph for this function:

|
|
|
|
|
Definition at line 101 of file agent.h. References packet_t, and Agent::type_. Referenced by CBR_Traffic::init().
00101 { return type_; }
|
|
|
Implements Handler. Reimplemented in LinkDelay, LL, AckRecons, and Snoop. Definition at line 91 of file object.cc. References NsObject::recv().
|
Here is the call graph for this function:

|
|
Definition at line 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().
|
Here is the call graph for this function:

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

|
||||||||||||
|
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 }
|
|
|
Definition at line 61 of file object.h. References NsObject::debug_.
00061 { return debug_; }
|
|
|
Reimplemented in BayFullTcpAgent, RapAgent, and FullTcpAgent. Definition at line 381 of file agent.cc. Referenced by Agent::command().
00382 {
00383 }
|
|
|
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 }
|
|
|
Definition at line 103 of file tcp-sink.h. References max_sack_blocks_.
00103 { return max_sack_blocks_; }
|
|
|
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:

|
|
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().
|
|
||||||||||||
|
Reimplemented in CMUTrace. Definition at line 96 of file object.cc. References Packet::free().
00097 {
00098 Packet::free(p);
00099 }
|
Here is the call graph for this function:

|
||||||||||||
|
Reimplemented from Agent. Reimplemented in TcpAsymSink, QSTcpSink, and DelAckSink. Definition at line 337 of file tcp-sink.cc. References hdr_tcp::access(), hdr_cmn::access(), ack(), acker_, Packet::free(), lastreset_, Agent::recvBytes(), hdr_tcp::seqno(), hdr_cmn::size(), hdr_tcp::ts(), Acker::update(), and Acker::update_ts().
00338 {
00339 int numToDeliver;
00340 int numBytes = hdr_cmn::access(pkt)->size();
00341 // number of bytes in the packet just received
00342 hdr_tcp *th = hdr_tcp::access(pkt);
00343 /* W.N. Check if packet is from previous incarnation */
00344 if (th->ts() < lastreset_) {
00345 // Remove packet and do nothing
00346 Packet::free(pkt);
00347 return;
00348 }
00349 acker_->update_ts(th->seqno(),th->ts());
00350 // update the timestamp to echo
00351
00352 numToDeliver = acker_->update(th->seqno(), numBytes);
00353 // update the recv window; figure out how many in-order-bytes
00354 // (if any) can be removed from the window and handed to the
00355 // application
00356 if (numToDeliver)
00357 recvBytes(numToDeliver);
00358 // send any packets to the application
00359 ack(pkt);
00360 // ACK the packet
00361 Packet::free(pkt);
00362 // remove it from the system
00363 }
|
Here is the call graph for this function:

|
|
Definition at line 354 of file agent.cc. References Agent::app_, and Application::recv(). Referenced by DelAckSink::recv(), recv(), QSTcpSink::recv(), FullTcpAgent::recv(), and TcpAsymSink::recv().
|
Here is the call graph for this function:

|
|
Reimplemented from NsObject. Definition at line 78 of file agent.h.
00078 {};
|
|
|
Reimplemented from NsObject. Reimplemented in DelAckSink. Definition at line 246 of file tcp-sink.cc. References acker_, Scheduler::clock(), Scheduler::instance(), lastreset_, Acker::reset(), and save_. Referenced by command(), and DelAckSink::reset().
00247 {
00248 acker_->reset();
00249 save_ = NULL;
00250 lastreset_ = Scheduler::instance().clock(); /* W.N. - for detecting */
00251 /* packets from previous incarnations */
00252 }
|
Here is the call graph for this function:

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

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

|
||||||||||||
Here is the call graph for this function:

|
||||||||||||
|
Reimplemented in SA_Agent, RTPAgent, UdpAgent, LmsSender, SRMAgent, FullTcpAgent, TcpAgent, TfrcAgent, and SimpleTcpAgent. Definition at line 415 of file agent.cc.
00416 {
00417 }
|
|
||||||||||||||||
|
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:

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

|
|
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; }
|
|
|
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_; }
|
|
|
Definition at line 48 of file connector.h. References Connector::target_. Referenced by JoBS::assignRateDropsADC(), FQ::deque(), QSAgent::recv(), and MIPMHAgent::reg().
00048 { return target_; }
|
|
|
Reimplemented in 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 }
|
|
|
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:

|
|
Reimplemented in TcpAgent. Definition at line 146 of file agent.h.
00146 {}
|
|
|
|
|
|
Definition at line 111 of file tcp-sink.h. Referenced by ack(), QSTcpSink::ack(), DelAckSink::recv(), recv(), QSTcpSink::recv(), TcpAsymSink::recv(), and reset(). |
|
|
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(). |
|
|
Definition at line 121 of file tcp-sink.h. Referenced by DelAckSink::DelAckSink(), DelAckSink::recv(), and TcpSink(). |
|
|
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(). |
|
|
Reimplemented in FECModel, FloodAgent, and LandmarkAgent. Definition at line 66 of file object.h. Referenced by REDQueue::command(), RedPDQueue::command(), PushbackQueue::command(), NsObject::debug(), NsObject::delay_bind_dispatch(), RedPDQueue::enque(), PushbackQueue::enque(), NsObject::isdebug(), NsObject::NsObject(), TfrcAgent::recv(), PushbackQueue::reportDrop(), and REDQueue::reset(). |
|
|
Definition at line 121 of file agent.h. Referenced by Agent::delay_bind_dispatch(), and Agent::initpkt(). |
|
|
Definition at line 57 of file connector.h. Referenced by Connector::command(), Connector::drop(), and ErrorModel::recv(). |
|
|
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(). |
|
|
Definition at line 145 of file agent.h. Referenced by TcpAgent::command(), and TcpAgent::trace_event(). |
|
|
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(). |
|
|
Reimplemented in BayFullTcpAgent, RapAgent, and FullTcpAgent. Definition at line 120 of file agent.h. Referenced by Agent::delay_bind_dispatch(). |
|
|
Definition at line 118 of file tcp-sink.h. Referenced by Sacker::configure(), and delay_bind_dispatch(). |
|
|
|
Definition at line 123 of file tcp-sink.h. Referenced by DelAckSink::recv(), recv(), QSTcpSink::recv(), and reset(). |
|
|
Definition at line 115 of file tcp-sink.h. Referenced by Sacker::configure(), delay_bind_dispatch(), maxsackblocks(), and TcpSink(). |
|
|
Definition at line 132 of file agent.h. Referenced by Agent::insertOldValue(), Agent::lookupOldValue(), and Agent::~Agent(). |
|
|
Definition at line 119 of file agent.h. Referenced by Agent::delay_bind_dispatch(), and Agent::initpkt(). |
|
|
Definition at line 119 of file tcp-sink.h. Referenced by ack(), and delay_bind_dispatch(). |
|
|
Definition at line 120 of file tcp-sink.h. Referenced by delay_bind_dispatch(), and DelAckSink::recv(). |
|
|
Definition at line 116 of file tcp-sink.h. Referenced by ack(), QSTcpSink::ack(), DelAckSink::recv(), TcpAsymSink::recv(), reset(), DelAckSink::timeout(), and TcpAsymSink::timeout(). |
|
|
|
|
Definition at line 131 of file agent.h. Referenced by Agent::addAgentTrace(), Agent::command(), Agent::deleteAgentTrace(), Agent::flushAVar(), Agent::monitorAgentTrace(), and Agent::trace(). |
|
|
Definition at line 112 of file tcp-sink.h. Referenced by ack(), QSTcpSink::ack(), and delay_bind_dispatch(). |
|
|
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(). |
|
|
Definition at line 68 of file agent.cc. Referenced by imepAgent::handlerControlTimer(), imepAgent::handlerReXmitTimer(), Agent::initpkt(), imepAgent::sendAck(), imepAgent::sendBeacon(), toraAgent::sendCLR(), imepAgent::sendHello(), toraAgent::sendQRY(), DSRAgent::sendUnknownFlow(), toraAgent::sendUPD(), and DSRAgent::xmitFailed(). |
1.3.3