next up previous contents
Next: Meters Up: Include files Previous: Values used in TCP/IP   Contents


Ports

The include file ports.tc defines macros for almost all TCP and UDP port names and numbers registered by IANA.2.5

The names of port macros begin with PORT_, followed by the port name in upper case. Special characters (e.g. hyphens, asterisks, or dots) in the port name are converted to underscores. As a special case for whois++, ++ becomes _PP.

When the IANA port numbers database contains multiple port numbers for the same name, the entry with the highest number is used. If an entry defines a range, the lower bound of the range is used.

Examples:

#define PORT_HTTP 80            /* http */
#define PORT_HTTP_ALT 8080      /* http-alt */



Martin A. Brown 2003-11-06