next up previous contents
Next: Traffic control compiler Up: Historical constructs Previous: Policing   Contents

Old-style meters assignment

Before compound expressions (section 3.5) were added to the tcng language, meters had to be assigned using ``call by reference''. This was done by passing the variable name as the first argument of the macros that generate the meters. These macros have the same names as the macros described in section 2.13.5, but with the prefix set_.

Example:

$meter = SLB(cir 50kbps,cbs 20kB);
set_SLB($meter,cir 50kbps,cbs 20kB);

The two assignments are equivalent.

The set_meter macros are still available, but should not be used when writing new tcng configurations.



Martin A. Brown 2003-11-06