File: values.tc

package info (click to toggle)
tcng 10b-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 3,636 kB
  • ctags: 2,515
  • sloc: ansic: 19,040; pascal: 4,640; yacc: 2,619; sh: 1,914; perl: 1,546; lex: 772; makefile: 756
file content (111 lines) | stat: -rw-r--r-- 3,837 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
/*
 * TCP/IP packet field value definitions for tcng
 *
 * Written 2001,2002 by Werner Almesberger
 * Copyright 2001 EPFL-ICA, Network Robots
 * Copyright 2002 Network Robots, Werner Almesberger
 */

/*
 * Note: the definitions in this file used to be contained in fields.tc
 * They have been moved to their own file to allow separate inclusion in a
 * non-tcng context, e.g. by packet.tc
 *
 * The field names given in section comments correspond to the definitions in
 * fields.tc
 */

#ifndef __INCLUDED_FROM_FIELDS_TC
#warning values.tc should only be included from fields.tc
#endif

#ifndef VALUES_TC
#define VALUES_TC


/* ----- meta_protocol ----------------------------------------------------- */


/* Selected protocol IDs from include/linux/if_ether.h */

#define ETH_P_IP		0x0800	/* Internet Protocol packet */
#define ETH_P_ARP		0x0806	/* Address Resolution packet */
#define ETH_P_IPX		0x8137	/* IPX over DIX */
#define ETH_P_IPV6		0x86DD	/* IPv6 over bluebook */
#define ETH_P_PPP_DISC		0x8863	/* PPPoE discovery messages */
#define ETH_P_PPP_SES		0x8864	/* PPPoE session messages */

#define	ETH_P_ALL		0x0003	/* Every packet */


/* ----- ip_proto ---------------------------------------------------------- */


#define IPPROTO_ICMP		  1	/* Internet Control Message Protocol */
#define IPPROTO_IGMP		  2	/* Internet Group Management Protocol */
#define IPPROTO_IPIP		  4	/* IPIP tunnels */
#define IPPROTO_TCP		  6	/* Transmission Control Protocol */
#define IPPROTO_EGP		  8	/* Exterior Gateway Protocol */
#define IPPROTO_UDP		 17	/* User Datagram Protocol */
#define IPPROTO_IPV6		 41	/* IPv6 header */
#define IPPROTO_IPV6_ROUTING	 43	/* IPv6 routing header */
#define IPPROTO_IPV6_FRAGMENT	 44	/* IPv6 fragmentation header */
#define IPPROTO_RSVP		 46	/* Reservation Protocol */
#define IPPROTO_GRE		 47	/* General Routing Encapsulation */
#define IPPROTO_ESP		 50	/* Encapsulating Security Payload */
#define IPPROTO_AH		 51	/* Authentication Header */
#define IPPROTO_ICMPV6		 58	/* ICMPv6 */
#define IPPROTO_NONE		 59	/* IPv6 no next header */
#define IPPROTO_DSTOPTS		 60	/* IPv6 destination options */
#define IPPROTO_PIM		103	/* Protocol Independent Multicast */


/* ----- TCP option kind (no field definition in fields.tc) ---------------- */


#define TCPOPT_EOL		0	/* End of option list */
#define TCPOPT_NOP		1	/* No operation */
#define TCPOPT_MAXSEG		2	/* Maximum segment size */
#define TCPOPT_WINDOW		3	/* Window scale factor */
#define TCPOPT_TIMESTAMP	8	/* Timestamp */


/* ----- icmp_type --------------------------------------------------------- */


#define ICMP_ECHOREPLY		 0	/* Echo Reply */
#define ICMP_UNREACH		 3	/* Destination Unreachable */
#define ICMP_SOURCEQUENCH	 4	/* Source Quench */
#define ICMP_REDIRECT		 5	/* Redirect (change route) */
#define ICMP_ECHO		 8	/* Echo Request */
#define ICMP_TIMXCEED		11	/* Time Exceeded */


/* ----- icmp_code --------------------------------------------------------- */


/* Codes for ICMP_DEST_UNREACH */
#define ICMP_UNREACH_NET	 0	/* Network Unreachable */
#define ICMP_UNREACH_HOST	 1	/* Host Unreachable */
#define ICMP_UNREACH_PROTOCOL	 2	/* Protocol Unreachable */
#define ICMP_UNREACH_PORT	 3	/* Port Unreachable */
#define ICMP_UNREACH_NEEDFRAG	 4	/* Fragmentation Needed/DF set */

/* Codes for ICMP_REDIRECT */
#define ICMP_REDIRECT_NET	 0	/* Redirect Net */
#define ICMP_REDIRECT_HOST	 1	/* Redirect Host */

/* Codes for ICMP_TIME_EXCEEDED */
#define ICMP_TIMXCEED_INTRANS	 0	/* TTL count exceeded */
#define ICMP_TIMXCEED_REASS	 1	/* Fragment Reassembly time exceeded */


/* ----- igmp_type --------------------------------------------------------- */


#define IGMP_MEMBERSHIP_QUERY		0x11
#define IGMP_V1_MEMBERSHIP_REPORT	0x12
#define IGMP_V2_MEMBERSHIP_REPORT	0x16
#define IGMP_V2_LEAVE_GROUP		0x17

#endif /* VALUES_TC */