xref: /haiku/src/add-ons/kernel/network/protocols/icmp/icmp.h (revision 2b4154458a820aa0b55b2800de9f0a13ea6ec1e2)
1 /*
2  * Copyright 2006-2010, Haiku, Inc. All Rights Reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef ICMP_H
6 #define ICMP_H
7 
8 
9 // ICMP types
10 
11 // RFC 792
12 #define ICMP_TYPE_ECHO_REPLY				0
13 #define ICMP_TYPE_UNREACH					3
14 #define ICMP_TYPE_SOURCE_QUENCH				4
15 #define ICMP_TYPE_REDIRECT					5
16 #define ICMP_TYPE_ECHO_REQUEST				8
17 #define ICMP_TYPE_TIME_EXCEEDED				11
18 #define ICMP_TYPE_PARAMETER_PROBLEM			12
19 #define ICMP_TYPE_TIMESTAMP_REQUEST			13
20 #define ICMP_TYPE_TIMESTAMP_REPLY			14
21 #define ICMP_TYPE_INFO_REQUEST				15
22 #define ICMP_TYPE_INFO_REPLY				16
23 // RFC 950
24 #define ICMP_TYPE_ADDR_MASK_REQUEST			17
25 #define ICMP_TYPE_ADDR_MASK_REPLY			18
26 
27 
28 // ICMP codes
29 
30 // ICMP_TYPE_TIME_EXCEEDED codes
31 #define ICMP_CODE_TIME_EXCEEDED_IN_TRANSIT	0
32 #define ICMP_CODE_REASSEMBLY_TIME_EXCEEDED	1
33 
34 // ICMP_TYPE_PARAMETER_PROBLEM codes
35 #define ICMP_CODE_INVALID_PARAMETER			0
36 #define ICMP_CODE_PARAMETER_MISSING			1
37 
38 // ICMP_TYPE_UNREACH codes
39 #define ICMP_CODE_NET_UNREACH				0
40 #define ICMP_CODE_HOST_UNREACH				1
41 #define ICMP_CODE_PROTOCOL_UNREACH			2
42 #define ICMP_CODE_PORT_UNREACH				3
43 #define ICMP_CODE_FRAGMENTATION_NEEDED		4
44 #define ICMP_CODE_SOURCE_ROUTE_FAIL			5
45 
46 // ICMP_TYPE_REDIRECT codes
47 #define ICMP_CODE_REDIRECT_NET				0
48 #define ICMP_CODE_REDIRECT_HOST				1
49 #define ICMP_CODE_REDIRECT_TOS_NET			2
50 #define ICMP_CODE_REDIRECT_TOS_HOST			3
51 
52 
53 #endif	// ICMP_H
54