Root/
Source at commit 1129 created 12 years 11 months ago. By meklort, Change options.o so that it reloads the system config as well. Also change it so that it uses that config for variables (NOTE: if the calue exists in chameleonConfig, it's used instead. | |
---|---|
1 | /*␊ |
2 | * Copyright (c) 2009 Apple Inc. All rights reserved.␊ |
3 | *␊ |
4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@␊ |
5 | * ␊ |
6 | * This file contains Original Code and/or Modifications of Original Code␊ |
7 | * as defined in and that are subject to the Apple Public Source License␊ |
8 | * Version 2.0 (the 'License'). You may not use this file except in␊ |
9 | * compliance with the License. The rights granted to you under the License␊ |
10 | * may not be used to create, or enable the creation or redistribution of,␊ |
11 | * unlawful or unlicensed copies of an Apple operating system, or to␊ |
12 | * circumvent, violate, or enable the circumvention or violation of, any␊ |
13 | * terms of an Apple operating system software license agreement.␊ |
14 | * ␊ |
15 | * Please obtain a copy of the License at␊ |
16 | * http://www.opensource.apple.com/apsl/ and read it before using this file.␊ |
17 | * ␊ |
18 | * The Original Code and all software distributed under the License are␊ |
19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER␊ |
20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,␊ |
21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,␊ |
22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.␊ |
23 | * Please see the License for the specific language governing rights and␊ |
24 | * limitations under the License.␊ |
25 | * ␊ |
26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@␊ |
27 | */␊ |
28 | ␊ |
29 | /*␉$FreeBSD: src/sys/netinet6/in6_var.h,v 1.3.2.2 2001/07/03 11:01:52 ume Exp $␉*/␊ |
30 | /*␉$KAME: in6_var.h,v 1.56 2001/03/29 05:34:31 itojun Exp $␉*/␊ |
31 | ␊ |
32 | /*␊ |
33 | * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.␊ |
34 | * All rights reserved.␊ |
35 | *␊ |
36 | * Redistribution and use in source and binary forms, with or without␊ |
37 | * modification, are permitted provided that the following conditions␊ |
38 | * are met:␊ |
39 | * 1. Redistributions of source code must retain the above copyright␊ |
40 | * notice, this list of conditions and the following disclaimer.␊ |
41 | * 2. Redistributions in binary form must reproduce the above copyright␊ |
42 | * notice, this list of conditions and the following disclaimer in the␊ |
43 | * documentation and/or other materials provided with the distribution.␊ |
44 | * 3. Neither the name of the project nor the names of its contributors␊ |
45 | * may be used to endorse or promote products derived from this software␊ |
46 | * without specific prior written permission.␊ |
47 | *␊ |
48 | * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND␊ |
49 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE␊ |
50 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE␊ |
51 | * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE␊ |
52 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL␊ |
53 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS␊ |
54 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)␊ |
55 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT␊ |
56 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY␊ |
57 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF␊ |
58 | * SUCH DAMAGE.␊ |
59 | */␊ |
60 | ␊ |
61 | /*␊ |
62 | * Copyright (c) 1985, 1986, 1993␊ |
63 | *␉The Regents of the University of California. All rights reserved.␊ |
64 | *␊ |
65 | * Redistribution and use in source and binary forms, with or without␊ |
66 | * modification, are permitted provided that the following conditions␊ |
67 | * are met:␊ |
68 | * 1. Redistributions of source code must retain the above copyright␊ |
69 | * notice, this list of conditions and the following disclaimer.␊ |
70 | * 2. Redistributions in binary form must reproduce the above copyright␊ |
71 | * notice, this list of conditions and the following disclaimer in the␊ |
72 | * documentation and/or other materials provided with the distribution.␊ |
73 | * 3. All advertising materials mentioning features or use of this software␊ |
74 | * must display the following acknowledgement:␊ |
75 | *␉This product includes software developed by the University of␊ |
76 | *␉California, Berkeley and its contributors.␊ |
77 | * 4. Neither the name of the University nor the names of its contributors␊ |
78 | * may be used to endorse or promote products derived from this software␊ |
79 | * without specific prior written permission.␊ |
80 | *␊ |
81 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND␊ |
82 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE␊ |
83 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE␊ |
84 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE␊ |
85 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL␊ |
86 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS␊ |
87 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)␊ |
88 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT␊ |
89 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY␊ |
90 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF␊ |
91 | * SUCH DAMAGE.␊ |
92 | *␊ |
93 | *␉@(#)in_var.h␉8.1 (Berkeley) 6/10/93␊ |
94 | */␊ |
95 | ␊ |
96 | #ifndef _NETINET6_IN6_VAR_H_␊ |
97 | #define _NETINET6_IN6_VAR_H_␊ |
98 | #include <sys/appleapiopts.h>␊ |
99 | ␊ |
100 | #ifdef __APPLE__␊ |
101 | #include <sys/kern_event.h>␊ |
102 | #endif␊ |
103 | ␊ |
104 | /*␊ |
105 | * pltime/vltime are just for future reference (required to implements 2␊ |
106 | * hour rule for hosts). they should never be modified by nd6_timeout or␊ |
107 | * anywhere else.␊ |
108 | *␉userland -> kernel: accept pltime/vltime␊ |
109 | *␉kernel -> userland: throw up everything␊ |
110 | *␉in kernel: modify preferred/expire only␊ |
111 | */␊ |
112 | struct in6_addrlifetime {␊ |
113 | ␉time_t ia6t_expire;␉/* valid lifetime expiration time */␊ |
114 | ␉time_t ia6t_preferred;␉/* preferred lifetime expiration time */␊ |
115 | ␉u_int32_t ia6t_vltime;␉/* valid lifetime */␊ |
116 | ␉u_int32_t ia6t_pltime;␉/* prefix lifetime */␊ |
117 | };␊ |
118 | ␊ |
119 | ␊ |
120 | /*␊ |
121 | * IPv6 interface statistics, as defined in RFC2465 Ipv6IfStatsEntry (p12).␊ |
122 | */␊ |
123 | struct in6_ifstat {␊ |
124 | ␉u_quad_t ifs6_in_receive;␉/* # of total input datagram */␊ |
125 | ␉u_quad_t ifs6_in_hdrerr;␉/* # of datagrams with invalid hdr */␊ |
126 | ␉u_quad_t ifs6_in_toobig;␉/* # of datagrams exceeded MTU */␊ |
127 | ␉u_quad_t ifs6_in_noroute;␉/* # of datagrams with no route */␊ |
128 | ␉u_quad_t ifs6_in_addrerr;␉/* # of datagrams with invalid dst */␊ |
129 | ␉u_quad_t ifs6_in_protounknown;␉/* # of datagrams with unknown proto */␊ |
130 | ␉␉␉␉␉/* NOTE: increment on final dst if */␊ |
131 | ␉u_quad_t ifs6_in_truncated;␉/* # of truncated datagrams */␊ |
132 | ␉u_quad_t ifs6_in_discard;␉/* # of discarded datagrams */␊ |
133 | ␉␉␉␉␉/* NOTE: fragment timeout is not here */␊ |
134 | ␉u_quad_t ifs6_in_deliver;␉/* # of datagrams delivered to ULP */␊ |
135 | ␉␉␉␉␉/* NOTE: increment on final dst if */␊ |
136 | ␉u_quad_t ifs6_out_forward;␉/* # of datagrams forwarded */␊ |
137 | ␉␉␉␉␉/* NOTE: increment on outgoing if */␊ |
138 | ␉u_quad_t ifs6_out_request;␉/* # of outgoing datagrams from ULP */␊ |
139 | ␉␉␉␉␉/* NOTE: does not include forwrads */␊ |
140 | ␉u_quad_t ifs6_out_discard;␉/* # of discarded datagrams */␊ |
141 | ␉u_quad_t ifs6_out_fragok;␉/* # of datagrams fragmented */␊ |
142 | ␉u_quad_t ifs6_out_fragfail;␉/* # of datagrams failed on fragment */␊ |
143 | ␉u_quad_t ifs6_out_fragcreat;␉/* # of fragment datagrams */␊ |
144 | ␉␉␉␉␉/* NOTE: this is # after fragment */␊ |
145 | ␉u_quad_t ifs6_reass_reqd;␉/* # of incoming fragmented packets */␊ |
146 | ␉␉␉␉␉/* NOTE: increment on final dst if */␊ |
147 | ␉u_quad_t ifs6_reass_ok;␉␉/* # of reassembled packets */␊ |
148 | ␉␉␉␉␉/* NOTE: this is # after reass */␊ |
149 | ␉␉␉␉␉/* NOTE: increment on final dst if */␊ |
150 | ␉u_quad_t ifs6_reass_fail;␉/* # of reass failures */␊ |
151 | ␉␉␉␉␉/* NOTE: may not be packet count */␊ |
152 | ␉␉␉␉␉/* NOTE: increment on final dst if */␊ |
153 | ␉u_quad_t ifs6_in_mcast;␉␉/* # of inbound multicast datagrams */␊ |
154 | ␉u_quad_t ifs6_out_mcast;␉/* # of outbound multicast datagrams */␊ |
155 | };␊ |
156 | ␊ |
157 | /*␊ |
158 | * ICMPv6 interface statistics, as defined in RFC2466 Ipv6IfIcmpEntry.␊ |
159 | * XXX: I'm not sure if this file is the right place for this structure...␊ |
160 | */␊ |
161 | struct icmp6_ifstat {␊ |
162 | ␉/*␊ |
163 | ␉ * Input statistics␊ |
164 | ␉ */␊ |
165 | ␉/* ipv6IfIcmpInMsgs, total # of input messages */␊ |
166 | ␉u_quad_t ifs6_in_msg;␊ |
167 | ␉/* ipv6IfIcmpInErrors, # of input error messages */␊ |
168 | ␉u_quad_t ifs6_in_error;␊ |
169 | ␉/* ipv6IfIcmpInDestUnreachs, # of input dest unreach errors */␊ |
170 | ␉u_quad_t ifs6_in_dstunreach;␊ |
171 | ␉/* ipv6IfIcmpInAdminProhibs, # of input administratively prohibited errs */␊ |
172 | ␉u_quad_t ifs6_in_adminprohib;␊ |
173 | ␉/* ipv6IfIcmpInTimeExcds, # of input time exceeded errors */␊ |
174 | ␉u_quad_t ifs6_in_timeexceed;␊ |
175 | ␉/* ipv6IfIcmpInParmProblems, # of input parameter problem errors */␊ |
176 | ␉u_quad_t ifs6_in_paramprob;␊ |
177 | ␉/* ipv6IfIcmpInPktTooBigs, # of input packet too big errors */␊ |
178 | ␉u_quad_t ifs6_in_pkttoobig;␊ |
179 | ␉/* ipv6IfIcmpInEchos, # of input echo requests */␊ |
180 | ␉u_quad_t ifs6_in_echo;␊ |
181 | ␉/* ipv6IfIcmpInEchoReplies, # of input echo replies */␊ |
182 | ␉u_quad_t ifs6_in_echoreply;␊ |
183 | ␉/* ipv6IfIcmpInRouterSolicits, # of input router solicitations */␊ |
184 | ␉u_quad_t ifs6_in_routersolicit;␊ |
185 | ␉/* ipv6IfIcmpInRouterAdvertisements, # of input router advertisements */␊ |
186 | ␉u_quad_t ifs6_in_routeradvert;␊ |
187 | ␉/* ipv6IfIcmpInNeighborSolicits, # of input neighbor solicitations */␊ |
188 | ␉u_quad_t ifs6_in_neighborsolicit;␊ |
189 | ␉/* ipv6IfIcmpInNeighborAdvertisements, # of input neighbor advertisements */␊ |
190 | ␉u_quad_t ifs6_in_neighboradvert;␊ |
191 | ␉/* ipv6IfIcmpInRedirects, # of input redirects */␊ |
192 | ␉u_quad_t ifs6_in_redirect;␊ |
193 | ␉/* ipv6IfIcmpInGroupMembQueries, # of input MLD queries */␊ |
194 | ␉u_quad_t ifs6_in_mldquery;␊ |
195 | ␉/* ipv6IfIcmpInGroupMembResponses, # of input MLD reports */␊ |
196 | ␉u_quad_t ifs6_in_mldreport;␊ |
197 | ␉/* ipv6IfIcmpInGroupMembReductions, # of input MLD done */␊ |
198 | ␉u_quad_t ifs6_in_mlddone;␊ |
199 | ␊ |
200 | ␉/*␊ |
201 | ␉ * Output statistics. We should solve unresolved routing problem...␊ |
202 | ␉ */␊ |
203 | ␉/* ipv6IfIcmpOutMsgs, total # of output messages */␊ |
204 | ␉u_quad_t ifs6_out_msg;␊ |
205 | ␉/* ipv6IfIcmpOutErrors, # of output error messages */␊ |
206 | ␉u_quad_t ifs6_out_error;␊ |
207 | ␉/* ipv6IfIcmpOutDestUnreachs, # of output dest unreach errors */␊ |
208 | ␉u_quad_t ifs6_out_dstunreach;␊ |
209 | ␉/* ipv6IfIcmpOutAdminProhibs, # of output administratively prohibited errs */␊ |
210 | ␉u_quad_t ifs6_out_adminprohib;␊ |
211 | ␉/* ipv6IfIcmpOutTimeExcds, # of output time exceeded errors */␊ |
212 | ␉u_quad_t ifs6_out_timeexceed;␊ |
213 | ␉/* ipv6IfIcmpOutParmProblems, # of output parameter problem errors */␊ |
214 | ␉u_quad_t ifs6_out_paramprob;␊ |
215 | ␉/* ipv6IfIcmpOutPktTooBigs, # of output packet too big errors */␊ |
216 | ␉u_quad_t ifs6_out_pkttoobig;␊ |
217 | ␉/* ipv6IfIcmpOutEchos, # of output echo requests */␊ |
218 | ␉u_quad_t ifs6_out_echo;␊ |
219 | ␉/* ipv6IfIcmpOutEchoReplies, # of output echo replies */␊ |
220 | ␉u_quad_t ifs6_out_echoreply;␊ |
221 | ␉/* ipv6IfIcmpOutRouterSolicits, # of output router solicitations */␊ |
222 | ␉u_quad_t ifs6_out_routersolicit;␊ |
223 | ␉/* ipv6IfIcmpOutRouterAdvertisements, # of output router advertisements */␊ |
224 | ␉u_quad_t ifs6_out_routeradvert;␊ |
225 | ␉/* ipv6IfIcmpOutNeighborSolicits, # of output neighbor solicitations */␊ |
226 | ␉u_quad_t ifs6_out_neighborsolicit;␊ |
227 | ␉/* ipv6IfIcmpOutNeighborAdvertisements, # of output neighbor advertisements */␊ |
228 | ␉u_quad_t ifs6_out_neighboradvert;␊ |
229 | ␉/* ipv6IfIcmpOutRedirects, # of output redirects */␊ |
230 | ␉u_quad_t ifs6_out_redirect;␊ |
231 | ␉/* ipv6IfIcmpOutGroupMembQueries, # of output MLD queries */␊ |
232 | ␉u_quad_t ifs6_out_mldquery;␊ |
233 | ␉/* ipv6IfIcmpOutGroupMembResponses, # of output MLD reports */␊ |
234 | ␉u_quad_t ifs6_out_mldreport;␊ |
235 | ␉/* ipv6IfIcmpOutGroupMembReductions, # of output MLD done */␊ |
236 | ␉u_quad_t ifs6_out_mlddone;␊ |
237 | };␊ |
238 | ␊ |
239 | struct␉in6_ifreq {␊ |
240 | ␉char␉ifr_name[IFNAMSIZ];␊ |
241 | ␉union {␊ |
242 | ␉␉struct␉sockaddr_in6 ifru_addr;␊ |
243 | ␉␉struct␉sockaddr_in6 ifru_dstaddr;␊ |
244 | ␉␉short␉ifru_flags;␊ |
245 | ␉␉int␉ifru_flags6;␊ |
246 | ␉␉int␉ifru_metric;␊ |
247 | ␉␉caddr_t␉ifru_data;␊ |
248 | ␉␉struct in6_addrlifetime ifru_lifetime;␊ |
249 | ␉␉struct in6_ifstat ifru_stat;␊ |
250 | ␉␉struct icmp6_ifstat ifru_icmp6stat;␊ |
251 | ␉␉u_int32_t ifru_scope_id[16];␊ |
252 | ␉} ifr_ifru;␊ |
253 | };␊ |
254 | ␊ |
255 | struct␉in6_aliasreq {␊ |
256 | ␉char␉ifra_name[IFNAMSIZ];␊ |
257 | ␉struct␉sockaddr_in6 ifra_addr;␊ |
258 | ␉struct␉sockaddr_in6 ifra_dstaddr;␊ |
259 | ␉struct␉sockaddr_in6 ifra_prefixmask;␊ |
260 | ␉int␉ifra_flags;␊ |
261 | ␉struct in6_addrlifetime ifra_lifetime;␊ |
262 | };␊ |
263 | ␊ |
264 | ␊ |
265 | /* prefix type macro */␊ |
266 | #define IN6_PREFIX_ND␉1␊ |
267 | #define IN6_PREFIX_RR␉2␊ |
268 | ␊ |
269 | /*␊ |
270 | * prefix related flags passed between kernel(NDP related part) and␊ |
271 | * user land command(ifconfig) and daemon(rtadvd).␊ |
272 | */␊ |
273 | struct in6_prflags {␊ |
274 | ␉struct prf_ra {␊ |
275 | ␉␉u_char onlink : 1;␊ |
276 | ␉␉u_char autonomous : 1;␊ |
277 | ␉␉u_char reserved : 6;␊ |
278 | ␉} prf_ra;␊ |
279 | ␉u_char prf_reserved1;␊ |
280 | ␉u_short prf_reserved2;␊ |
281 | ␉/* want to put this on 4byte offset */␊ |
282 | ␉struct prf_rr {␊ |
283 | ␉␉u_char decrvalid : 1;␊ |
284 | ␉␉u_char decrprefd : 1;␊ |
285 | ␉␉u_char reserved : 6;␊ |
286 | ␉} prf_rr;␊ |
287 | ␉u_char prf_reserved3;␊ |
288 | ␉u_short prf_reserved4;␊ |
289 | };␊ |
290 | ␊ |
291 | struct in6_prefixreq {␊ |
292 | ␉char␉ipr_name[IFNAMSIZ];␊ |
293 | ␉u_char␉ipr_origin;␊ |
294 | ␉u_char␉ipr_plen;␊ |
295 | ␉u_int32_t ipr_vltime;␊ |
296 | ␉u_int32_t ipr_pltime;␊ |
297 | ␉struct in6_prflags ipr_flags;␊ |
298 | ␉struct␉sockaddr_in6 ipr_prefix;␊ |
299 | };␊ |
300 | ␊ |
301 | #define PR_ORIG_RA␉0␊ |
302 | #define PR_ORIG_RR␉1␊ |
303 | #define PR_ORIG_STATIC␉2␊ |
304 | #define PR_ORIG_KERNEL␉3␊ |
305 | ␊ |
306 | #define ipr_raf_onlink␉␉ipr_flags.prf_ra.onlink␊ |
307 | #define ipr_raf_auto␉␉ipr_flags.prf_ra.autonomous␊ |
308 | ␊ |
309 | #define ipr_statef_onlink␉ipr_flags.prf_state.onlink␊ |
310 | ␊ |
311 | #define ipr_rrf_decrvalid␉ipr_flags.prf_rr.decrvalid␊ |
312 | #define ipr_rrf_decrprefd␉ipr_flags.prf_rr.decrprefd␊ |
313 | ␊ |
314 | struct␉in6_rrenumreq {␊ |
315 | ␉char␉irr_name[IFNAMSIZ];␊ |
316 | ␉u_char␉irr_origin;␊ |
317 | ␉u_char␉irr_m_len;␉/* match len for matchprefix */␊ |
318 | ␉u_char␉irr_m_minlen;␉/* minlen for matching prefix */␊ |
319 | ␉u_char␉irr_m_maxlen;␉/* maxlen for matching prefix */␊ |
320 | ␉u_char␉irr_u_uselen;␉/* uselen for adding prefix */␊ |
321 | ␉u_char␉irr_u_keeplen;␉/* keeplen from matching prefix */␊ |
322 | ␉struct irr_raflagmask {␊ |
323 | ␉␉u_char onlink : 1;␊ |
324 | ␉␉u_char autonomous : 1;␊ |
325 | ␉␉u_char reserved : 6;␊ |
326 | ␉} irr_raflagmask;␊ |
327 | ␉u_int32_t irr_vltime;␊ |
328 | ␉u_int32_t irr_pltime;␊ |
329 | ␉struct in6_prflags irr_flags;␊ |
330 | ␉struct␉sockaddr_in6 irr_matchprefix;␊ |
331 | ␉struct␉sockaddr_in6 irr_useprefix;␊ |
332 | };␊ |
333 | ␊ |
334 | #define irr_raf_mask_onlink␉irr_raflagmask.onlink␊ |
335 | #define irr_raf_mask_auto␉irr_raflagmask.autonomous␊ |
336 | #define irr_raf_mask_reserved␉irr_raflagmask.reserved␊ |
337 | ␊ |
338 | #define irr_raf_onlink␉␉irr_flags.prf_ra.onlink␊ |
339 | #define irr_raf_auto␉␉irr_flags.prf_ra.autonomous␊ |
340 | ␊ |
341 | #define irr_statef_onlink␉irr_flags.prf_state.onlink␊ |
342 | ␊ |
343 | #define irr_rrf␉␉␉irr_flags.prf_rr␊ |
344 | #define irr_rrf_decrvalid␉irr_flags.prf_rr.decrvalid␊ |
345 | #define irr_rrf_decrprefd␉irr_flags.prf_rr.decrprefd␊ |
346 | ␊ |
347 | ␊ |
348 | /*␊ |
349 | * Event data, internet6 style.␊ |
350 | */␊ |
351 | ␊ |
352 | struct kev_in6_addrlifetime {␊ |
353 | u_int32_t ia6t_expire;␊ |
354 | u_int32_t ia6t_preferred;␊ |
355 | u_int32_t ia6t_vltime;␊ |
356 | u_int32_t ia6t_pltime;␊ |
357 | };␊ |
358 | ␊ |
359 | struct kev_in6_data {␊ |
360 | struct net_event_data link_data;␊ |
361 | ␉struct␉sockaddr_in6 ia_addr;␉/* interface address */␊ |
362 | ␉struct␉sockaddr_in6 ia_net;␉/* network number of interface */␊ |
363 | ␉struct␉sockaddr_in6 ia_dstaddr; /* space for destination addr */␊ |
364 | ␉struct␉sockaddr_in6 ia_prefixmask; /* prefix mask */␊ |
365 | ␉u_int32_t ia_plen;␉␉/* prefix length */␊ |
366 | ␉u_int32_t ia6_flags;␉␉/* address flags from in6_ifaddr */␊ |
367 | ␉struct kev_in6_addrlifetime ia_lifetime; /* address life info */␊ |
368 | };␊ |
369 | ␊ |
370 | /*␊ |
371 | * Define inet6 event subclass and specific inet6 events.␊ |
372 | */␊ |
373 | ␊ |
374 | #define KEV_INET6_SUBCLASS 6␉/* inet6 subclass identifier */␊ |
375 | ␊ |
376 | #define KEV_INET6_NEW_USER_ADDR␉␉1␉/* Userland configured IPv6 address */␊ |
377 | #define KEV_INET6_CHANGED_ADDR ␉␉2␉/* Address changed event (future) */␊ |
378 | #define KEV_INET6_ADDR_DELETED ␉␉3␉/* IPv6 add. in ia_addr field was deleted */␊ |
379 | #define KEV_INET6_NEW_LL_ADDR ␉␉4␉/* Autoconfigured linklocal address has appeared */␊ |
380 | #define KEV_INET6_NEW_RTADV_ADDR ␉5␉/* Autoconf router advertised address has appeared */␊ |
381 | #define KEV_INET6_DEFROUTER ␉␉6␉/* Default router dectected by kernel */␊ |
382 | ␊ |
383 | ␊ |
384 | #define IN6_ARE_MASKED_ADDR_EQUAL(d, a, m)␉(␉\␊ |
385 | ␉(((d)->s6_addr32[0] ^ (a)->s6_addr32[0]) & (m)->s6_addr32[0]) == 0 && \␊ |
386 | ␉(((d)->s6_addr32[1] ^ (a)->s6_addr32[1]) & (m)->s6_addr32[1]) == 0 && \␊ |
387 | ␉(((d)->s6_addr32[2] ^ (a)->s6_addr32[2]) & (m)->s6_addr32[2]) == 0 && \␊ |
388 | ␉(((d)->s6_addr32[3] ^ (a)->s6_addr32[3]) & (m)->s6_addr32[3]) == 0 )␊ |
389 | ␊ |
390 | #define SIOCSIFADDR_IN6␉␉ _IOW('i', 12, struct in6_ifreq)␊ |
391 | #define SIOCGIFADDR_IN6␉␉_IOWR('i', 33, struct in6_ifreq)␊ |
392 | ␊ |
393 | /*␊ |
394 | * SIOCSxxx ioctls should be unused (see comments in in6.c), but␊ |
395 | * we do not shift numbers for binary compatibility.␊ |
396 | */␊ |
397 | #define SIOCSIFDSTADDR_IN6␉ _IOW('i', 14, struct in6_ifreq)␊ |
398 | #define SIOCSIFNETMASK_IN6␉ _IOW('i', 22, struct in6_ifreq)␊ |
399 | ␊ |
400 | #define SIOCGIFDSTADDR_IN6␉_IOWR('i', 34, struct in6_ifreq)␊ |
401 | #define SIOCGIFNETMASK_IN6␉_IOWR('i', 37, struct in6_ifreq)␊ |
402 | ␊ |
403 | #define SIOCDIFADDR_IN6␉␉ _IOW('i', 25, struct in6_ifreq)␊ |
404 | #define SIOCAIFADDR_IN6␉␉ _IOW('i', 26, struct in6_aliasreq)␊ |
405 | ␊ |
406 | #define SIOCSIFPHYADDR_IN6␉_IOW('i', 62, struct in6_aliasreq)␊ |
407 | #define␉SIOCGIFPSRCADDR_IN6␉_IOWR('i', 63, struct in6_ifreq)␊ |
408 | #define␉SIOCGIFPDSTADDR_IN6␉_IOWR('i', 64, struct in6_ifreq)␊ |
409 | #define SIOCGIFAFLAG_IN6␉_IOWR('i', 73, struct in6_ifreq)␊ |
410 | #define SIOCGDRLST_IN6␉␉_IOWR('i', 74, struct in6_drlist)␊ |
411 | #define SIOCGPRLST_IN6␉␉_IOWR('i', 75, struct in6_prlist)␊ |
412 | #define OSIOCGIFINFO_IN6␉_IOWR('i', 108, struct in6_ondireq)␊ |
413 | #define SIOCGIFINFO_IN6␉␉_IOWR('i', 76, struct in6_ondireq)␊ |
414 | #define SIOCSNDFLUSH_IN6␉_IOWR('i', 77, struct in6_ifreq)␊ |
415 | #define SIOCGNBRINFO_IN6␉_IOWR('i', 78, struct in6_nbrinfo)␊ |
416 | #define SIOCSPFXFLUSH_IN6␉_IOWR('i', 79, struct in6_ifreq)␊ |
417 | #define SIOCSRTRFLUSH_IN6␉_IOWR('i', 80, struct in6_ifreq)␊ |
418 | ␊ |
419 | #define SIOCGIFALIFETIME_IN6␉_IOWR('i', 81, struct in6_ifreq)␊ |
420 | #define SIOCSIFALIFETIME_IN6␉_IOWR('i', 82, struct in6_ifreq)␊ |
421 | #define SIOCGIFSTAT_IN6␉␉_IOWR('i', 83, struct in6_ifreq)␊ |
422 | #define SIOCGIFSTAT_ICMP6␉_IOWR('i', 84, struct in6_ifreq)␊ |
423 | ␊ |
424 | #define SIOCSDEFIFACE_IN6␉_IOWR('i', 85, struct in6_ndifreq)␊ |
425 | #define SIOCGDEFIFACE_IN6␉_IOWR('i', 86, struct in6_ndifreq)␊ |
426 | ␊ |
427 | #define SIOCSIFINFO_FLAGS␉_IOWR('i', 87, struct in6_ndireq) /* XXX */␊ |
428 | ␊ |
429 | #define SIOCSSCOPE6␉␉_IOW('i', 88, struct in6_ifreq)␊ |
430 | #define SIOCGSCOPE6␉␉_IOWR('i', 89, struct in6_ifreq)␊ |
431 | #define SIOCGSCOPE6DEF␉␉_IOWR('i', 90, struct in6_ifreq)␊ |
432 | ␊ |
433 | #define SIOCSIFPREFIX_IN6␉_IOW('i', 100, struct in6_prefixreq) /* set */␊ |
434 | #define SIOCGIFPREFIX_IN6␉_IOWR('i', 101, struct in6_prefixreq) /* get */␊ |
435 | #define SIOCDIFPREFIX_IN6␉_IOW('i', 102, struct in6_prefixreq) /* del */␊ |
436 | #define SIOCAIFPREFIX_IN6␉_IOW('i', 103, struct in6_rrenumreq) /* add */␊ |
437 | #define SIOCCIFPREFIX_IN6␉_IOW('i', 104, \␊ |
438 | ␉␉␉␉ struct in6_rrenumreq) /* change */␊ |
439 | #define SIOCSGIFPREFIX_IN6␉_IOW('i', 105, \␊ |
440 | ␉␉␉␉ struct in6_rrenumreq) /* set global */␊ |
441 | ␊ |
442 | #define SIOCGETSGCNT_IN6␉_IOWR('u', 28, \␊ |
443 | ␉␉␉␉ struct sioc_sg_req6) /* get s,g pkt cnt */␊ |
444 | #define SIOCGETMIFCNT_IN6␉_IOWR('u', 107, \␊ |
445 | ␉␉␉␉ struct sioc_mif_req6) /* get pkt cnt per if */␊ |
446 | ␊ |
447 | ␊ |
448 | #define IN6_IFF_ANYCAST␉␉0x01␉/* anycast address */␊ |
449 | #define IN6_IFF_TENTATIVE␉0x02␉/* tentative address */␊ |
450 | #define IN6_IFF_DUPLICATED␉0x04␉/* DAD detected duplicate */␊ |
451 | #define IN6_IFF_DETACHED␉0x08␉/* may be detached from the link */␊ |
452 | #define IN6_IFF_DEPRECATED␉0x10␉/* deprecated address */␊ |
453 | #define IN6_IFF_NODAD␉␉0x20␉/* don't perform DAD on this address␊ |
454 | ␉␉␉␉␉ * (used only at first SIOC* call)␊ |
455 | ␉␉␉␉␉ */␊ |
456 | #define IN6_IFF_AUTOCONF␉0x40␉/* autoconfigurable address. */␊ |
457 | #define IN6_IFF_TEMPORARY␉0x80␉/* temporary (anonymous) address. */␊ |
458 | #define IN6_IFF_NOPFX␉␉0x8000␉/* skip kernel prefix management.␊ |
459 | ␉␉␉␉␉ * XXX: this should be temporary.␊ |
460 | ␉␉␉␉␉ */␊ |
461 | ␊ |
462 | /* do not input/output */␊ |
463 | #define IN6_IFF_NOTREADY (IN6_IFF_TENTATIVE|IN6_IFF_DUPLICATED)␊ |
464 | ␊ |
465 | ␊ |
466 | #endif /* _NETINET6_IN6_VAR_H_ */␊ |
467 |