removes virtual function calls from a Click configuration


click-devirtualize [options] [param=value ...] [router-file]


The click-devirtualize tool speeds up a Click configuration by removing virtual function calls from its elements. It reads a router configuration file in the click(5) language and creates specialized C++ source code for each element. The virtual function calls in this specialized C++ code are replaced with direct function calls to other elements in the configuration.

After creating the source code, click-devirtualize will optionally compile it into dynamically loadable packages. The elements in the input configuration are changed to use new, specially generated element classes, and the resulting configuration, plus source code and any compiled packages, are combined into an archive and written to the standard output. You can install such an archive into the click.o(8) Linux kernel module with click-install(1):

  % click-devirtualize -k CONFIGURATION | click-install
The click(1) user level driver can read the archives directly.

The click-devirtualize transformation can be reversed with the --reverse option.


If any filename argument is a single dash "-", click-devirtualize 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
--expr 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.

-l, --linuxmodule
Generate a dynamically loadable package for the click.o(8) Linux kernel module.

-u, --userlevel
Generate a dynamically loadable package for the click(1) user-level driver.

-s, --source
Output only the specialized element class source code.

-c, --config
Output only the new configuration (the one that includes specialized elements).

-r, --reverse
Reverse the tranformation. That is, change any existing devirtualized element classes into the equivalent normal elements.

-n class
--no-devirtualize class
Do not devirtualize elements whose element class is class. Such elements will continue using normal source code.

-i file
--instructions file
Read devirtualization instructions from file. This file can contain any number of lines. Comments start with ā€˜#ā€™; non-blank, non-comment lines should have devirtualization directives. There is currently one directive: "noclass class1 class2..." is equivalent to several ā€˜--no-devirtualize classiā€™ options.

Print usage information and exit.

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


click(1), click-install(1), click(5), click.o(8)


Eddie Kohler, [email protected]