This is automatically generated documentation. Edit after the "COMMENTS" heading; changes to the main body will be lost.
click [options] [param=value ...] [router-file]
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 click(5)), 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 FromDevice.u and ToDevice.u. It can also read and write BPF dump files, such as those created by tcpdump(1) -- see FromDump and ToDump. The InfiniteSource element, and others like it, may be useful for testing configurations without affecting the network.
Arguments such as "NAME=value" set configuration parameters, overriding any existing settings. Thus, "echo 'Message($MSG)' | click MSG=Hi" will print "Hi".
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 ControlSocket 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 ControlSocket connection listening on a Unix socket, on file file.
- -R, --allow-reconfigure
- Provide a "hotconfig" handler, which allows remote ControlSocket users, and elements within the router, to reconfigure the router dynamically. See click.o(8)'s "/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; Counter, for example, has count and rate handlers that return the number of packets arrived and the recent arrival rate in packets per second. See linuxmodule 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.
If you get an unaligned access error, try running your configuration through click-align first.