/* * INET An implementation of the TCP/IP protocol suite for the LINUX * operating system. INET is implemented using the BSD Socket * interface as the means of communication with the user level. * * Definitions for the ICMP protocol. * * Version: @(#)icmp.h 1.0.3 04/28/93 * * Author: Fred N. van Kempen, * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ #ifndef _LINUX_ICMP_H #define _LINUX_ICMP_H #include #define ICMP_ECHOREPLY 0 #define ICMP_DEST_UNREACH 3 #define ICMP_SOURCE_QUENCH 4 #define ICMP_REDIRECT 5 #define ICMP_ECHO 8 #define ICMP_TIME_EXCEEDED 11 #define ICMP_PARAMETERPROB 12 #define ICMP_TIMESTAMP 13 #define ICMP_TIMESTAMPREPLY 14 #define ICMP_INFO_REQUEST 15 #define ICMP_INFO_REPLY 16 #define ICMP_ADDRESS 17 #define ICMP_ADDRESSREPLY 18 #define NR_ICMP_TYPES 18 #define ICMP_NET_UNREACH 0 #define ICMP_HOST_UNREACH 1 #define ICMP_PROT_UNREACH 2 #define ICMP_PORT_UNREACH 3 #define ICMP_FRAG_NEEDED 4 #define ICMP_SR_FAILED 5 #define ICMP_NET_UNKNOWN 6 #define ICMP_HOST_UNKNOWN 7 #define ICMP_HOST_ISOLATED 8 #define ICMP_NET_ANO 9 #define ICMP_HOST_ANO 10 #define ICMP_NET_UNR_TOS 11 #define ICMP_HOST_UNR_TOS 12 #define ICMP_PKT_FILTERED 13 #define ICMP_PREC_VIOLATION 14 #define ICMP_PREC_CUTOFF 15 #define NR_ICMP_UNREACH 15 #define ICMP_REDIR_NET 0 #define ICMP_REDIR_HOST 1 #define ICMP_REDIR_NETTOS 2 #define ICMP_REDIR_HOSTTOS 3 #define ICMP_EXC_TTL 0 #define ICMP_EXC_FRAGTIME 1 struct icmphdr { __u8 type; __u8 code; __sum16 checksum; union { struct { __be16 id; __be16 sequence; } echo; __be32 gateway; struct { __be16 __unused; __be16 mtu; } frag; } un; }; #ifdef __KERNEL__ #include static inline struct icmphdr *icmp_hdr(const struct sk_buff *skb) { return (struct icmphdr *)skb_transport_header(skb); } #endif #define ICMP_FILTER 1 struct icmp_filter { __u32 data; }; #endif