1 #define ICMP_ECHOREPLY 0
6 #if (BYTE_ORDER == LITTLE_ENDIAN || BYTE_ORDER == PDP_ENDIAN)
7 u_char ip_hl:4, /* header length */
10 u_char ip_v:4, /* version */
11 ip_hl:4; /* header length */
13 u_char ip_tos; /* type of service */
14 short ip_len; /* total length */
15 u_short ip_id; /* identification */
16 short ip_off; /* fragment offset field */
17 #define IP_DF 0x4000 /* dont fragment flag */
18 #define IP_MF 0x2000 /* more fragments flag */
19 u_char ip_ttl; /* time to live */
20 u_char ip_p; /* protocol */
21 u_short ip_sum; /* checksum */
22 struct in_addr ip_src,ip_dst; /* source and dest address */
25 #define n_short u_short /* normally defined in in_systm.h */
26 #define n_long u_int /* redefine for 64-bit machines */
27 #define n_time u_int /* redefine for 64-bit machines */
30 u_char icmp_type; /* type of message, see below */
31 u_char icmp_code; /* type sub code */
32 u_short icmp_cksum; /* ones complement cksum of struct */
34 u_char ih_pptr; /* ICMP_PARAMPROB */
35 struct in_addr ih_gwaddr; /* ICMP_REDIRECT */
42 #define icmp_pptr icmp_hun.ih_pptr
43 #define icmp_gwaddr icmp_hun.ih_gwaddr
44 #define icmp_id icmp_hun.ih_idseq.icd_id
45 #define icmp_seq icmp_hun.ih_idseq.icd_seq
46 #define icmp_void icmp_hun.ih_void
55 /* options and then 64 bits of data */
60 #define icmp_otime icmp_dun.id_ts.its_otime
61 #define icmp_rtime icmp_dun.id_ts.its_rtime
62 #define icmp_ttime icmp_dun.id_ts.its_ttime
63 #define icmp_ip icmp_dun.id_ip.idi_ip
64 #define icmp_mask icmp_dun.id_mask
65 #define icmp_data icmp_dun.id_data