xref: /illumos-gate/usr/src/uts/common/netinet/arp.h (revision 01685f97)
17c478bd9Sstevel@tonic-gate /*
2*01685f97SSowmini Varadhan  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
37c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
47c478bd9Sstevel@tonic-gate  */
57c478bd9Sstevel@tonic-gate 
67c478bd9Sstevel@tonic-gate /*
77c478bd9Sstevel@tonic-gate  * Copyright (c) 1982, 1986 Regents of the University of California.
87c478bd9Sstevel@tonic-gate  * All rights reserved. The Berkeley software License Agreement
97c478bd9Sstevel@tonic-gate  * specifies the terms and conditions for redistribution.
107c478bd9Sstevel@tonic-gate  */
117c478bd9Sstevel@tonic-gate 
127c478bd9Sstevel@tonic-gate #ifndef	_NETINET_ARP_H
137c478bd9Sstevel@tonic-gate #define	_NETINET_ARP_H
147c478bd9Sstevel@tonic-gate 
1569bb4bb4Scarlsonj #include <sys/types.h>
1669bb4bb4Scarlsonj #include <sys/ethernet.h>
1769bb4bb4Scarlsonj #include <sys/socket.h>
18*01685f97SSowmini Varadhan #include <net/if_arp.h>
1969bb4bb4Scarlsonj 
207c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
217c478bd9Sstevel@tonic-gate extern "C" {
227c478bd9Sstevel@tonic-gate #endif
237c478bd9Sstevel@tonic-gate 
247c478bd9Sstevel@tonic-gate /*
257c478bd9Sstevel@tonic-gate  * Ethernet Address Resolution Protocol.
267c478bd9Sstevel@tonic-gate  *
277c478bd9Sstevel@tonic-gate  * See RFC 826 for protocol description.  Structure below is adapted
287c478bd9Sstevel@tonic-gate  * to resolving internet addresses.  Field names used correspond to
297c478bd9Sstevel@tonic-gate  * RFC 826.
307c478bd9Sstevel@tonic-gate  */
317c478bd9Sstevel@tonic-gate struct	ether_arp {
327c478bd9Sstevel@tonic-gate 	struct	arphdr ea_hdr;		/* fixed-size header */
337c478bd9Sstevel@tonic-gate 	struct ether_addr arp_sha;	/* sender hardware address */
347c478bd9Sstevel@tonic-gate 	uchar_t	arp_spa[4];		/* sender protocol address */
357c478bd9Sstevel@tonic-gate 	struct ether_addr arp_tha;	/* target hardware address */
367c478bd9Sstevel@tonic-gate 	uchar_t	arp_tpa[4];		/* target protocol address */
377c478bd9Sstevel@tonic-gate };
387c478bd9Sstevel@tonic-gate #define	arp_hrd	ea_hdr.ar_hrd
397c478bd9Sstevel@tonic-gate #define	arp_pro	ea_hdr.ar_pro
407c478bd9Sstevel@tonic-gate #define	arp_hln	ea_hdr.ar_hln
417c478bd9Sstevel@tonic-gate #define	arp_pln	ea_hdr.ar_pln
427c478bd9Sstevel@tonic-gate #define	arp_op	ea_hdr.ar_op
437c478bd9Sstevel@tonic-gate 
447c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
457c478bd9Sstevel@tonic-gate }
467c478bd9Sstevel@tonic-gate #endif
477c478bd9Sstevel@tonic-gate 
487c478bd9Sstevel@tonic-gate #endif	/* _NETINET_ARP_H */
49