blob: 03aa08728c237fc0bba51c0a490a8baf434dbe19 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
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 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI_LINUX_ICMP_H
20#define _UAPI_LINUX_ICMP_H
21#include <linux/types.h>
22#define ICMP_ECHOREPLY 0
Ben Cheng655a7c02013-10-16 16:09:24 -070023#define ICMP_DEST_UNREACH 3
24#define ICMP_SOURCE_QUENCH 4
25#define ICMP_REDIRECT 5
26#define ICMP_ECHO 8
Ben Cheng655a7c02013-10-16 16:09:24 -070027#define ICMP_TIME_EXCEEDED 11
28#define ICMP_PARAMETERPROB 12
29#define ICMP_TIMESTAMP 13
30#define ICMP_TIMESTAMPREPLY 14
Ben Cheng655a7c02013-10-16 16:09:24 -070031#define ICMP_INFO_REQUEST 15
32#define ICMP_INFO_REPLY 16
33#define ICMP_ADDRESS 17
34#define ICMP_ADDRESSREPLY 18
Ben Cheng655a7c02013-10-16 16:09:24 -070035#define NR_ICMP_TYPES 18
36#define ICMP_NET_UNREACH 0
37#define ICMP_HOST_UNREACH 1
38#define ICMP_PROT_UNREACH 2
Ben Cheng655a7c02013-10-16 16:09:24 -070039#define ICMP_PORT_UNREACH 3
40#define ICMP_FRAG_NEEDED 4
41#define ICMP_SR_FAILED 5
42#define ICMP_NET_UNKNOWN 6
Ben Cheng655a7c02013-10-16 16:09:24 -070043#define ICMP_HOST_UNKNOWN 7
44#define ICMP_HOST_ISOLATED 8
45#define ICMP_NET_ANO 9
46#define ICMP_HOST_ANO 10
Ben Cheng655a7c02013-10-16 16:09:24 -070047#define ICMP_NET_UNR_TOS 11
48#define ICMP_HOST_UNR_TOS 12
49#define ICMP_PKT_FILTERED 13
50#define ICMP_PREC_VIOLATION 14
Ben Cheng655a7c02013-10-16 16:09:24 -070051#define ICMP_PREC_CUTOFF 15
52#define NR_ICMP_UNREACH 15
53#define ICMP_REDIR_NET 0
54#define ICMP_REDIR_HOST 1
Ben Cheng655a7c02013-10-16 16:09:24 -070055#define ICMP_REDIR_NETTOS 2
56#define ICMP_REDIR_HOSTTOS 3
57#define ICMP_EXC_TTL 0
58#define ICMP_EXC_FRAGTIME 1
Ben Cheng655a7c02013-10-16 16:09:24 -070059struct icmphdr {
Tao Baod7db5942015-01-28 10:07:51 -080060 __u8 type;
61 __u8 code;
62 __sum16 checksum;
Tao Baod7db5942015-01-28 10:07:51 -080063 union {
64 struct {
65 __be16 id;
66 __be16 sequence;
Tao Baod7db5942015-01-28 10:07:51 -080067 } echo;
68 __be32 gateway;
69 struct {
70 __be16 __linux_unused;
Tao Baod7db5942015-01-28 10:07:51 -080071 __be16 mtu;
72 } frag;
Christopher Ferris49f525c2016-12-12 14:55:36 -080073 __u8 reserved[4];
Tao Baod7db5942015-01-28 10:07:51 -080074 } un;
Christopher Ferris49f525c2016-12-12 14:55:36 -080075};
Ben Cheng655a7c02013-10-16 16:09:24 -070076#define ICMP_FILTER 1
77struct icmp_filter {
Tao Baod7db5942015-01-28 10:07:51 -080078 __u32 data;
Christopher Ferris49f525c2016-12-12 14:55:36 -080079};
Ben Cheng655a7c02013-10-16 16:09:24 -070080#endif