xref: /titanic_51/usr/src/uts/common/inet/arp.h (revision bd670b35a010421b6e1a5536c34453a827007c81)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 /*
22  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 /* Copyright (c) 1990 Mentat Inc. */
26 
27 #ifndef	_INET_ARP_H
28 #define	_INET_ARP_H
29 
30 #include <sys/types.h>
31 
32 #ifdef	__cplusplus
33 extern "C" {
34 #endif
35 
36 /*
37  * Warning: the interfaces described in this file are private to the
38  * implementation.  They may change at any time without notice and are not
39  * documented.  Do not depend on them.
40  */
41 
42 #define	ARP_REQUEST	1
43 #define	ARP_RESPONSE	2
44 #define	RARP_REQUEST	3
45 #define	RARP_RESPONSE	4
46 
47 /* Both ace_flags; must also modify arp.c in mdb */
48 #define	ACE_F_PERMANENT		0x0001
49 #define	ACE_F_PUBLISH		0x0002
50 #define	ACE_F_DYING		0x0004
51 #define	ACE_F_RESOLVED		0x0008
52 /* Using bit mask extraction from target address */
53 #define	ACE_F_MAPPING		0x0010
54 #define	ACE_F_MYADDR		0x0020	/* IP claims to own this address */
55 #define	ACE_F_UNVERIFIED	0x0040	/* DAD not yet complete */
56 #define	ACE_F_AUTHORITY		0x0080	/* check for duplicate MACs */
57 #define	ACE_F_DEFEND		0x0100	/* single transmit (area_flags only) */
58 #define	ACE_F_OLD		0x0200	/* should revalidate when IP asks */
59 #define	ACE_F_FAST		0x0400	/* fast probe enabled */
60 #define	ACE_F_DELAYED		0x0800	/* rescheduled on arp_defend_rate */
61 #define	ACE_F_DAD_ABORTED	0x1000	/* DAD was aborted on link down */
62 
63 /* Client Notification Codes */
64 #define	AR_CN_BOGON	1
65 #define	AR_CN_ANNOUNCE	2
66 #define	AR_CN_READY	3		/* DAD complete; address usable */
67 #define	AR_CN_FAILED	4		/* DAD failed; address unusable */
68 
69 /* ARP Header */
70 typedef struct arh_s {
71 	uchar_t	arh_hardware[2];
72 	uchar_t	arh_proto[2];
73 	uchar_t	arh_hlen;
74 	uchar_t	arh_plen;
75 	uchar_t	arh_operation[2];
76 	/* The sender and target hw/proto pairs follow */
77 } arh_t;
78 
79 #ifdef	__cplusplus
80 }
81 #endif
82 
83 #endif	/* _INET_ARP_H */
84