xref: /onnv-gate/usr/src/uts/common/netinet/arp.h (revision 12038:a76f1fd5c122)
10Sstevel@tonic-gate /*
2*12038SSowmini.Varadhan@Sun.COM  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
30Sstevel@tonic-gate  * Use is subject to license terms.
40Sstevel@tonic-gate  */
50Sstevel@tonic-gate 
60Sstevel@tonic-gate /*
70Sstevel@tonic-gate  * Copyright (c) 1982, 1986 Regents of the University of California.
80Sstevel@tonic-gate  * All rights reserved. The Berkeley software License Agreement
90Sstevel@tonic-gate  * specifies the terms and conditions for redistribution.
100Sstevel@tonic-gate  */
110Sstevel@tonic-gate 
120Sstevel@tonic-gate #ifndef	_NETINET_ARP_H
130Sstevel@tonic-gate #define	_NETINET_ARP_H
140Sstevel@tonic-gate 
152546Scarlsonj #include <sys/types.h>
162546Scarlsonj #include <sys/ethernet.h>
172546Scarlsonj #include <sys/socket.h>
18*12038SSowmini.Varadhan@Sun.COM #include <net/if_arp.h>
192546Scarlsonj 
200Sstevel@tonic-gate #ifdef	__cplusplus
210Sstevel@tonic-gate extern "C" {
220Sstevel@tonic-gate #endif
230Sstevel@tonic-gate 
240Sstevel@tonic-gate /*
250Sstevel@tonic-gate  * Ethernet Address Resolution Protocol.
260Sstevel@tonic-gate  *
270Sstevel@tonic-gate  * See RFC 826 for protocol description.  Structure below is adapted
280Sstevel@tonic-gate  * to resolving internet addresses.  Field names used correspond to
290Sstevel@tonic-gate  * RFC 826.
300Sstevel@tonic-gate  */
310Sstevel@tonic-gate struct	ether_arp {
320Sstevel@tonic-gate 	struct	arphdr ea_hdr;		/* fixed-size header */
330Sstevel@tonic-gate 	struct ether_addr arp_sha;	/* sender hardware address */
340Sstevel@tonic-gate 	uchar_t	arp_spa[4];		/* sender protocol address */
350Sstevel@tonic-gate 	struct ether_addr arp_tha;	/* target hardware address */
360Sstevel@tonic-gate 	uchar_t	arp_tpa[4];		/* target protocol address */
370Sstevel@tonic-gate };
380Sstevel@tonic-gate #define	arp_hrd	ea_hdr.ar_hrd
390Sstevel@tonic-gate #define	arp_pro	ea_hdr.ar_pro
400Sstevel@tonic-gate #define	arp_hln	ea_hdr.ar_hln
410Sstevel@tonic-gate #define	arp_pln	ea_hdr.ar_pln
420Sstevel@tonic-gate #define	arp_op	ea_hdr.ar_op
430Sstevel@tonic-gate 
440Sstevel@tonic-gate #ifdef	__cplusplus
450Sstevel@tonic-gate }
460Sstevel@tonic-gate #endif
470Sstevel@tonic-gate 
480Sstevel@tonic-gate #endif	/* _NETINET_ARP_H */
49