#include <filter.h>
Inheritance diagram for MultiFieldFilter:


Definition at line 87 of file filter.h.
Public Types | |
| enum | filter_e { DROP, PASS, FILTER, DUPLIC } |
Public Member Functions | |
| virtual void | debug (const char *fmt,...) |
| virtual int | delay_bind_dispatch (const char *varName, const char *localName, TclObject *tracer) |
| virtual void | delay_bind_init_all () |
| virtual void | drop (Packet *p) |
| NsObject * | filter_target () |
| int | isdebug () const |
| MultiFieldFilter () | |
| virtual void | recv (Packet *p, const char *s) |
| virtual void | recvOnly (Packet *) |
| void | setDropTarget (NsObject *dt) |
| void | target (NsObject *target) |
| NsObject * | target () |
Protected Member Functions | |
| void | add_field (fieldobj *p) |
| int | command (int argc, const char *const *argv) |
| virtual void | drop (Packet *p, const char *s) |
| filter_e | filter (Packet *p) |
| void | handle (Event *) |
| void | recv (Packet *, Handler *h=0) |
| virtual void | reset () |
| void | send (Packet *p, Handler *h) |
Protected Attributes | |
| int | debug_ |
| NsObject * | drop_ |
| fieldobj * | field_list_ |
| NsObject * | filter_target_ |
| NsObject * | target_ |
|
|
Definition at line 60 of file filter.h.
|
|
|
Definition at line 136 of file filter.cc. 00136 : field_list_(0) 00137 { 00138 00139 }
|
|
|
Definition at line 141 of file filter.cc. References field_list_, and fieldobj::next. Referenced by command(). 00142 { 00143 p->next = field_list_; 00144 field_list_ = p; 00145 }
|
|
||||||||||||
|
Reimplemented from Filter. Definition at line 162 of file filter.cc. References add_field(), Connector::command(), Filter::filter_target_, fieldobj::match, fieldobj::offset, and Connector::target_. 00163 { 00164 Tcl& tcl = Tcl::instance(); 00165 if (argc == 2) { 00166 if (strcmp(argv[1], "filter-target") == 0) { 00167 if (filter_target_ != 0) 00168 tcl.result(target_->name()); 00169 return TCL_OK; 00170 } 00171 } 00172 else if (argc == 3) { 00173 if (strcmp(argv[1], "filter-target") == 0) { 00174 filter_target_ = (NsObject*)TclObject::lookup(argv[2]); 00175 return TCL_OK; 00176 } 00177 } 00178 else if (argc == 4) { 00179 if (strcmp(argv[1], "filter-field") == 0) { 00180 fieldobj *tmp = new fieldobj; 00181 tmp->offset = atoi(argv[2]); 00182 tmp->match = atoi(argv[3]); 00183 add_field(tmp); 00184 return TCL_OK; 00185 } 00186 } 00187 return Connector::command(argc, argv); 00188 }
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, HbAfterRtoSctpAgent, MfrHbAfterRtoSctpAgent, MfrTimestampSctpAgent, MultipleFastRtxSctpAgent, NewRenoSctpAgent, TimestampSctpAgent, SctpAgent, FullTcpAgent, SackFullTcpAgent, RFC793eduTcpAgent, TcpSink, TcpAgent, VegasTcpAgent, XcpAgent, and XcpSink. 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, HbAfterRtoSctpAgent, MfrHbAfterRtoSctpAgent, MfrTimestampSctpAgent, MultipleFastRtxSctpAgent, NewRenoSctpAgent, TimestampSctpAgent, SctpAgent, FullTcpAgent, SackFullTcpAgent, RFC793eduTcpAgent, TcpSink, TcpAgent, VegasTcpAgent, XcpAgent, and XcpSink. Definition at line 57 of file object.cc. Referenced by MPLSAddressClassifier::delay_bind_init_all(), and Agent::delay_bind_init_all().
|
|
||||||||||||
|
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: ![]() |
|
|
|
Reimplemented from Filter. Definition at line 147 of file filter.cc. References Packet::access(), field_list_, Filter::FILTER, fieldobj::match, fieldobj::next, fieldobj::offset, and Filter::PASS. 00148 { 00149 fieldobj* tmpfield; 00150 00151 tmpfield = field_list_; 00152 while (tmpfield != 0) { 00153 if (*(int *)p->access(tmpfield->offset) == tmpfield->match) 00154 tmpfield = tmpfield->next; 00155 else 00156 return (PASS); 00157 } 00158 return(FILTER); 00159 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 59 of file filter.h. References Filter::filter_target_. 00059 { return filter_target_; }
|
|
|
Implements Handler. Reimplemented in LinkDelay, LL, AckRecons, and Snoop. Definition at line 91 of file object.cc. References NsObject::recv().
Here is the call graph for this function: ![]() |
|
|
Definition at line 61 of file object.h. References NsObject::debug_. 00061 { return debug_; }
|
|
||||||||||||
|
Reimplemented in CMUTrace. Definition at line 96 of file object.cc. References Packet::free(). 00097 { 00098 Packet::free(p); 00099 }
Here is the call graph for this function: ![]() |
|
||||||||||||
|
Reimplemented from Connector. Definition at line 70 of file filter.cc. References Connector::drop(), Filter::DROP, Filter::DUPLIC, Filter::FILTER, Filter::filter(), Filter::filter_target_, Filter::PASS, NsObject::recv(), and Connector::send(). 00071 { 00072 switch(filter(p)) { 00073 case DROP : 00074 if (h) h->handle(p); 00075 drop(p); 00076 break; 00077 case DUPLIC : 00078 if (filter_target_) 00079 filter_target_->recv(p->copy(), h); 00080 /* fallthrough */ 00081 case PASS : 00082 send(p, h); 00083 break; 00084 case FILTER : 00085 if (filter_target_) 00086 filter_target_->recv(p, h); 00087 break; 00088 } 00089 }
Here is the call graph for this function: ![]() |
|
|
Reimplemented in Agent, and Trace. Definition at line 56 of file object.h. Referenced by Trace::recvOnly().
|
|
|
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, Queue< T >, and XcpSink. Definition at line 70 of file object.cc. Referenced by NsObject::command().
|
|
||||||||||||
|
Reimplemented in Agent, and LinkDelay. Definition at line 56 of file connector.h. References NsObject::recv(), and Connector::target_. Referenced by SessionTTLChecker::recv(), TTLChecker::recv(), Trace::recv(), TraceIpMac::recv(), TraceIp::recv(), SnoopQueueEDrop::recv(), SnoopQueueTagger::recv(), SnoopQueueDrop::recv(), SnoopQueueOut::recv(), SnoopQueueIn::recv(), PktCounter::recv(), NetworkInterface::recv(), MeasureMod::recv(), Filter::recv(), Connector::recv(), CMUTrace::recv(), and AddSR::recv().
Here is the call graph for this function: ![]() |
|
|
Definition at line 51 of file connector.h. References Connector::drop_. Referenced by XCPWrapQ::command(). 00051 {drop_ = dt; }
|
|
|
Definition at line 49 of file connector.h. References Connector::target(), and Connector::target_.
Here is the call graph for this function: ![]() |
|
|
Definition at line 48 of file connector.h. References Connector::target_. Referenced by JoBS::assignRateDropsADC(), FQ::deque(), MIPMHAgent::reg(), MIPBSAgent::send_ads(), and Connector::target(). 00048 { return target_; }
|
|
|
Reimplemented in FECModel, FloodAgent, and LandmarkAgent. Definition at line 66 of file object.h. Referenced by REDQueue::command(), RedPDQueue::command(), PushbackQueue::command(), NsObject::debug(), NsObject::delay_bind_dispatch(), PushbackQueue::enque(), NsObject::isdebug(), NsObject::NsObject(), TfrcAgent::recv(), PushbackQueue::reportDrop(), SctpAgent::Reset(), REDQueue::reset(), DropTail::shrink_queue(), and Delayer::try_send(). |
|
|
Definition at line 59 of file connector.h. Referenced by XCPWrapQ::command(), Connector::command(), Connector::drop(), ErrorModel::recv(), and Connector::setDropTarget(). |
|
|
Definition at line 94 of file filter.h. Referenced by add_field(), and filter(). |
|
|
Definition at line 67 of file filter.h. Referenced by command(), Filter::command(), Filter::filter_target(), and Filter::recv(). |
|
1.4.6