CLICK-FASTCLASSIFIER(1)

NAME
click-fastclassifier - specializes Classifier code in a Click configuration

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

DESCRIPTION
The click-fastclassifier tool speeds up a Click configuration by creating fast versions of all its and elements. It reads a router configuration file in the language and creates specialized C++ source code for each Classifier-like element. A Classifier is expanded into a series of if statements; for example, the expansion of `Classifier(0/80, -)' contains something like this function:

inline void
FastClassifier_a_ac::length_unchecked_push(Packet *p)
{
  const unsigned *data = (const unsigned *)(p->data() - 0);
 step_0:
  if ((data[0] & 255U) == 128U) {
    output(0).push(p);
    return;
  }
  output(1).push(p);
  return;
}

After creating the source code, click-fastclassifier will optionally compile it into dynamically loadable packages. The Classifier elements in the input configuration are changed to use new FastClassifier elements, 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 Linux kernel module with

  % click-fastclassifier -k CONFIGURATION | click-install

The user level driver can read the archives directly.

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

OPTIONS
If any filename argument is a single dash "-", click-fastclassifier 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
    Generate a dynamically loadable package for the Linux kernel module.

-u, --user
    Generate a dynamically loadable package for the user-level driver.

-s, --source
    Output only the source code for the FastClassifier elements.

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

-r, --reverse
    Reverse the tranformation. That is, remove any existing FastClassifier elements and replace them with equivalent Classifiers.

-q, --quiet
    Compile code quietly (without echoing commands or top-level warnings).

--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/