

Public Member Functions | |
| ACTO_ADC () | |
| void | teardown_action (int, double, int) |
| int | command (int, const char *const *) |
| virtual void | rej_action (int, double, int) |
| void | recv (Packet *, Handler *) |
| virtual void | recv (Packet *p, const char *s) |
| void | setest (int cl, Estimator *est) |
| double | peak_rate (int cl, double r, int b) |
| char * | type () |
| virtual void | recvOnly (Packet *) |
| virtual void | delay_bind_init_all () |
| virtual int | delay_bind_dispatch (const char *varName, const char *localName, TclObject *tracer) |
| int | isdebug () const |
| virtual void | debug (const char *fmt,...) |
Protected Member Functions | |
| int | admit_flow (int, double, int) |
| virtual void | reset () |
| void | handle (Event *) |
Protected Attributes | |
| int | rejected_ |
| double | s_ |
| Estimator * | est_ [CLASS] |
| double | bandwidth_ |
| char * | type_ |
| Tcl_Channel | tchan_ |
| int | src_ |
| int | dst_ |
| int | backoff_ |
| int | dobump_ |
| int | debug_ |
|
|
Definition at line 42 of file acto-adc.cc. References s_, and ADC::type_.
|
|
||||||||||||||||
|
Implements ADC. Definition at line 51 of file acto-adc.cc. References Estimator::avload(), ADC::backoff_, ADC::bandwidth_, Estimator::change_avload(), ADC::dobump_, ADC::est_, ADC::peak_rate(), rejected_, and s_.
00052 {
00053 double p=peak_rate(cl,r,b);
00054 if (backoff_) {
00055 if (rejected_)
00056 return 0;
00057 }
00058
00059 if (exp(p*s_)*est_[cl]->avload() <= bandwidth_) {
00060 if (dobump_) {
00061 est_[cl]->change_avload(p);
00062 }
00063 return 1;
00064 }
00065 else {
00066 rejected_=1;
00067 return 0;
00068 }
00069 }
|
Here is the call graph for this function:

