xref: /illumos-gate/usr/src/uts/common/netinet/arp.h (revision fb2a9bae0030340ad72b9c26ba1ffee2ee3cafec)
1 /*
2  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
3  * Use is subject to license terms.
4  */
5 
6 /*
7  * Copyright (c) 1982, 1986 Regents of the University of California.
8  * All rights reserved. The Berkeley software License Agreement
9  * specifies the terms and conditions for redistribution.
10  */
11 
12 #ifndef	_NETINET_ARP_H
13 #define	_NETINET_ARP_H
14 
15 #include <sys/types.h>
16 #include <sys/ethernet.h>
17 #include <sys/socket.h>
18 #include <net/if_arp.h>
19 
20 #ifdef	__cplusplus
21 extern "C" {
22 #endif
23 
24 /*
25  * Ethernet Address Resolution Protocol.
26  *
27  * See RFC 826 for protocol description.  Structure below is adapted
28  * to resolving internet addresses.  Field names used correspond to
29  * RFC 826.
30  */
31 struct	ether_arp {
32 	struct	arphdr ea_hdr;		/* fixed-size header */
33 	struct ether_addr arp_sha;	/* sender hardware address */
34 	uchar_t	arp_spa[4];		/* sender protocol address */
35 	struct ether_addr arp_tha;	/* target hardware address */
36 	uchar_t	arp_tpa[4];		/* target protocol address */
37 };
38 #define	arp_hrd	ea_hdr.ar_hrd
39 #define	arp_pro	ea_hdr.ar_pro
40 #define	arp_hln	ea_hdr.ar_hln
41 #define	arp_pln	ea_hdr.ar_pln
42 #define	arp_op	ea_hdr.ar_op
43 
44 #ifdef	__cplusplus
45 }
46 #endif
47 
48 #endif	/* _NETINET_ARP_H */
49