blob: c5b58bb67232c4a449b8faf6831bf10590bf8ef4 [file] [log] [blame]
The Android Open Source Project1dc9e472009-03-03 19:28:35 -08001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 ****************************************************************************
11 ****************************************************************************/
12#ifndef _LINUX_ICMP_H
13#define _LINUX_ICMP_H
Ben Cheng4b29af02012-03-07 16:14:53 -080014
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080015#include <linux/types.h>
Ben Cheng4b29af02012-03-07 16:14:53 -080016
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080017#define ICMP_ECHOREPLY 0
18#define ICMP_DEST_UNREACH 3
19#define ICMP_SOURCE_QUENCH 4
20#define ICMP_REDIRECT 5
21#define ICMP_ECHO 8
22#define ICMP_TIME_EXCEEDED 11
23#define ICMP_PARAMETERPROB 12
24#define ICMP_TIMESTAMP 13
25#define ICMP_TIMESTAMPREPLY 14
26#define ICMP_INFO_REQUEST 15
27#define ICMP_INFO_REPLY 16
28#define ICMP_ADDRESS 17
29#define ICMP_ADDRESSREPLY 18
30#define NR_ICMP_TYPES 18
Ben Cheng4b29af02012-03-07 16:14:53 -080031
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080032#define ICMP_NET_UNREACH 0
33#define ICMP_HOST_UNREACH 1
34#define ICMP_PROT_UNREACH 2
35#define ICMP_PORT_UNREACH 3
36#define ICMP_FRAG_NEEDED 4
37#define ICMP_SR_FAILED 5
38#define ICMP_NET_UNKNOWN 6
39#define ICMP_HOST_UNKNOWN 7
40#define ICMP_HOST_ISOLATED 8
41#define ICMP_NET_ANO 9
42#define ICMP_HOST_ANO 10
43#define ICMP_NET_UNR_TOS 11
44#define ICMP_HOST_UNR_TOS 12
45#define ICMP_PKT_FILTERED 13
46#define ICMP_PREC_VIOLATION 14
47#define ICMP_PREC_CUTOFF 15
48#define NR_ICMP_UNREACH 15
Ben Cheng4b29af02012-03-07 16:14:53 -080049
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080050#define ICMP_REDIR_NET 0
51#define ICMP_REDIR_HOST 1
52#define ICMP_REDIR_NETTOS 2
53#define ICMP_REDIR_HOSTTOS 3
Ben Cheng4b29af02012-03-07 16:14:53 -080054
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080055#define ICMP_EXC_TTL 0
56#define ICMP_EXC_FRAGTIME 1
Ben Cheng4b29af02012-03-07 16:14:53 -080057
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080058struct icmphdr {
59 __u8 type;
60 __u8 code;
61 __u16 checksum;
62 union {
63 struct {
64 __u16 id;
65 __u16 sequence;
66 } echo;
67 __u32 gateway;
68 struct {
69 __u16 __unused_field;
70 __u16 mtu;
71 } frag;
72 } un;
73};
Ben Cheng4b29af02012-03-07 16:14:53 -080074
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080075#define ICMP_FILTER 1
Ben Cheng4b29af02012-03-07 16:14:53 -080076
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080077struct icmp_filter {
78 __u32 data;
79};
Ben Cheng4b29af02012-03-07 16:14:53 -080080
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080081#endif