1 /*	@(#)if_arp.h 1.5 88/08/19 SMI; from UCB 7.1 1/24/86	*/
2 /*
3  * Copyright (c) 1986 Regents of the University of California.
4  * All rights reserved.  The Berkeley software License Agreement
5  * specifies the terms and conditions for redistribution.
6  */
7 
8 /*
9  * $Id: $
10  * $DateTime: $
11  * $Change: $
12  */
13 
14 #ifndef _net_if_arp_h
15 #define _net_if_arp_h
16 
17 /*
18  * Address Resolution Protocol.
19  *
20  * See RFC 826 for protocol description.  ARP packets are variable
21  * in size; the arphdr structure defines the fixed-length portion.
22  * Protocol type values are the same as those for 10 Mb/s Ethernet.
23  * It is followed by the variable-sized fields ar_sha, arp_spa,
24  * arp_tha and arp_tpa in that order, according to the lengths
25  * specified.  Field names used correspond to RFC 826.
26  */
27 struct	arphdr {
28 	u_short	ar_hrd;		/* format of hardware address */
29 #define ARPHRD_ETHER 	1	/* ethernet hardware address */
30 	u_short	ar_pro;		/* format of protocol address */
31 	u_char	ar_hln;		/* length of hardware address */
32 	u_char	ar_pln;		/* length of protocol address */
33 	u_short	ar_op;		/* one of: */
34 #define	ARPOP_REQUEST	1	/* request to resolve address */
35 #define	ARPOP_REPLY	2	/* response to previous request */
36 #define	REVARP_REQUEST	3	/* Reverse ARP request */
37 #define	REVARP_REPLY	4	/* Reverse ARP reply */
38 	/*
39 	 * The remaining fields are variable in size,
40 	 * according to the sizes above, and are defined
41 	 * as appropriate for specific hardware/protocol
42 	 * combinations.  (E.g., see <netinet/if_ether.h>.)
43 	 */
44 #ifdef	notdef
45 	u_char	ar_sha[];	/* sender hardware address */
46 	u_char	ar_spa[];	/* sender protocol address */
47 	u_char	ar_tha[];	/* target hardware address */
48 	u_char	ar_tpa[];	/* target protocol address */
49 #endif	notdef
50 };
51 #endif
52