next up previous contents
Next: Ports Up: Include files Previous: Content of the Type   Contents


Values used in TCP/IP headers

values.tc contains macros for common values in meta data and in TCP/IP header fields. The following groups of values are defined:

ETH_P_protocol
numbers of protocols above the link layer, e.g. ETH_P_IP
IPPROTO_protocol
transport layer protocol numbers, e.g. IPPROTO_UDP
TCPOPT_kind
type of TCP option
ICMP_type
ICMP message type, e.g. ICMP_TIMXCEED
ICMP_code
ICMP message type sub code, e.g. ICMP_TIMXCEED_INTRANS
IGMP_type
IGMP message type, e.g. IGMP_MEMBERSHIP_QUERY

The names are the same as used in BSD /usr/include/netinet/ include files. Please see values.tc for the complete list of definitions.

Examples:

... if meta_protocol == ETH_P_IP;
... if ip_proto == IPPROTO_TCP;
... if icmp_type == ICMP_UNREACH &&
      icmp_code == ICMP_UNREACH_PORT;
... if igmp_type == IGMP_V2_LEAVE_GROUP;

Note that values.tc is included via fields.tc and should not be included directly.



Martin A. Brown 2003-11-06