This is automatically generated documentation. Edit after the "COMMENTS" heading; changes to the main body will be lost.

PortInfo Element Documentation


PortInfo -- Click element; stores named TCP/UDP port information



Ports: None
Package: standard (core)


Lets you use mnemonic names for TCP and UDP ports. Each argument has the form `NAME PORT[/PROTOCOL]', which associates the given PORT/PROTOCOL pair with the NAME. If PROTOCOL is left off, the NAME applies to both TCP and UDP. For example, in a configuration containing

   PortInfo(ssh 22, http 80),

configuration strings can use ssh and http as mnemonics for the port numbers 22 and 80, respectively. PortInfo names are local with respect to compound elements. That is, names created inside a compound element apply only within that compound element and its subelements. For example:

   PortInfo(src 10);
   compound :: {
     PortInfo(dst 100);
     ... -> UDPIPEncap(, src,, dst) -> ...  // OK
   ... -> UDPIPEncap(, src,, dst) -> ...
                                         // error: `dst' undefined


If you do not define a port for a given name, PortInfo will use the default, if any. At user level, PortInfo uses the getservbyname function to look up ports by name. In the kernel, there are no default ports. PortInfo will parse arguments containing more than one name, as `NAME PORT/PROTOCOL NAME...', and comments starting with `#' are ignored. Thus, lines from /etc/services can be used verbatim as PortInfo configuration arguments.



Generated by 'click-elem2man' from '../include/click/standard/portinfo.hh' on 20/Feb/2006.


elements/portinfo.txt · Last modified: 2006/02/20 10:41 (external edit)
Recent changes RSS feed Driven by DokuWiki