Click is a modular router toolkit. To use it you'll need to know how to
compile and install the software, how to write router configurations, and how
to write new elements. Our ACM Transactions on Computer Systems paper
will give you a feeling for what Click can do. Using the optimization tools
under CLICKDIR/tools
, you can get even better performance than that paper
describes.
Subdirectory | Description |
---|---|
CLICKDIR/apps |
Click-related applications |
CLICKDIR/apps/clicky |
GTK+ program for displaying configurations and interacting with drivers |
CLICKDIR/apps/csclient |
Command-line program for interacting with drivers |
CLICKDIR/apps/ClickController |
Java program for interacting with drivers |
CLICKDIR/conf |
example configuration files |
CLICKDIR/doc |
documentation |
CLICKDIR/elements |
element source code |
CLICKDIR/elements/analysis |
…for trace analysis and manipulation |
CLICKDIR/elements/app |
…for application-level protocols (e.g. FTP) |
CLICKDIR/elements/aqm |
…for active queue management (e.g. RED) |
CLICKDIR/elements/ethernet |
…for Ethernet |
CLICKDIR/elements/etherswitch |
…for an Ethernet switch |
CLICKDIR/elements/grid |
…for the Grid mobile ad-hoc wireless network protocols |
CLICKDIR/elements/icmp |
…for ICMP |
CLICKDIR/elements/ip |
…for IPv4 |
CLICKDIR/elements/ip6 |
…for IPv6 |
CLICKDIR/elements/ipsec |
…for IPsec |
CLICKDIR/elements/linuxmodule |
…for the Linux kernel driver |
CLICKDIR/elements/local |
…for your own elements (empty) |
CLICKDIR/elements/ns |
…for the NS network simulator driver |
CLICKDIR/elements/radio |
…for communicating with wireless radios |
CLICKDIR/elements/standard |
…for simple protocol-generic elements |
CLICKDIR/elements/tcpudp |
…for TCP and UDP |
CLICKDIR/elements/test |
…for regression tests |
CLICKDIR/elements/threads |
…for thread management |
CLICKDIR/elements/userlevel |
…for the user-level driver |
CLICKDIR/elements/wifi |
…for 802.11 |
CLICKDIR/etc/samplepackage |
sample source code for Click element package |
CLICKDIR/etc/samplellrpc |
sample source code for reading Click LLRPCs |
CLICKDIR/etc/diagrams |
files for drawing Click diagrams |
CLICKDIR/etc/libclick |
files for standalone user-level Click library |
CLICKDIR/include/click |
common header files |
CLICKDIR/include/clicknet |
header files defining network headers |
CLICKDIR/lib |
common non-element source code |
CLICKDIR/linuxmodule |
Linux kernel module driver |
CLICKDIR/ns |
NS driver (integrates with the NS simulator) |
CLICKDIR/test |
regression tests |
CLICKDIR/tools |
Click tools |
CLICKDIR/tools/lib |
…common code for tools |
CLICKDIR/tools/click-align |
…enforces alignment for non-x86 machines |
CLICKDIR/tools/click-combine |
…merges routers into combined configuration |
CLICKDIR/tools/click-devirtualize |
…removes virtual functions from source |
CLICKDIR/tools/click-fastclassifier |
…specializes Classifiers into C++ code |
CLICKDIR/tools/click-mkmindriver |
…build environments for minimal drivers |
CLICKDIR/tools/click-install |
…installs configuration into kernel module |
CLICKDIR/tools/click-pretty |
…pretty-prints Click configuration as HTML |
CLICKDIR/tools/click-undead |
…removes dead code from configurations |
CLICKDIR/tools/click-xform |
…pattern-based configuration optimizer |
CLICKDIR/tools/click2xml |
…convert Click language <-> XML |
CLICKDIR/userlevel |
user-level driver |
The INSTALL.md
file in this directory contains installation instructions. User
documentation is in the doc
subdirectory, which contains manual pages for
the Click language, the Linux kernel module, and several tools; it also has a
script that generates manual pages for many of the elements distributed in
this package. To install these manual pages so you can read them, follow the
INSTALL.md
instructions, but make install-man
instead of make install
.
Before playing with a Click router, you should get familiar with the Click
configuration language. You use this to tell Click how to process packets. The
language describes a graph of “elements,” or packet processing modules. See
the doc/click.5
manual page for a detailed description, or check the conf
directory for some simple examples.
Click can be compiled as a user-level program or as a kernel module for Linux. Either driver can receive and send packets; the kernel module directly interacts with device drivers, while the user-level driver uses packet sockets (on Linux) or the pcap library (everywhere else).
Run the user-level program by giving it the name of a configuration file:
click CONFIGFILE
.
See the doc/click.o.8
manual page for a detailed description. To summarize,
install a configuration by running click-install CONFIGFILE
. This will also
install the kernel module if necessary and report any errors to standard
error. (You must run make install
before click-install
will work.)
See INSTALL.md
for more information. Further information on NS-3 and Click is
available in the NS-3 manual.
See INSTALL.md
for more information. Once a Click-enabled version of NS-2 is
installed, the 'ns' command is able to run Click scripts as part of a normal
NS-2 simulation.
Click’s user-level driver supports DPDK. Before running in DPDK mode, the DPDK must be set up properly as per the DPDK documentation. This mainly involves setting up huge pages and binding some NIC to the DPDK userspace driver. E.g., to set up huge pages:
echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
mkdir -p /mnt/huge
mount -t hugetlbfs nodev /mnt/huge