1 /* icmp.h 2 */ 3 #ifndef _SENDIP_ICMP_H 4 #define _SENDIP_ICMP_H 5 6 #define ICMP6_ECHO_REQUEST 128 7 #define ICMP_ECHO 8 8 9 /* ICMP HEADER 10 * Copied from glibc 2.2, reproduced here without code specific stuff 11 */ 12 typedef struct { 13 u_int8_t type; 14 u_int8_t code; 15 u_int16_t check; 16 } icmp_header; 17 18 19 /* Defines for which parts have been modified 20 */ 21 #define ICMP_MOD_TYPE 1 22 #define ICMP_MOD_CODE 1<<1 23 #define ICMP_MOD_CHECK 1<<2 24 25 /* Options 26 */ 27 sendip_option icmp_opts[] = { 28 {"t",1,"ICMP message type","ICMP_ECHO (8), or ICMP6_ECHO_REQUEST (128) if embedded in an IPv6 packet"}, 29 {"d",1,"ICMP code","0"}, 30 {"c",1,"ICMP checksum","Correct"} 31 }; 32 33 #endif /* _SENDIP_ICMP_H */ 34