1*7c478bd9Sstevel@tonic-gate /*
2*7c478bd9Sstevel@tonic-gate  * CDDL HEADER START
3*7c478bd9Sstevel@tonic-gate  *
4*7c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*7c478bd9Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
6*7c478bd9Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
7*7c478bd9Sstevel@tonic-gate  * with the License.
8*7c478bd9Sstevel@tonic-gate  *
9*7c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*7c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
11*7c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
12*7c478bd9Sstevel@tonic-gate  * and limitations under the License.
13*7c478bd9Sstevel@tonic-gate  *
14*7c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
15*7c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*7c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
17*7c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
18*7c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
19*7c478bd9Sstevel@tonic-gate  *
20*7c478bd9Sstevel@tonic-gate  * CDDL HEADER END
21*7c478bd9Sstevel@tonic-gate  */
22*7c478bd9Sstevel@tonic-gate /*
23*7c478bd9Sstevel@tonic-gate  * Copyright (c) 1999 by Sun Microsystems, Inc.
24*7c478bd9Sstevel@tonic-gate  * All rights reserved.
25*7c478bd9Sstevel@tonic-gate  */
26*7c478bd9Sstevel@tonic-gate 
27*7c478bd9Sstevel@tonic-gate #ifndef	_SNOOP_MIP_H
28*7c478bd9Sstevel@tonic-gate #define	_SNOOP_MIP_H
29*7c478bd9Sstevel@tonic-gate 
30*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus
31*7c478bd9Sstevel@tonic-gate extern "C" {
32*7c478bd9Sstevel@tonic-gate #endif
33*7c478bd9Sstevel@tonic-gate 
34*7c478bd9Sstevel@tonic-gate #define	ALIGN(ptr)		(ptr)
35*7c478bd9Sstevel@tonic-gate 
36*7c478bd9Sstevel@tonic-gate /*
37*7c478bd9Sstevel@tonic-gate  *	E X T E N S I O N S
38*7c478bd9Sstevel@tonic-gate  */
39*7c478bd9Sstevel@tonic-gate 
40*7c478bd9Sstevel@tonic-gate typedef struct {
41*7c478bd9Sstevel@tonic-gate 	uchar_t		type;
42*7c478bd9Sstevel@tonic-gate 	uchar_t		length;
43*7c478bd9Sstevel@tonic-gate } exthdr_t;
44*7c478bd9Sstevel@tonic-gate 
45*7c478bd9Sstevel@tonic-gate /* This header is used for Generalized MIP Authentication Extensions */
46*7c478bd9Sstevel@tonic-gate typedef struct {
47*7c478bd9Sstevel@tonic-gate 	uint8_t		type;
48*7c478bd9Sstevel@tonic-gate 	uint8_t		subtype;
49*7c478bd9Sstevel@tonic-gate 	uint16_t	length;
50*7c478bd9Sstevel@tonic-gate } gen_exthdr_t;
51*7c478bd9Sstevel@tonic-gate 
52*7c478bd9Sstevel@tonic-gate #define	MN_HA_AUTH	32
53*7c478bd9Sstevel@tonic-gate #define	MN_FA_AUTH	33
54*7c478bd9Sstevel@tonic-gate #define	FA_HA_AUTH	34
55*7c478bd9Sstevel@tonic-gate #define	GEN_AUTH	36
56*7c478bd9Sstevel@tonic-gate #define	MN_HA_KEY	126
57*7c478bd9Sstevel@tonic-gate #define	MN_HA_TRAVERSE	129
58*7c478bd9Sstevel@tonic-gate #define	ENCAP_DELIV	130
59*7c478bd9Sstevel@tonic-gate #define	MN_NAI		131
60*7c478bd9Sstevel@tonic-gate #define	FA_CHALLENGE	132
61*7c478bd9Sstevel@tonic-gate #define	MN_FA_KEY	133
62*7c478bd9Sstevel@tonic-gate 
63*7c478bd9Sstevel@tonic-gate /* Subtypes for Generalized MIP Authentication Extension (GEN_AUTH) */
64*7c478bd9Sstevel@tonic-gate #define	GEN_AUTH_MN_AAA		1
65*7c478bd9Sstevel@tonic-gate 
66*7c478bd9Sstevel@tonic-gate #define	KEY_ALG_NONE		0
67*7c478bd9Sstevel@tonic-gate #define	SA_MD5_MODE_PREF_SUF	2	/* ...in prefix+suffix */
68*7c478bd9Sstevel@tonic-gate #define	SA_HMAC_MD5		3
69*7c478bd9Sstevel@tonic-gate 
70*7c478bd9Sstevel@tonic-gate /*
71*7c478bd9Sstevel@tonic-gate  * 	R E G I S T R A T I O N    P R O T O C O L
72*7c478bd9Sstevel@tonic-gate  */
73*7c478bd9Sstevel@tonic-gate 
74*7c478bd9Sstevel@tonic-gate #define	REG_TYPE_REQ	1
75*7c478bd9Sstevel@tonic-gate #define	REG_TYPE_REP	3
76*7c478bd9Sstevel@tonic-gate 
77*7c478bd9Sstevel@tonic-gate typedef struct ident_str {
78*7c478bd9Sstevel@tonic-gate 	uint32_t high_bits;	/* generated by the HA */
79*7c478bd9Sstevel@tonic-gate 	uint32_t low_bits;	/* generated by the MN */
80*7c478bd9Sstevel@tonic-gate } ident_t;
81*7c478bd9Sstevel@tonic-gate 
82*7c478bd9Sstevel@tonic-gate #ifdef __sparc
83*7c478bd9Sstevel@tonic-gate #ifdef _BIT_FIELDS_HTOL
84*7c478bd9Sstevel@tonic-gate typedef struct registration_request_str {
85*7c478bd9Sstevel@tonic-gate 	uchar_t		type;		/* must be REG_TYPE_REQ */
86*7c478bd9Sstevel@tonic-gate 	uchar_t
87*7c478bd9Sstevel@tonic-gate 		Simultaneous_registration : 	1,
88*7c478bd9Sstevel@tonic-gate 		Broadcasts_desired : 		1,
89*7c478bd9Sstevel@tonic-gate 		Decapsulation_done_locally : 	1, /* ...by the popup MN */
90*7c478bd9Sstevel@tonic-gate 		Minimal_encap_desired : 	1,
91*7c478bd9Sstevel@tonic-gate 		GRE_encap_desired : 		1,
92*7c478bd9Sstevel@tonic-gate 		VJ_compression_desired : 	1,
93*7c478bd9Sstevel@tonic-gate 		BiDirectional_Tunnel_desired : 	1,
94*7c478bd9Sstevel@tonic-gate 		reserved : 			1;
95*7c478bd9Sstevel@tonic-gate 	ushort_t	lifetime;	/* 0 = dereg; 0xffff = infinity */
96*7c478bd9Sstevel@tonic-gate 	in_addr_t	home_addr;	/* address of the MN */
97*7c478bd9Sstevel@tonic-gate 	in_addr_t	home_agent_addr; /* address of a HA */
98*7c478bd9Sstevel@tonic-gate 	in_addr_t	care_of_addr;	/* address of decap endpoint */
99*7c478bd9Sstevel@tonic-gate 	ident_t		identification;	/* for replay protection */
100*7c478bd9Sstevel@tonic-gate } regreq_t;
101*7c478bd9Sstevel@tonic-gate #endif /* _BIT_FIELDS_HTOL */
102*7c478bd9Sstevel@tonic-gate #endif /* __sparc */
103*7c478bd9Sstevel@tonic-gate 
104*7c478bd9Sstevel@tonic-gate #ifdef __i386
105*7c478bd9Sstevel@tonic-gate #ifdef _BIT_FIELDS_LTOH
106*7c478bd9Sstevel@tonic-gate typedef struct registration_request_str {
107*7c478bd9Sstevel@tonic-gate 	uchar_t		type;		/* must be REG_TYPE_REQ */
108*7c478bd9Sstevel@tonic-gate 	uchar_t
109*7c478bd9Sstevel@tonic-gate 		reserved : 			1,
110*7c478bd9Sstevel@tonic-gate 		BiDirectional_Tunnel_desired : 	1,
111*7c478bd9Sstevel@tonic-gate 		VJ_compression_desired : 	1,
112*7c478bd9Sstevel@tonic-gate 		GRE_encap_desired : 		1,
113*7c478bd9Sstevel@tonic-gate 		Minimal_encap_desired : 	1,
114*7c478bd9Sstevel@tonic-gate 		Decapsulation_done_locally : 	1, /* ...by the popup MN */
115*7c478bd9Sstevel@tonic-gate 		Broadcasts_desired : 		1,
116*7c478bd9Sstevel@tonic-gate 		Simultaneous_registration : 	1;
117*7c478bd9Sstevel@tonic-gate 	ushort_t	lifetime;	/* 0 = dereg; 0xffff = infinity */
118*7c478bd9Sstevel@tonic-gate 	in_addr_t	home_addr;	/* address of the MN */
119*7c478bd9Sstevel@tonic-gate 	in_addr_t	home_agent_addr; /* address of a HA */
120*7c478bd9Sstevel@tonic-gate 	in_addr_t	care_of_addr;	/* address of decap endpoint */
121*7c478bd9Sstevel@tonic-gate 	ident_t		identification;	/* for replay protection */
122*7c478bd9Sstevel@tonic-gate } regreq_t;
123*7c478bd9Sstevel@tonic-gate #endif /* _BIT_FIELDS_LTOH */
124*7c478bd9Sstevel@tonic-gate #endif /* __i386 */
125*7c478bd9Sstevel@tonic-gate 
126*7c478bd9Sstevel@tonic-gate /*
127*7c478bd9Sstevel@tonic-gate  * Registration Reply sent by a home agent to a mobile node in
128*7c478bd9Sstevel@tonic-gate  * response to a registration request.
129*7c478bd9Sstevel@tonic-gate  */
130*7c478bd9Sstevel@tonic-gate typedef struct registration_reply_str {
131*7c478bd9Sstevel@tonic-gate 	uchar_t		type;		/* must be REG_TYPE_REP */
132*7c478bd9Sstevel@tonic-gate 	uchar_t		code;		/* refer to draft document */
133*7c478bd9Sstevel@tonic-gate 	ushort_t	lifetime;	/* 0 = dereg; 0xffff = infinity */
134*7c478bd9Sstevel@tonic-gate 	in_addr_t	home_addr;	/* address of the mobile node */
135*7c478bd9Sstevel@tonic-gate 	in_addr_t	home_agent_addr; /* address of the home agent */
136*7c478bd9Sstevel@tonic-gate 	ident_t		identification;	/* derived from request's field */
137*7c478bd9Sstevel@tonic-gate } regrep_t;
138*7c478bd9Sstevel@tonic-gate 
139*7c478bd9Sstevel@tonic-gate /* service ok */
140*7c478bd9Sstevel@tonic-gate #define	REPLY_CODE_ACK					0
141*7c478bd9Sstevel@tonic-gate #define	REPLY_CODE_ACK_NO_SIMULTANEOUS			1
142*7c478bd9Sstevel@tonic-gate 
143*7c478bd9Sstevel@tonic-gate /* denied by FA */
144*7c478bd9Sstevel@tonic-gate #define	REPLY_CODE_FA_NACK_UNSPECIFIED			64
145*7c478bd9Sstevel@tonic-gate #define	REPLY_CODE_FA_NACK_PROHIBITED			65
146*7c478bd9Sstevel@tonic-gate #define	REPLY_CODE_FA_NACK_RESOURCES			66
147*7c478bd9Sstevel@tonic-gate #define	REPLY_CODE_FA_NACK_MN_AUTH			67
148*7c478bd9Sstevel@tonic-gate #define	REPLY_CODE_FA_NACK_HA_AUTH			68
149*7c478bd9Sstevel@tonic-gate #define	REPLY_CODE_FA_NACK_LIFETIME			69
150*7c478bd9Sstevel@tonic-gate #define	REPLY_CODE_FA_NACK_BAD_REQUEST			70
151*7c478bd9Sstevel@tonic-gate #define	REPLY_CODE_FA_NACK_BAD_REPLY			71
152*7c478bd9Sstevel@tonic-gate #define	REPLY_CODE_FA_NACK_ENCAP_UNAVAILABLE		72
153*7c478bd9Sstevel@tonic-gate #define	REPLY_CODE_FA_NACK_VJ_UNAVAILABLE		73
154*7c478bd9Sstevel@tonic-gate #define	REPLY_CODE_FA_NACK_BIDIR_TUNNEL_UNAVAILABLE	74
155*7c478bd9Sstevel@tonic-gate #define	REPLY_CODE_FA_NACK_BIDIR_TUNNEL_NO_TBIT		75
156*7c478bd9Sstevel@tonic-gate #define	REPLY_CODE_FA_NACK_BIDIR_TUNNEL_TOO_DISTANT	76
157*7c478bd9Sstevel@tonic-gate #define	REPLY_CODE_FA_NACK_ICMP_HA_NET_UNREACHABLE	80
158*7c478bd9Sstevel@tonic-gate #define	REPLY_CODE_FA_NACK_ICMP_HA_HOST_UNREACHABLE	81
159*7c478bd9Sstevel@tonic-gate #define	REPLY_CODE_FA_NACK_ICMP_HA_PORT_UNREACHABLE	82
160*7c478bd9Sstevel@tonic-gate #define	REPLY_CODE_FA_NACK_ICMP_HA_UNREACHABLE		88
161*7c478bd9Sstevel@tonic-gate #define	REPLY_CODE_FA_NACK_UNIQUE_HOMEADDR_REQD		96
162*7c478bd9Sstevel@tonic-gate #define	REPLY_CODE_FA_NACK_MISSING_NAI			97
163*7c478bd9Sstevel@tonic-gate #define	REPLY_CODE_FA_NACK_MISSING_HOME_AGENT		98
164*7c478bd9Sstevel@tonic-gate #define	REPLY_CODE_FA_NACK_MISSING_HOMEADDR		99
165*7c478bd9Sstevel@tonic-gate #define	REPLY_CODE_FA_NACK_UNKNOWN_CHALLENGE		104
166*7c478bd9Sstevel@tonic-gate #define	REPLY_CODE_FA_NACK_MISSING_CHALLENGE		105
167*7c478bd9Sstevel@tonic-gate #define	REPLY_CODE_FA_NACK_MISSING_MN_FA		106
168*7c478bd9Sstevel@tonic-gate 
169*7c478bd9Sstevel@tonic-gate /* denied by HA */
170*7c478bd9Sstevel@tonic-gate #define	REPLY_CODE_HA_NACK_UNSPECIFIED			128
171*7c478bd9Sstevel@tonic-gate #define	REPLY_CODE_HA_NACK_PROHIBITED			129
172*7c478bd9Sstevel@tonic-gate #define	REPLY_CODE_HA_NACK_RESOURCES			130
173*7c478bd9Sstevel@tonic-gate #define	REPLY_CODE_HA_NACK_MN_AUTH			131
174*7c478bd9Sstevel@tonic-gate #define	REPLY_CODE_HA_NACK_FA_AUTH			132
175*7c478bd9Sstevel@tonic-gate #define	REPLY_CODE_HA_NACK_ID_MISMATCH			133
176*7c478bd9Sstevel@tonic-gate #define	REPLY_CODE_HA_NACK_BAD_REQUEST			134
177*7c478bd9Sstevel@tonic-gate #define	REPLY_CODE_HA_NACK_TOO_MANY_BINDINGS		135
178*7c478bd9Sstevel@tonic-gate #define	REPLY_CODE_HA_NACK_BAD_HA_ADDRESS		136
179*7c478bd9Sstevel@tonic-gate #define	REPLY_CODE_HA_NACK_BIDIR_TUNNEL_UNAVAILABLE	137
180*7c478bd9Sstevel@tonic-gate #define	REPLY_CODE_HA_NACK_BIDIR_TUNNEL_NO_TBIT		138
181*7c478bd9Sstevel@tonic-gate #define	REPLY_CODE_HA_NACK_BIDIR_ENCAP_UNAVAILABLE	139
182*7c478bd9Sstevel@tonic-gate 
183*7c478bd9Sstevel@tonic-gate /*
184*7c478bd9Sstevel@tonic-gate  * OTHER EXTENSIONS
185*7c478bd9Sstevel@tonic-gate  */
186*7c478bd9Sstevel@tonic-gate 
187*7c478bd9Sstevel@tonic-gate /*
188*7c478bd9Sstevel@tonic-gate  * The second set consists of those extensions which may appear only
189*7c478bd9Sstevel@tonic-gate  * in ICMP Router Discovery messages [4].  Currently, Mobile IP
190*7c478bd9Sstevel@tonic-gate  * defines the following Types for Extensions appearing in ICMP
191*7c478bd9Sstevel@tonic-gate  * Router Discovery messages:
192*7c478bd9Sstevel@tonic-gate  *
193*7c478bd9Sstevel@tonic-gate  * 0  One-byte PaddingOne-byte Padding (encoded with no Length nor
194*7c478bd9Sstevel@tonic-gate  * Data field)
195*7c478bd9Sstevel@tonic-gate  * 16  Mobility Agent Advertisement
196*7c478bd9Sstevel@tonic-gate  * 19  Prefix-Lengths
197*7c478bd9Sstevel@tonic-gate  */
198*7c478bd9Sstevel@tonic-gate #define	ICMP_ADV_MSG_PADDING_EXT	0
199*7c478bd9Sstevel@tonic-gate #define	ICMP_ADV_MSG_MOBILITY_AGT_EXT	16
200*7c478bd9Sstevel@tonic-gate #define	ICMP_ADV_MSG_PREFIX_LENGTH_EXT	19
201*7c478bd9Sstevel@tonic-gate #define	ICMP_ADV_MSG_FA_CHALLENGE	24
202*7c478bd9Sstevel@tonic-gate #define	ICMP_ADV_MSG_FA_NAI		25
203*7c478bd9Sstevel@tonic-gate 
204*7c478bd9Sstevel@tonic-gate 
205*7c478bd9Sstevel@tonic-gate /*
206*7c478bd9Sstevel@tonic-gate  * Mobility Agent Advertisement Extension
207*7c478bd9Sstevel@tonic-gate  * The Mobility Agent Adv Extension follows the ICMP Router
208*7c478bd9Sstevel@tonic-gate  * Advertisement fields.It is used to indicate that an ICMP Router
209*7c478bd9Sstevel@tonic-gate  * Advertisement message is also an Agent Advertisement being sent
210*7c478bd9Sstevel@tonic-gate  * by a mobility agent.
211*7c478bd9Sstevel@tonic-gate  *
212*7c478bd9Sstevel@tonic-gate  * Type		16
213*7c478bd9Sstevel@tonic-gate  * Length	(6 + 4*N), where N is the number of care-of addresses
214*7c478bd9Sstevel@tonic-gate  *		advertised.
215*7c478bd9Sstevel@tonic-gate  *
216*7c478bd9Sstevel@tonic-gate  * Sequence Number
217*7c478bd9Sstevel@tonic-gate  * The count of Agent Advertisement messages sent since the
218*7c478bd9Sstevel@tonic-gate  * agent was initialized (Section 2.3.2).
219*7c478bd9Sstevel@tonic-gate  *
220*7c478bd9Sstevel@tonic-gate  * Registration Lifetime
221*7c478bd9Sstevel@tonic-gate  * The longest lifetime (measured in seconds) that this
222*7c478bd9Sstevel@tonic-gate  * agent is willing to accept in any Registration Request.
223*7c478bd9Sstevel@tonic-gate  * A value of 0xffff indicates infinity.  This field has no
224*7c478bd9Sstevel@tonic-gate  * relation to the "Lifetime" field within the ICMP Router
225*7c478bd9Sstevel@tonic-gate  * Advertisement portion of the Agent Advertisement.
226*7c478bd9Sstevel@tonic-gate  *
227*7c478bd9Sstevel@tonic-gate  * R	Registration required.  Registration with this foreign
228*7c478bd9Sstevel@tonic-gate  * agent (or another foreign agent on this link) is required
229*7c478bd9Sstevel@tonic-gate  * rather than using a co-located care-of address.
230*7c478bd9Sstevel@tonic-gate  *
231*7c478bd9Sstevel@tonic-gate  * B	Busy.  The foreign agent will not accept registrations
232*7c478bd9Sstevel@tonic-gate  * from additional mobile nodes.
233*7c478bd9Sstevel@tonic-gate  *
234*7c478bd9Sstevel@tonic-gate  * H	Home agent.  This agent offers service as a home agent
235*7c478bd9Sstevel@tonic-gate  * on the link on which this Agent Advertisement message is
236*7c478bd9Sstevel@tonic-gate  * sent.
237*7c478bd9Sstevel@tonic-gate  *
238*7c478bd9Sstevel@tonic-gate  * F	Foreign agent.  This agent offers service as a foreign
239*7c478bd9Sstevel@tonic-gate  * agent on the link on which this Agent Advertisement
240*7c478bd9Sstevel@tonic-gate  * message is sent.
241*7c478bd9Sstevel@tonic-gate  *
242*7c478bd9Sstevel@tonic-gate  * M	Minimal encapsulation.  This agent implements receiving
243*7c478bd9Sstevel@tonic-gate  * tunneled datagrams that use minimal encapsulation [15].
244*7c478bd9Sstevel@tonic-gate  *
245*7c478bd9Sstevel@tonic-gate  * G	GRE encapsulation.  This agent implements receiving
246*7c478bd9Sstevel@tonic-gate  * tunneled datagrams that use GRE encapsulation [8].
247*7c478bd9Sstevel@tonic-gate  *
248*7c478bd9Sstevel@tonic-gate  * V 	Van Jacobson header compression.  This agent supports use
249*7c478bd9Sstevel@tonic-gate  * of Van Jacobson header compression [10] over the link
250*7c478bd9Sstevel@tonic-gate  * with any registered mobile node.
251*7c478bd9Sstevel@tonic-gate  *
252*7c478bd9Sstevel@tonic-gate  * reserved 	sent as zero; ignored on reception.
253*7c478bd9Sstevel@tonic-gate  *
254*7c478bd9Sstevel@tonic-gate  * Care-of Address(es)
255*7c478bd9Sstevel@tonic-gate  * The advertised foreign agent care-of address(es) provided
256*7c478bd9Sstevel@tonic-gate  * by this foreign agent.  An Agent Advertisement MUST
257*7c478bd9Sstevel@tonic-gate  * include at least one care-of address if the 'F' bit
258*7c478bd9Sstevel@tonic-gate  * is set.  The number of care-of addresses present is
259*7c478bd9Sstevel@tonic-gate  * determined by the Length field in the Extension.
260*7c478bd9Sstevel@tonic-gate  *
261*7c478bd9Sstevel@tonic-gate  * A HA must always be prepared to serve the mobile nodes for
262*7c478bd9Sstevel@tonic-gate  * which it is the home agent. A FA may at times be too busy
263*7c478bd9Sstevel@tonic-gate  * to serve additional MNs; even so, it must continue to send
264*7c478bd9Sstevel@tonic-gate  * Agent Advertisements, so that any mobile nodes already registered
265*7c478bd9Sstevel@tonic-gate  * with it will know that they have not moved out of range of the
266*7c478bd9Sstevel@tonic-gate  * foreign agent and that the  has not failed.  A foreign
267*7c478bd9Sstevel@tonic-gate  * agent may indicate that it is "too busy" to allow new MNs to
268*7c478bd9Sstevel@tonic-gate  * register with it, by setting the 'B' bit in its Agent Adv.
269*7c478bd9Sstevel@tonic-gate  * An Agent Adv message MUST NOT have the 'B' bit set if the
270*7c478bd9Sstevel@tonic-gate  * 'F' bit is not also set, and at least one of the 'F' bit and the
271*7c478bd9Sstevel@tonic-gate  * 'H'  bit MUST be set in any Agent Advertisement message sent.
272*7c478bd9Sstevel@tonic-gate  *
273*7c478bd9Sstevel@tonic-gate  * When a FA wishes to require registration even from those
274*7c478bd9Sstevel@tonic-gate  * mobile nodes which have acquired a co-located care-of address, it
275*7c478bd9Sstevel@tonic-gate  * sets the 'R' bit to one. Because this bit applies only to foreign
276*7c478bd9Sstevel@tonic-gate  * agents, an agent MUST NOT set the 'R' bit to one unless the 'F'
277*7c478bd9Sstevel@tonic-gate  * bit is also set to one.
278*7c478bd9Sstevel@tonic-gate  */
279*7c478bd9Sstevel@tonic-gate #ifdef __sparc
280*7c478bd9Sstevel@tonic-gate #ifdef _BIT_FIELDS_HTOL
281*7c478bd9Sstevel@tonic-gate typedef struct mobility_agt_adv_extension {
282*7c478bd9Sstevel@tonic-gate 	uchar_t		type;
283*7c478bd9Sstevel@tonic-gate 	uchar_t		length;
284*7c478bd9Sstevel@tonic-gate 	ushort_t	sequence_num;
285*7c478bd9Sstevel@tonic-gate 	ushort_t	reg_lifetime;
286*7c478bd9Sstevel@tonic-gate 	ushort_t	reg_bit:1,
287*7c478bd9Sstevel@tonic-gate 			busy_bit:1,
288*7c478bd9Sstevel@tonic-gate 			ha_bit:1,
289*7c478bd9Sstevel@tonic-gate 			fa_bit:1,
290*7c478bd9Sstevel@tonic-gate 			minencap_bit:1,
291*7c478bd9Sstevel@tonic-gate 			greencap_bit:1,
292*7c478bd9Sstevel@tonic-gate 			vanjacob_hdr_comp_bit:1,
293*7c478bd9Sstevel@tonic-gate 			reverse_tunnel_bit:1,
294*7c478bd9Sstevel@tonic-gate 			reserved:8;
295*7c478bd9Sstevel@tonic-gate } mobagtadvext_t;
296*7c478bd9Sstevel@tonic-gate 
297*7c478bd9Sstevel@tonic-gate #endif /* _BIT_FIELDS_HTOL */
298*7c478bd9Sstevel@tonic-gate #endif /* __sparc */
299*7c478bd9Sstevel@tonic-gate 
300*7c478bd9Sstevel@tonic-gate #ifdef __i386
301*7c478bd9Sstevel@tonic-gate #ifdef _BIT_FIELDS_LTOH
302*7c478bd9Sstevel@tonic-gate typedef struct mobility_agt_adv_extension {
303*7c478bd9Sstevel@tonic-gate 	uchar_t		type;
304*7c478bd9Sstevel@tonic-gate 	uchar_t		length;
305*7c478bd9Sstevel@tonic-gate 	ushort_t	sequence_num;
306*7c478bd9Sstevel@tonic-gate 	ushort_t	reg_lifetime;
307*7c478bd9Sstevel@tonic-gate 	uchar_t
308*7c478bd9Sstevel@tonic-gate 			reverse_tunnel_bit:1,
309*7c478bd9Sstevel@tonic-gate 			vanjacob_hdr_comp_bit:1,
310*7c478bd9Sstevel@tonic-gate 			greencap_bit:1,
311*7c478bd9Sstevel@tonic-gate 			minencap_bit:1,
312*7c478bd9Sstevel@tonic-gate 			fa_bit:1,
313*7c478bd9Sstevel@tonic-gate 			ha_bit:1,
314*7c478bd9Sstevel@tonic-gate 			busy_bit:1,
315*7c478bd9Sstevel@tonic-gate 			reg_bit:1;
316*7c478bd9Sstevel@tonic-gate 	uchar_t		reserved;
317*7c478bd9Sstevel@tonic-gate } mobagtadvext_t;
318*7c478bd9Sstevel@tonic-gate #endif /* _BIT_FIELDS_LTOH */
319*7c478bd9Sstevel@tonic-gate #endif /* __i386 */
320*7c478bd9Sstevel@tonic-gate 
321*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus
322*7c478bd9Sstevel@tonic-gate }
323*7c478bd9Sstevel@tonic-gate #endif
324*7c478bd9Sstevel@tonic-gate 
325*7c478bd9Sstevel@tonic-gate #endif /* _SNOOP_MIP_H */
326