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