|
||||||||||||
|
Reimplemented from NsObject. Definition at line 37 of file adc.cc. References NsObject::command(), ADC::est_, ADC::setest(), Estimator::setmeasmod(), Estimator::start(), and ADC::tchan_.
00038 {
00039
00040 Tcl& tcl = Tcl::instance();
00041 if (argc==2) {
00042 if (strcmp(argv[1],"start") ==0) {
00043 /* $adc start */
00044 est_[1]->start();
00045 return (TCL_OK);
00046 }
00047 } else if (argc==4) {
00048 if (strcmp(argv[1],"attach-measmod") == 0) {
00049 /* $adc attach-measmod $meas $cl */
00050 MeasureMod *meas_mod = (MeasureMod *)TclObject::lookup(argv[2]);
00051 if (meas_mod== 0) {
00052 tcl.resultf("no measuremod found");
00053 return(TCL_ERROR);
00054 }
00055 int cl=atoi(argv[3]);
00056 est_[cl]->setmeasmod(meas_mod);
00057 return(TCL_OK);
00058 } else if (strcmp(argv[1],"attach-est") == 0 ) {
00059 /* $adc attach-est $est $cl */
00060 Estimator *est_mod = (Estimator *)TclObject::lookup(argv[2]);
00061 if (est_mod== 0) {
00062 tcl.resultf("no estmod found");
00063 return(TCL_ERROR);
00064 }
00065 int cl=atoi(argv[3]);
00066 setest(cl,est_mod);
00067 return(TCL_OK);
00068 }
00069 }
00070 else if (argc == 3) {
00071 if (strcmp(argv[1], "attach") == 0) {
00072 int mode;
00073 const char* id = argv[2];
00074 tchan_ = Tcl_GetChannel(tcl.interp(), (char*)id, &mode);
00075 if (tchan_ == 0) {
00076 tcl.resultf("ADC: trace: can't attach %s for writing", id);
00077 return (TCL_ERROR);
00078 }
00079 return (TCL_OK);
00080
00081 }
00082 if (strcmp(argv[1], "setbuf") == 0) {
00083 /* some sub classes actually do something here */
00084 return(TCL_OK);
00085 }
00086
00087
00088 }
00089 return (NsObject::command(argc,argv));
00090 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 102 of file object.cc. References NsObject::debug_.
00103 {
00104 if (!debug_)
00105 return;
00106 va_list ap;
00107 va_start(ap, fmt);
00108 vprintf(fmt, ap);
00109 }
|
|
||||||||||||||||
|
Reimplemented in BayFullTcpAgent, Agent, MPLSAddressClassifier, LDPAgent, FullTcpAgent, SackFullTcpAgent, RFC793eduTcpAgent, TcpSink, TcpAgent, and VegasTcpAgent. Definition at line 63 of file object.cc. References NsObject::debug_. Referenced by MPLSAddressClassifier::delay_bind_dispatch(), and Agent::delay_bind_dispatch().
00064 {
00065 if (delay_bind_bool(varName, localName, "debug_", &debug_, tracer))
00066 return TCL_OK;
00067 return TclObject::delay_bind_dispatch(varName, localName, tracer);
00068 }
|
|
|
Reimplemented in BayFullTcpAgent, Agent, MPLSAddressClassifier, LDPAgent, FullTcpAgent, SackFullTcpAgent, RFC793eduTcpAgent, TcpSink, TcpAgent, and VegasTcpAgent. Definition at line 57 of file object.cc. Referenced by MPLSAddressClassifier::delay_bind_init_all(), and Agent::delay_bind_init_all().
00058 {
00059 delay_bind_init_one("debug_");
00060 }
|
|
|
Implements Handler. Reimplemented in LinkDelay, LL, AckRecons, and Snoop. Definition at line 91 of file object.cc. References NsObject::recv().
|
Here is the call graph for this function:

|
|
Definition at line 61 of file object.h. References NsObject::debug_.
00061 { return debug_; }
|
|
||||||||||||||||
|
Definition at line 38 of file adc.h. References ADC::est_, and Estimator::period(). Referenced by HB_ADC::admit_flow(), ACTP_ADC::admit_flow(), admit_flow(), MSPK_ADC::get_rate(), HB_ADC::rej_action(), ACTP_ADC::rej_action(), HB_ADC::teardown_action(), and ACTP_ADC::teardown_action().
|
Here is the call graph for this function:

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

|
||||||||||||
|
Implements NsObject. Definition at line 35 of file adc.h.
00035 {}
|
|
|
Reimplemented in Agent, and Trace. Definition at line 56 of file object.h. Referenced by Trace::recvOnly().
00056 {};
|
|
||||||||||||||||
|
Reimplemented in ACTP_ADC, HB_ADC, MS_ADC, and Param_ADC. Definition at line 33 of file adc.h. Referenced by SALink::recv().
00033 {};
|
|
|
Reimplemented in BayFullTcpAgent, HashClassifier, IvsSource, dsREDQueue, DiffusionRate, SinkAgent, DiffusionAgent, FloodingAgent, OmniMcastAgent, LinkDelay, CBQueue, DropTail, ErrorModel, PIQueue, Queue< T >, RedPDQueue, REDQueue, REMQueue, RIOQueue, Snoop, FackTcpAgent, FullTcpAgent, SackFullTcpAgent, RFC793eduTcpAgent, Sack1TcpAgent, TcpSink, DelAckSink, TcpAgent, VegasTcpAgent, toraAgent, and Queue< T >. Definition at line 70 of file object.cc. Referenced by NsObject::command().
00071 {
00072 }
|
|
||||||||||||
|
Definition at line 36 of file adc.h. References ADC::est_, Estimator::setactype(), and ADC::type_. Referenced by ADC::command().
|
Here is the call graph for this function:

|
||||||||||||||||
|
Reimplemented from ADC. Definition at line 71 of file acto-adc.cc. References rejected_.
00072 {
00073 rejected_=0;
00074 }
|
|
|
Definition at line 39 of file adc.h. References ADC::type_. Referenced by SALink::command(), and SALink::trace().
00039 {return type_;}
|
|
|
Definition at line 47 of file adc.h. Referenced by ADC::ADC(), HB_ADC::admit_flow(), ACTP_ADC::admit_flow(), and admit_flow(). |
|
|
Definition at line 42 of file adc.h. Referenced by ADC::ADC(), Param_ADC::admit_flow(), MS_ADC::admit_flow(), HB_ADC::admit_flow(), ACTP_ADC::admit_flow(), and admit_flow(). |
|
|
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 48 of file adc.h. Referenced by ADC::ADC(), ACTP_ADC::admit_flow(), and admit_flow(). |
|
|
Definition at line 46 of file adc.h. Referenced by ADC::ADC(), and Param_ADC::trace(). |
|
|
Definition at line 41 of file adc.h. Referenced by MS_ADC::admit_flow(), HB_ADC::admit_flow(), ACTP_ADC::admit_flow(), admit_flow(), ADC::command(), ADC::peak_rate(), MS_ADC::rej_action(), and ADC::setest(). |
|
|
Definition at line 38 of file acto-adc.cc. Referenced by admit_flow(), and teardown_action(). |
|
|
Definition at line 39 of file acto-adc.cc. Referenced by ACTO_ADC(), and admit_flow(). |
|
|
Definition at line 45 of file adc.h. Referenced by ADC::ADC(), and Param_ADC::trace(). |
|
|
Definition at line 44 of file adc.h. Referenced by ADC::command(), and Param_ADC::trace(). |
|
|
Definition at line 43 of file adc.h. Referenced by ACTO_ADC(), ACTP_ADC::ACTP_ADC(), HB_ADC::HB_ADC(), MS_ADC::MS_ADC(), Param_ADC::Param_ADC(), ADC::setest(), Param_ADC::trace(), and ADC::type(). |
1.3.3