next up previous contents
Next: Traffic control simulator Up: Adding new traffic control Previous: Adding new filters   Contents

Adding new meters

In general, new metering functions are implemented using the bucket primitive. No change to tcc is needed for this.

The file tcng/tcc/meters.tc.in contains the definitions of the meters which are part of the tcng language.

meters.tc.in uses a special pseudo preprocessor directive called #map. This directive is converted by tcng/tcc/tcc_var2fix.pl to a set of macros for elements with a tcng-style parameter list. Please consult the source code of /tcc_var2fix.pl for a detailed description of these macros.



Martin A. Brown 2003-11-06