1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 #ifndef _LINUX_ICMP_H
18 #define _LINUX_ICMP_H
19
20 #define ICMP_ECHOREPLY 0
21 #define ICMP_DEST_UNREACH 3
22 #define ICMP_SOURCE_QUENCH 4
23 #define ICMP_REDIRECT 5
24 #define ICMP_ECHO 8
25 #define ICMP_TIME_EXCEEDED 11
26 #define ICMP_PARAMETERPROB 12
27 #define ICMP_TIMESTAMP 13
28 #define ICMP_TIMESTAMPREPLY 14
29 #define ICMP_INFO_REQUEST 15
30 #define ICMP_INFO_REPLY 16
31 #define ICMP_ADDRESS 17
32 #define ICMP_ADDRESSREPLY 18
33
34
35
36 #define ICMP_NET_UNREACH 0
37 #define ICMP_HOST_UNREACH 1
38 #define ICMP_PROT_UNREACH 2
39 #define ICMP_PORT_UNREACH 3
40 #define ICMP_FRAG_NEEDED 4
41 #define ICMP_SR_FAILED 5
42 #define ICMP_NET_UNKNOWN 6
43 #define ICMP_HOST_UNKNOWN 7
44 #define ICMP_HOST_ISOLATED 8
45 #define ICMP_NET_ANO 9
46 #define ICMP_HOST_ANO 10
47 #define ICMP_NET_UNR_TOS 11
48 #define ICMP_HOST_UNR_TOS 12
49
50
51 #define ICMP_REDIR_NET 0
52 #define ICMP_REDIR_HOST 1
53 #define ICMP_REDIR_NETTOS 2
54 #define ICMP_REDIR_HOSTTOS 3
55
56
57 #define ICMP_EXC_TTL 0
58 #define ICMP_EXC_FRAGTIME 1
59
60
61 struct icmphdr {
62 __u8 type;
63 __u8 code;
64 __u16 checksum;
65 union {
66 struct {
67 __u16 id;
68 __u16 sequence;
69 } echo;
70 __u32 gateway;
71 } un;
72 };
73
74
75 struct icmp_err {
76 int errno;
77 unsigned fatal:1;
78 };
79
80
81 #endif