nd6.h revision 1.1 1 1.1 roy /* $NetBSD: nd6.h,v 1.1 2020/06/12 15:25:26 roy Exp $ */
2 1.1 roy /*-
3 1.1 roy * Copyright (c) 2020 The NetBSD Foundation, Inc.
4 1.1 roy * All rights reserved.
5 1.1 roy *
6 1.1 roy * This code is derived from software contributed to The NetBSD Foundation
7 1.1 roy * by Roy Marples.
8 1.1 roy *
9 1.1 roy * Redistribution and use in source and binary forms, with or without
10 1.1 roy * modification, are permitted provided that the following conditions
11 1.1 roy * are met:
12 1.1 roy * 1. Redistributions of source code must retain the above copyright
13 1.1 roy * notice, this list of conditions and the following disclaimer.
14 1.1 roy * 2. Redistributions in binary form must reproduce the above copyright
15 1.1 roy * notice, this list of conditions and the following disclaimer in the
16 1.1 roy * documentation and/or other materials provided with the distribution.
17 1.1 roy *
18 1.1 roy * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19 1.1 roy * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20 1.1 roy * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21 1.1 roy * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22 1.1 roy * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 1.1 roy * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 1.1 roy * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 1.1 roy * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 1.1 roy * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 1.1 roy * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 1.1 roy * POSSIBILITY OF SUCH DAMAGE.
29 1.1 roy */
30 1.1 roy
31 1.1 roy #ifndef _COMPAT_NETINET6_ND6_H_
32 1.1 roy #define _COMPAT_NETINET6_ND6_H_
33 1.1 roy
34 1.1 roy struct nd_ifinfo90 {
35 1.1 roy u_int32_t linkmtu; /* LinkMTU */
36 1.1 roy u_int32_t maxmtu; /* Upper bound of LinkMTU */
37 1.1 roy u_int32_t basereachable; /* BaseReachableTime */
38 1.1 roy u_int32_t reachable; /* Reachable Time */
39 1.1 roy u_int32_t retrans; /* Retrans Timer */
40 1.1 roy u_int32_t flags; /* Flags */
41 1.1 roy int recalctm; /* BaseReacable re-calculation timer */
42 1.1 roy u_int8_t chlim; /* CurHopLimit */
43 1.1 roy u_int8_t initialized; /* Flag to see the entry is initialized */
44 1.1 roy /* the following 3 members are for privacy extension for addrconf */
45 1.1 roy u_int8_t randomseed0[8]; /* upper 64 bits of MD5 digest */
46 1.1 roy u_int8_t randomseed1[8]; /* lower 64 bits (usually the EUI64 IFID) */
47 1.1 roy u_int8_t randomid[8]; /* current random ID */
48 1.1 roy };
49 1.1 roy
50 1.1 roy struct in6_ondireq {
51 1.1 roy char ifname[IFNAMSIZ];
52 1.1 roy struct {
53 1.1 roy u_int32_t linkmtu; /* LinkMTU */
54 1.1 roy u_int32_t maxmtu; /* Upper bound of LinkMTU */
55 1.1 roy u_int32_t basereachable; /* BaseReachableTime */
56 1.1 roy u_int32_t reachable; /* Reachable Time */
57 1.1 roy u_int32_t retrans; /* Retrans Timer */
58 1.1 roy u_int32_t flags; /* Flags */
59 1.1 roy int recalctm; /* BaseReacable re-calculation timer */
60 1.1 roy u_int8_t chlim; /* CurHopLimit */
61 1.1 roy u_int8_t receivedra;
62 1.1 roy } ndi;
63 1.1 roy };
64 1.1 roy
65 1.1 roy struct in6_ndireq90 {
66 1.1 roy char ifname[IFNAMSIZ];
67 1.1 roy struct nd_ifinfo90 ndi;
68 1.1 roy };
69 1.1 roy
70 1.1 roy struct in6_ndifreq90 {
71 1.1 roy char ifname[IFNAMSIZ];
72 1.1 roy u_long ifindex;
73 1.1 roy };
74 1.1 roy
75 1.1 roy #define DRLSTSIZ 10
76 1.1 roy #define PRLSTSIZ 10
77 1.1 roy struct in6_drlist {
78 1.1 roy char ifname[IFNAMSIZ];
79 1.1 roy struct {
80 1.1 roy struct in6_addr rtaddr;
81 1.1 roy u_char flags;
82 1.1 roy u_short rtlifetime;
83 1.1 roy u_long expire;
84 1.1 roy u_short if_index;
85 1.1 roy } defrouter[DRLSTSIZ];
86 1.1 roy };
87 1.1 roy
88 1.1 roy struct in6_oprlist {
89 1.1 roy char ifname[IFNAMSIZ];
90 1.1 roy struct {
91 1.1 roy struct in6_addr prefix;
92 1.1 roy struct prf_ra raflags;
93 1.1 roy u_char prefixlen;
94 1.1 roy u_char origin;
95 1.1 roy u_long vltime;
96 1.1 roy u_long pltime;
97 1.1 roy u_long expire;
98 1.1 roy u_short if_index;
99 1.1 roy u_short advrtrs; /* number of advertisement routers */
100 1.1 roy struct in6_addr advrtr[DRLSTSIZ]; /* XXX: explicit limit */
101 1.1 roy } prefix[PRLSTSIZ];
102 1.1 roy };
103 1.1 roy
104 1.1 roy struct in6_prlist {
105 1.1 roy char ifname[IFNAMSIZ];
106 1.1 roy struct {
107 1.1 roy struct in6_addr prefix;
108 1.1 roy struct prf_ra raflags;
109 1.1 roy u_char prefixlen;
110 1.1 roy u_char origin;
111 1.1 roy u_int32_t vltime;
112 1.1 roy u_int32_t pltime;
113 1.1 roy time_t expire;
114 1.1 roy u_short if_index;
115 1.1 roy u_short advrtrs; /* number of advertisement routers */
116 1.1 roy struct in6_addr advrtr[DRLSTSIZ]; /* XXX: explicit limit */
117 1.1 roy } prefix[PRLSTSIZ];
118 1.1 roy };
119 1.1 roy
120 1.1 roy #endif /* !_COMPAT_NETINET6_ND6_H_ */
121