summaryrefslogtreecommitdiff
path: root/minix/include/net/gen/icmp_hdr.h
blob: 8e6571dcefa47d1c6e0b1e63debd87327271c3e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*
server/ip/gen/icmp_hdr.h
*/

#ifndef __SERVER__IP__GEN__ICMP_HDR_H__
#define __SERVER__IP__GEN__ICMP_HDR_H__

typedef struct icmp_id_seq
{
	u16_t	iis_id, iis_seq;
} icmp_id_seq_t;

typedef struct icmp_ip_id
{
	ip_hdr_t iii_hdr;
	/* ip_hdr_options and 64 bytes of data */
} icmp_ip_id_t;

typedef struct icmp_ram		/* RFC 1256 */
{
	u8_t	iram_na;
	u8_t	iram_aes;
	u16_t	iram_lt;
} icmp_ram_t;

typedef struct icmp_pp
{
	u8_t	ipp_ptr;
	u8_t	ipp_unused[3];
} icmp_pp_t;

typedef struct icmp_mtu		/* RFC 1191 */
{
	u16_t	im_unused;
	u16_t	im_mtu;
} icmp_mtu_t;

typedef struct icmp_hdr
{
	u8_t ih_type, ih_code;
	u16_t ih_chksum;
	union
	{
		u32_t ihh_unused;
		icmp_id_seq_t ihh_idseq;
		ipaddr_t ihh_gateway;
		icmp_ram_t ihh_ram;
		icmp_pp_t ihh_pp;
		icmp_mtu_t ihh_mtu;
	} ih_hun;
	union
	{
		icmp_ip_id_t ihd_ipid;
		u8_t uhd_data[1];
	} ih_dun;
} icmp_hdr_t;

#endif /* __SERVER__IP__GEN__ICMP_HDR_H__ */

/*
 * $PchId: icmp_hdr.h,v 1.5 2002/06/10 07:10:48 philip Exp $
 */