jtc
Class Filter

java.lang.Object
  |
  +--jtc.Filter
Direct Known Subclasses:
U32Filter

public abstract class Filter
extends java.lang.Object


Field Summary
protected  int estInterval
          estimator interval (TBD: What's it for?)
protected  int estTimer
          time-constant (TBD: What's it?)
protected  long mBurst
          burst of token bucket meter in bytes
protected  boolean mCont
          continue tryig to match another filter, if meter fails?
protected  short minorHandle
          minor handle of the filter
protected  long mRate
          rate of token bucket meter in bps
protected  QDisc parent
          the parent qdisc of the filter TBD: can all qdiscs have filters?
protected  short prio
          priority of the filter
protected  java.lang.String protocol
          protocol of the filter
 
Constructor Summary
Filter()
           
 
Method Summary
 void decrPrio()
          give the filter lower priority
protected  java.lang.String getMeter()
          Get a string representation (tc code) for the attached meter.
protected  java.lang.String getTC()
          Get a string representation which we can use in the toString() methods in the derived classes
 void setEstimator(int interval, int timer)
          set the qdiscs estimator
 void setMeter(long rate, long burst, boolean cont)
          Add a (token bucket) meter to the filter.
 void setPrio(short prio)
          Set the priority.
 void setProtocol(java.lang.String protocol)
          Set the protocol.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

prio

protected short prio
priority of the filter

minorHandle

protected short minorHandle
minor handle of the filter

protocol

protected java.lang.String protocol
protocol of the filter

estInterval

protected int estInterval
estimator interval (TBD: What's it for?)

estTimer

protected int estTimer
time-constant (TBD: What's it?)

parent

protected QDisc parent
the parent qdisc of the filter TBD: can all qdiscs have filters?

mRate

protected long mRate
rate of token bucket meter in bps

mBurst

protected long mBurst
burst of token bucket meter in bytes

mCont

protected boolean mCont
continue tryig to match another filter, if meter fails?
Constructor Detail

Filter

public Filter()
Method Detail

getTC

protected java.lang.String getTC()
Get a string representation which we can use in the toString() methods in the derived classes
Returns:
code for tcd

decrPrio

public void decrPrio()
give the filter lower priority

setPrio

public void setPrio(short prio)
Set the priority. Higher number means lower priority.
Parameters:
prio - priority

setProtocol

public void setProtocol(java.lang.String protocol)
Set the protocol.
Parameters:
protocol - protocol (e.g. "ip")

setMeter

public void setMeter(long rate,
                     long burst,
                     boolean cont)
Add a (token bucket) meter to the filter.
Parameters:
rate - token rate
burst - burst
cont - continue (and reclassify) or drop if bucket empty?

getMeter

protected java.lang.String getMeter()
Get a string representation (tc code) for the attached meter.
Returns:
tccode for meter

setEstimator

public void setEstimator(int interval,
                         int timer)
set the qdiscs estimator