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