nd6.h (54263) | nd6.h (60833) |
---|---|
1/* 2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * | 1/* 2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * |
29 * $FreeBSD: head/sys/netinet6/nd6.h 54263 1999-12-07 17:39:16Z shin $ | 29 * $FreeBSD: head/sys/netinet6/nd6.h 60833 2000-05-23 20:41:01Z jake $ |
30 */ 31 32#ifndef _NETINET6_ND6_H_ 33#define _NETINET6_ND6_H_ 34 35#include <sys/queue.h> 36 37struct llinfo_nd6 { --- 82 unchanged lines hidden (view full) --- 120#define RETRANS_TIMER 1000 /* msec */ 121#define MIN_RANDOM_FACTOR 512 /* 1024 * 0.5 */ 122#define MAX_RANDOM_FACTOR 1536 /* 1024 * 1.5 */ 123#define ND_COMPUTE_RTIME(x) \ 124 (((MIN_RANDOM_FACTOR * (x >> 10)) + (random() & \ 125 ((MAX_RANDOM_FACTOR - MIN_RANDOM_FACTOR) * (x >> 10)))) /1000) 126 127struct nd_defrouter { | 30 */ 31 32#ifndef _NETINET6_ND6_H_ 33#define _NETINET6_ND6_H_ 34 35#include <sys/queue.h> 36 37struct llinfo_nd6 { --- 82 unchanged lines hidden (view full) --- 120#define RETRANS_TIMER 1000 /* msec */ 121#define MIN_RANDOM_FACTOR 512 /* 1024 * 0.5 */ 122#define MAX_RANDOM_FACTOR 1536 /* 1024 * 1.5 */ 123#define ND_COMPUTE_RTIME(x) \ 124 (((MIN_RANDOM_FACTOR * (x >> 10)) + (random() & \ 125 ((MAX_RANDOM_FACTOR - MIN_RANDOM_FACTOR) * (x >> 10)))) /1000) 126 127struct nd_defrouter { |
128 LIST_ENTRY(nd_defrouter) dr_entry; | 128 LIST_ENTRY(struct nd_defrouter) dr_entry; |
129 struct in6_addr rtaddr; 130 u_char flags; 131 u_short rtlifetime; 132 u_long expire; 133 struct ifnet *ifp; 134}; 135 136struct nd_prefix { 137 struct ifnet *ndpr_ifp; | 129 struct in6_addr rtaddr; 130 u_char flags; 131 u_short rtlifetime; 132 u_long expire; 133 struct ifnet *ifp; 134}; 135 136struct nd_prefix { 137 struct ifnet *ndpr_ifp; |
138 LIST_ENTRY(nd_prefix) ndpr_entry; | 138 LIST_ENTRY(struct nd_prefix) ndpr_entry; |
139 struct sockaddr_in6 ndpr_prefix; /* prefix */ 140 struct in6_addr ndpr_mask; /* netmask derived from the prefix */ 141 struct in6_addr ndpr_addr; /* address that is derived from the prefix */ 142 u_int32_t ndpr_vltime; /* advertised valid lifetime */ 143 u_int32_t ndpr_pltime; /* advertised preferred lifetime */ 144 time_t ndpr_expire; /* expiration time of the prefix */ 145 time_t ndpr_preferred; /* preferred time of the prefix */ 146 struct prf_ra ndpr_flags; 147 /* list of routers that advertise the prefix: */ | 139 struct sockaddr_in6 ndpr_prefix; /* prefix */ 140 struct in6_addr ndpr_mask; /* netmask derived from the prefix */ 141 struct in6_addr ndpr_addr; /* address that is derived from the prefix */ 142 u_int32_t ndpr_vltime; /* advertised valid lifetime */ 143 u_int32_t ndpr_pltime; /* advertised preferred lifetime */ 144 time_t ndpr_expire; /* expiration time of the prefix */ 145 time_t ndpr_preferred; /* preferred time of the prefix */ 146 struct prf_ra ndpr_flags; 147 /* list of routers that advertise the prefix: */ |
148 LIST_HEAD(pr_rtrhead, nd_pfxrouter) ndpr_advrtrs; | 148 LIST_HEAD(pr_rtrhead, struct nd_pfxrouter) ndpr_advrtrs; |
149 u_char ndpr_plen; 150 struct ndpr_stateflags { 151 /* if this prefix can be regarded as on-link */ 152 u_char onlink : 1; 153 } ndpr_stateflags; 154}; 155 156#define ndpr_raf ndpr_flags --- 34 unchanged lines hidden (view full) --- 191 192#define prm_rrf_decrvalid prm_flags.prf_rr.decrvalid 193#define prm_rrf_decrprefd prm_flags.prf_rr.decrprefd 194 195#define ifpr2ndpr(ifpr) ((struct nd_prefix *)(ifpr)) 196#define ndpr2ifpr(ndpr) ((struct ifprefix *)(ndpr)) 197 198struct nd_pfxrouter { | 149 u_char ndpr_plen; 150 struct ndpr_stateflags { 151 /* if this prefix can be regarded as on-link */ 152 u_char onlink : 1; 153 } ndpr_stateflags; 154}; 155 156#define ndpr_raf ndpr_flags --- 34 unchanged lines hidden (view full) --- 191 192#define prm_rrf_decrvalid prm_flags.prf_rr.decrvalid 193#define prm_rrf_decrprefd prm_flags.prf_rr.decrprefd 194 195#define ifpr2ndpr(ifpr) ((struct nd_prefix *)(ifpr)) 196#define ndpr2ifpr(ndpr) ((struct ifprefix *)(ndpr)) 197 198struct nd_pfxrouter { |
199 LIST_ENTRY(nd_pfxrouter) pfr_entry; | 199 LIST_ENTRY(struct nd_pfxrouter) pfr_entry; |
200 struct nd_defrouter *router; 201}; 202 | 200 struct nd_defrouter *router; 201}; 202 |
203LIST_HEAD(nd_drhead, nd_defrouter); 204LIST_HEAD(nd_prhead, nd_prefix); | 203LIST_HEAD(nd_drhead, struct nd_defrouter); 204LIST_HEAD(nd_prhead, struct nd_prefix); |
205 206/* nd6.c */ 207extern int nd6_prune; 208extern int nd6_delay; 209extern int nd6_umaxtries; 210extern int nd6_mmaxtries; 211extern int nd6_useloopback; 212extern int nd6_proxyall; --- 86 unchanged lines hidden --- | 205 206/* nd6.c */ 207extern int nd6_prune; 208extern int nd6_delay; 209extern int nd6_umaxtries; 210extern int nd6_mmaxtries; 211extern int nd6_useloopback; 212extern int nd6_proxyall; --- 86 unchanged lines hidden --- |