next up previous contents
Next: Limitations Up: Historical constructs Previous: Filters   Contents


Filter elements

Classes are selected by filter elements in a way similar to if expressions. We call if and on constructs ``selectors''.

Selectors are placed between the parameters of a class and its body. Filter elements begin with the keyword on, followed by the optional list of filter element parameters, in parentheses.

Example:

class
    on (dst 209.10.41.242)
    on (dst 199.183.24.194);

This is actually a shortcut notation of

on element params

Also, the filter can be specified along with the element.

Example:

class
    on tcindex(mask 0) element (0);

is equivalent to

tcindex(mask 0) {
    class
        on element(0);
}

The number of a filter element can be explicitly set by including it among the parameters. (Note: most filter elements require numbers to be set this way. The only exception is route, which does not use element numbers at all.)

Example:

    on (0x2e);



Subsections

Martin A. Brown 2003-11-06