1 /* 2 * This header was generated from the Linux kernel headers by update_headers.py, 3 * to provide necessary information from kernel to userspace, such as constants, 4 * structures, and macros, and thus, contains no copyrightable information. 5 */ 6 #ifndef _UAPI_LINUX_ICMP_H 7 #define _UAPI_LINUX_ICMP_H 8 #include <linux/types.h> 9 #define ICMP_ECHOREPLY 0 10 #define ICMP_DEST_UNREACH 3 11 #define ICMP_SOURCE_QUENCH 4 12 #define ICMP_REDIRECT 5 13 #define ICMP_ECHO 8 14 #define ICMP_TIME_EXCEEDED 11 15 #define ICMP_PARAMETERPROB 12 16 #define ICMP_TIMESTAMP 13 17 #define ICMP_TIMESTAMPREPLY 14 18 #define ICMP_INFO_REQUEST 15 19 #define ICMP_INFO_REPLY 16 20 #define ICMP_ADDRESS 17 21 #define ICMP_ADDRESSREPLY 18 22 #define NR_ICMP_TYPES 18 23 #define ICMP_NET_UNREACH 0 24 #define ICMP_HOST_UNREACH 1 25 #define ICMP_PROT_UNREACH 2 26 #define ICMP_PORT_UNREACH 3 27 #define ICMP_FRAG_NEEDED 4 28 #define ICMP_SR_FAILED 5 29 #define ICMP_NET_UNKNOWN 6 30 #define ICMP_HOST_UNKNOWN 7 31 #define ICMP_HOST_ISOLATED 8 32 #define ICMP_NET_ANO 9 33 #define ICMP_HOST_ANO 10 34 #define ICMP_NET_UNR_TOS 11 35 #define ICMP_HOST_UNR_TOS 12 36 #define ICMP_PKT_FILTERED 13 37 #define ICMP_PREC_VIOLATION 14 38 #define ICMP_PREC_CUTOFF 15 39 #define NR_ICMP_UNREACH 15 40 #define ICMP_REDIR_NET 0 41 #define ICMP_REDIR_HOST 1 42 #define ICMP_REDIR_NETTOS 2 43 #define ICMP_REDIR_HOSTTOS 3 44 #define ICMP_EXC_TTL 0 45 #define ICMP_EXC_FRAGTIME 1 46 struct icmphdr { 47 __u8 type; 48 __u8 code; 49 __sum16 checksum; 50 union { 51 struct { 52 __be16 id; 53 __be16 sequence; 54 } echo; 55 __be32 gateway; 56 struct { 57 __be16 __linux_unused; 58 __be16 mtu; 59 } frag; 60 __u8 reserved[4]; 61 } un; 62 }; 63 #define ICMP_FILTER 1 64 struct icmp_filter { 65 __u32 data; 66 }; 67 #endif 68