jtc
Class REDQDisc

java.lang.Object
  |
  +--jtc.QDisc
        |
        +--jtc.REDQDisc

public class REDQDisc
extends QDisc

This class represents a Random Early Detect queueing discipline, the RED (random early detection) queuing discipline which gently starts dropping packets before the queue fills up.


Field Summary
protected  int avpkt
          avarage package size (in Bytes)
protected  long bandwidth
          bandwidth in bytes per second
protected  int burst
          burst in packages
protected  boolean ecn
          ecn flag (ecn=exlpicit congestion notification) If set, packets in this qdisc will get their ecn bits set, if the qdisc is congested.
protected  long limit
          limit in bytes
protected  long max
          max-bytes
protected  long min
          min-bytes
protected  float probability
          dropping probability
 
Fields inherited from class jtc.QDisc
device, estInterval, estTimer, ingress, majorHandle, minorHandle, parent
 
Constructor Summary
REDQDisc(long limit, long min, long max, int avpkt, int burst, java.lang.String device)
          Constructs a red qdisc as the root qdisc of the given device
REDQDisc(long limit, long min, long max, int avpkt, int burst, TCClass parent, short majorHandle)
          Constructs a red qdisc
 
Method Summary
 void setBandwidth(long bandwidth)
          Set the bandwidth.
 void setECN()
          Tell the qdisc to set the ecn bits in the packages, if qdisc congested.
 void setProbability(float probability)
          Set the dropping probability.
 java.lang.String toString()
          Get a string representation of the object.
 
Methods inherited from class jtc.QDisc
getDevice, getTC, newFilterMinor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

limit

protected long limit
limit in bytes

min

protected long min
min-bytes

max

protected long max
max-bytes

avpkt

protected int avpkt
avarage package size (in Bytes)

burst

protected int burst
burst in packages

probability

protected float probability
dropping probability

ecn

protected boolean ecn
ecn flag (ecn=exlpicit congestion notification) If set, packets in this qdisc will get their ecn bits set, if the qdisc is congested.

bandwidth

protected long bandwidth
bandwidth in bytes per second
Constructor Detail

REDQDisc

public REDQDisc(long limit,
                long min,
                long max,
                int avpkt,
                int burst,
                java.lang.String device)
Constructs a red qdisc as the root qdisc of the given device
Parameters:
limit - limit in bytes
min - min-bytes
max - max-bytes
avpkt - avarage package size (in Bytes)
burst - burst in packages
device - the device the qdisc is attached to

REDQDisc

public REDQDisc(long limit,
                long min,
                long max,
                int avpkt,
                int burst,
                TCClass parent,
                short majorHandle)
Constructs a red qdisc
Parameters:
limit - limit in bytes
min - min-bytes
max - max-bytes
avpkt - avarage package size (in Bytes)
burst - burst in packages
parent - the parent class of the qdisc
majorHandle - the major handle the qdisc shall be idenfied by
Method Detail

setProbability

public void setProbability(float probability)
Set the dropping probability.
Parameters:
probability - dropping probability

setECN

public void setECN()
Tell the qdisc to set the ecn bits in the packages, if qdisc congested.

setBandwidth

public void setBandwidth(long bandwidth)
Set the bandwidth.
Parameters:
bandwidth -  

toString

public java.lang.String toString()
Get a string representation of the object. A tc command arg is used to represent it.
Overrides:
toString in class java.lang.Object
Returns:
args for tcd