nd6.h (8071913df2dce4a8c721eeecb338c9fb7d0f8485) nd6.h (88ff5695c1e53c3398142ea10e3f041ff4b5a03f)
1/* $FreeBSD$ */
1/* $FreeBSD$ */
2/* $KAME: nd6.h,v 1.55 2001/04/27 15:09:49 itojun Exp $ */
2/* $KAME: nd6.h,v 1.76 2001/12/18 02:10:31 itojun Exp $ */
3
4/*
5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:

--- 64 unchanged lines hidden (view full) ---

75 u_int32_t maxmtu; /* Upper bound of LinkMTU */
76 u_int32_t basereachable; /* BaseReachableTime */
77 u_int32_t reachable; /* Reachable Time */
78 u_int32_t retrans; /* Retrans Timer */
79 u_int32_t flags; /* Flags */
80 int recalctm; /* BaseReacable re-calculation timer */
81 u_int8_t chlim; /* CurHopLimit */
82 u_int8_t receivedra;
3
4/*
5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:

--- 64 unchanged lines hidden (view full) ---

75 u_int32_t maxmtu; /* Upper bound of LinkMTU */
76 u_int32_t basereachable; /* BaseReachableTime */
77 u_int32_t reachable; /* Reachable Time */
78 u_int32_t retrans; /* Retrans Timer */
79 u_int32_t flags; /* Flags */
80 int recalctm; /* BaseReacable re-calculation timer */
81 u_int8_t chlim; /* CurHopLimit */
82 u_int8_t receivedra;
83 /* the followings are for privacy extension for addrconf */
83 /* the following 3 members are for privacy extension for addrconf */
84 u_int8_t randomseed0[8]; /* upper 64 bits of MD5 digest */
85 u_int8_t randomseed1[8]; /* lower 64 bits (usually the EUI64 IFID) */
86 u_int8_t randomid[8]; /* current random ID */
87};
88
89#define ND6_IFF_PERFORMNUD 0x1
90
91struct in6_nbrinfo {

--- 28 unchanged lines hidden (view full) ---

120
121struct in6_prlist {
122 char ifname[IFNAMSIZ];
123 struct {
124 struct in6_addr prefix;
125 struct prf_ra raflags;
126 u_char prefixlen;
127 u_char origin;
84 u_int8_t randomseed0[8]; /* upper 64 bits of MD5 digest */
85 u_int8_t randomseed1[8]; /* lower 64 bits (usually the EUI64 IFID) */
86 u_int8_t randomid[8]; /* current random ID */
87};
88
89#define ND6_IFF_PERFORMNUD 0x1
90
91struct in6_nbrinfo {

--- 28 unchanged lines hidden (view full) ---

120
121struct in6_prlist {
122 char ifname[IFNAMSIZ];
123 struct {
124 struct in6_addr prefix;
125 struct prf_ra raflags;
126 u_char prefixlen;
127 u_char origin;
128 u_long vltime;
129 u_long pltime;
130 u_long expire;
128 u_int32_t vltime;
129 u_int32_t pltime;
130 time_t expire;
131 u_short if_index;
132 u_short advrtrs; /* number of advertisement routers */
133 struct in6_addr advrtr[DRLSTSIZ]; /* XXX: explicit limit */
134 } prefix[PRLSTSIZ];
135};
136
137struct in6_prefix {
138 struct sockaddr_in6 prefix;

--- 37 unchanged lines hidden (view full) ---

176 u_long ifindex;
177};
178
179/* Prefix status */
180#define NDPRF_ONLINK 0x1
181#define NDPRF_DETACHED 0x2
182
183/* protocol constants */
131 u_short if_index;
132 u_short advrtrs; /* number of advertisement routers */
133 struct in6_addr advrtr[DRLSTSIZ]; /* XXX: explicit limit */
134 } prefix[PRLSTSIZ];
135};
136
137struct in6_prefix {
138 struct sockaddr_in6 prefix;

--- 37 unchanged lines hidden (view full) ---

176 u_long ifindex;
177};
178
179/* Prefix status */
180#define NDPRF_ONLINK 0x1
181#define NDPRF_DETACHED 0x2
182
183/* protocol constants */
184#define MAX_RTR_SOLICITATION_DELAY 1 /*1sec*/
185#define RTR_SOLICITATION_INTERVAL 4 /*4sec*/
184#define MAX_RTR_SOLICITATION_DELAY 1 /* 1sec */
185#define RTR_SOLICITATION_INTERVAL 4 /* 4sec */
186#define MAX_RTR_SOLICITATIONS 3
187
188#define ND6_INFINITE_LIFETIME 0xffffffff
189
190#ifdef _KERNEL
191/* node constants */
192#define MAX_REACHABLE_TIME 3600000 /* msec */
193#define REACHABLE_TIME 30000 /* msec */

--- 7 unchanged lines hidden (view full) ---

201#define ND_COMPUTE_RTIME(x) \
202 (((MIN_RANDOM_FACTOR * (x >> 10)) + (random() & \
203 ((MAX_RANDOM_FACTOR - MIN_RANDOM_FACTOR) * (x >> 10)))) /1000)
204
205TAILQ_HEAD(nd_drhead, nd_defrouter);
206struct nd_defrouter {
207 TAILQ_ENTRY(nd_defrouter) dr_entry;
208 struct in6_addr rtaddr;
186#define MAX_RTR_SOLICITATIONS 3
187
188#define ND6_INFINITE_LIFETIME 0xffffffff
189
190#ifdef _KERNEL
191/* node constants */
192#define MAX_REACHABLE_TIME 3600000 /* msec */
193#define REACHABLE_TIME 30000 /* msec */

--- 7 unchanged lines hidden (view full) ---

201#define ND_COMPUTE_RTIME(x) \
202 (((MIN_RANDOM_FACTOR * (x >> 10)) + (random() & \
203 ((MAX_RANDOM_FACTOR - MIN_RANDOM_FACTOR) * (x >> 10)))) /1000)
204
205TAILQ_HEAD(nd_drhead, nd_defrouter);
206struct nd_defrouter {
207 TAILQ_ENTRY(nd_defrouter) dr_entry;
208 struct in6_addr rtaddr;
209 u_char flags;
209 u_char flags; /* flags on RA message */
210 u_short rtlifetime;
211 u_long expire;
212 u_long advint; /* Mobile IPv6 addition (milliseconds) */
213 u_long advint_expire; /* Mobile IPv6 addition */
214 int advints_lost; /* Mobile IPv6 addition */
215 struct ifnet *ifp;
216};
217

--- 85 unchanged lines hidden (view full) ---

303/* nd6_rtr.c */
304extern int nd6_defifindex;
305extern int ip6_desync_factor; /* seconds */
306extern u_int32_t ip6_temp_preferred_lifetime; /* seconds */
307extern u_int32_t ip6_temp_valid_lifetime; /* seconds */
308extern int ip6_temp_regen_advance; /* seconds */
309
310union nd_opts {
210 u_short rtlifetime;
211 u_long expire;
212 u_long advint; /* Mobile IPv6 addition (milliseconds) */
213 u_long advint_expire; /* Mobile IPv6 addition */
214 int advints_lost; /* Mobile IPv6 addition */
215 struct ifnet *ifp;
216};
217

--- 85 unchanged lines hidden (view full) ---

303/* nd6_rtr.c */
304extern int nd6_defifindex;
305extern int ip6_desync_factor; /* seconds */
306extern u_int32_t ip6_temp_preferred_lifetime; /* seconds */
307extern u_int32_t ip6_temp_valid_lifetime; /* seconds */
308extern int ip6_temp_regen_advance; /* seconds */
309
310union nd_opts {
311 struct nd_opt_hdr *nd_opt_array[9]; /*max = home agent info*/
311 struct nd_opt_hdr *nd_opt_array[9]; /* max = home agent info */
312 struct {
313 struct nd_opt_hdr *zero;
314 struct nd_opt_hdr *src_lladdr;
315 struct nd_opt_hdr *tgt_lladdr;
312 struct {
313 struct nd_opt_hdr *zero;
314 struct nd_opt_hdr *src_lladdr;
315 struct nd_opt_hdr *tgt_lladdr;
316 struct nd_opt_prefix_info *pi_beg;/* multiple opts, start */
316 struct nd_opt_prefix_info *pi_beg; /* multiple opts, start */
317 struct nd_opt_rd_hdr *rh;
318 struct nd_opt_mtu *mtu;
319 struct nd_opt_hdr *six;
320 struct nd_opt_advint *adv;
321 struct nd_opt_hai *hai;
322 struct nd_opt_hdr *search; /* multiple opts */
323 struct nd_opt_hdr *last; /* multiple opts */
324 int done;

--- 80 unchanged lines hidden ---
317 struct nd_opt_rd_hdr *rh;
318 struct nd_opt_mtu *mtu;
319 struct nd_opt_hdr *six;
320 struct nd_opt_advint *adv;
321 struct nd_opt_hai *hai;
322 struct nd_opt_hdr *search; /* multiple opts */
323 struct nd_opt_hdr *last; /* multiple opts */
324 int done;

--- 80 unchanged lines hidden ---