CLICK-UNDEAD(1)

NAME
click-undead - removes dead code from a Click configuration

SYNOPSIS
click-undead [param=value ...] [options] [router-file]

DESCRIPTION
The click-undead tool speeds up some Click configurations by removing dead code. This includes:

•   Any and elements.

•   Any elements not reachable from both a source element and a sink element. Click packet source elements include and packet sink elements include and (when it is used as a pull element).

•   Dead ports on scheduler elements and so on) are removed. These are ports that no packet could ever enter.

•   Scheduler elements that have only one attached input are redundant, so they are removed.

•   Dead ports on tee elements are removed. These are ports with no packet sink downstream.

•   Tee elements that have only one attached output are redundant, so they are removed.

click-undead will not remove any information elements. Connections to removed elements are rerouted appropriately.

For example, click-undead will transform this configuration,

   Idle -> Counter -> td1 :: ToDump(a);
   InfiniteSource -> ss :: StaticSwitch(1);
     ss[0] -> ToDump(c);
     ss[1] -> Queue -> rr :: RoundRobinSched;
     Idle -> [1]rr;
     rr -> td2 :: ToDump(b);

into this configuration:

   InfiniteSource -> Queue -> td2 :: ToDump(b);

Note that the resulting configuration is not guaranteed to have the same semantics as the input configuration. Here, for example, the result configuration does not truncate the files `a' and `c'.

The resulting configuration is written to the standard output.

OPTIONS
If any filename argument is a single dash "-", click-undead will use the standard input or output instead, as appropriate.

-f file
--file file
    Read the router configuration to transform from file. The default is the standard input.

-e expr
--expression expr
    Use expr, a string in the Click language, as the router configuration to transform.

-o file
--output file
    Write the output router configuration to file. The default is the standard output.

-k, --kernel
    Check the configuration only for the Linux kernel module driver.

-u, --user
    Check the configuration only for the user-level driver.

-c, --config
    Output only the new configuration, not any archived packages.

-V, --verbose
    Print debugging information about the transformation -- for example, which elements are chosen as sources and sinks.

--help
    Print usage information and exit.

--version
    Print the version number and some quickie warranty information and exit.

SEE ALSO

AUTHOR
Eddie Kohler, kohler@cs.ucla.edu
http://www.pdos.lcs.mit.edu/click/