CLICK(1)

NAME
click - Click user-level driver

SYNOPSIS
click [options] [router-file]

DESCRIPTION
The click driver executes a Click modular router specification in a user-level program. It reads a router configuration file, sets up the router according to that file, and generally continues until interrupted. The router configuration is written in the Click language (see and can contain dynamically loadable code, which click will link against before installing the configuration.

The click program can read and write packets from the network using Berkeley Packet Filters -- see and It can also read and write BPF dump files, such as those created by and The element, and others like it, may be useful for testing configurations without affecting the network.

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

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

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

-p port
--port port
    Open a connection listening on TCP port port. ControlSockets allow users to connect to the router and call its read and write handlers remotely.

-u file
--unix-socket file
    Open a connection listening on a Unix socket, on file file.

-R, --allow-reconfigure
    Provide a "hotconfig" handler, which allows remote users, and elements within the router, to reconfigure the router dynamically. See "/click/hotconfig" section for more information on hot-swapping.

-h [element.]handler
--handler [element.]handler
    After running the driver, call element's read handler named handler, or the global read handler named handler, and print the result to standard output. Each element has several generic handlers -- for example, config returns the element's configuration string and class returns the element's class name. Some elements have additional handlers; for example, has count and rate handlers that return the number of packets arrived and the recent arrival rate in packets per second. See for more information on generic handlers, and the element documentation for more information on element-specific handlers.

    element may be a pattern that uses the shell's globbing syntax (*, ?, and [...]). In this case, click will run each handler whose element's name matches the pattern. element may also be an element class or interface name, such as "Queue" or "Storage"; click will run each handler whose element has that class or interface.

-x [element.]handler
--exit-handler [element.]handler
    After running the driver, call element's read handler named handler, or the global read handler named handler, and use the result as the click process exit value. The handler should return an integer, which is used directly, or a boolean (true means 0, false means 1).

-o file
--output file
    Write a flattened version of the router configuration to file. The flattening process removes all compound elements and additional archive members.

-q, --quit
    Do not run the driver. This option can be used to check a configuration for errors, or to check handler results (with the --handler option) without running the configuration.

-t, --time
    Print the time it took to run the driver.

-w, --no-warnings
    Do not print any warning messages.

-C path
--clickpath path
    Use path for CLICKPATH.

--help
    Print usage information and exit.

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

BUGS
If you get an unaligned access error, try running your configuration through first.

SEE ALSO

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