route6d.h revision 62607
1241675Suqs/*	$FreeBSD: head/usr.sbin/route6d/route6d.h 62607 2000-07-05 02:14:16Z itojun $	*/
2241675Suqs/*	$KAME: route6d.h,v 1.3 2000/02/25 06:15:06 itojun Exp $	*/
3241675Suqs
4241675Suqs/*
5241675Suqs * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
6241675Suqs * All rights reserved.
7241675Suqs *
8241675Suqs * Redistribution and use in source and binary forms, with or without
9241675Suqs * modification, are permitted provided that the following conditions
10241675Suqs * are met:
11241675Suqs * 1. Redistributions of source code must retain the above copyright
12241675Suqs *    notice, this list of conditions and the following disclaimer.
13241675Suqs * 2. Redistributions in binary form must reproduce the above copyright
14241675Suqs *    notice, this list of conditions and the following disclaimer in the
15241675Suqs *    documentation and/or other materials provided with the distribution.
16241675Suqs * 3. Neither the name of the project nor the names of its contributors
17241675Suqs *    may be used to endorse or promote products derived from this software
18241675Suqs *    without specific prior written permission.
19241675Suqs *
20241675Suqs * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
21241675Suqs * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22241675Suqs * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23241675Suqs * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
24241675Suqs * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25241675Suqs * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26241675Suqs * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27241675Suqs * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28241675Suqs * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29241675Suqs * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30241675Suqs * SUCH DAMAGE.
31241675Suqs */
32241675Suqs
33241675Suqs/* not yet in use
34241675Suqs#define	ROUTE6D_CONF	"/usr/local/v6/etc/route6d.conf"
35241675Suqs*/
36241675Suqs
37241675Suqs#define	ROUTE6D_DUMP	"/var/run/route6d_dump"
38241675Suqs#define	ROUTE6D_PID	"/var/run/route6d.pid"
39241675Suqs
40241675Suqs#define	RIP6_VERSION	1
41241675Suqs
42241675Suqs#define	RIP6_REQUEST	1
43241675Suqs#define	RIP6_RESPONSE	2
44241675Suqs
45241675Suqsstruct netinfo6 {
46241675Suqs	struct	in6_addr	rip6_dest;
47241675Suqs	u_short	rip6_tag;
48241675Suqs	u_char	rip6_plen;
49241675Suqs	u_char	rip6_metric;
50241675Suqs};
51241675Suqs
52241675Suqsstruct	rip6 {
53241675Suqs	u_char	rip6_cmd;
54241675Suqs	u_char	rip6_vers;
55241675Suqs	u_char	rip6_res1[2];
56241675Suqs	union {
57241675Suqs		struct	netinfo6	ru6_nets[1];
58241675Suqs		char	ru6_tracefile[1];
59241675Suqs	} rip6un;
60241675Suqs#define	rip6_nets	rip6un.ru6_nets
61241675Suqs#define	rip6_tracefile	rip6un.ru6_tracefile
62241675Suqs};
63241675Suqs
64241675Suqs#define	HOPCNT_INFINITY6	16
65241675Suqs#define	NEXTHOP_METRIC		0xff
66241675Suqs#define	RIP6_MAXMTU		1500
67241675Suqs
68241675Suqs#define	IFMINMTU		576
69241675Suqs
70241675Suqs#ifndef	DEBUG
71241675Suqs#define	SUPPLY_INTERVAL6	30
72241675Suqs#define	RIP_LIFETIME		180
73241675Suqs#define	RIP_HOLDDOWN		120
74241675Suqs#define	RIP_TRIG_INT6_MAX	5
75241675Suqs#define	RIP_TRIG_INT6_MIN	1
76241675Suqs#else
77241675Suqs/* only for debugging; can not wait for 30sec to appear a bug */
78241675Suqs#define	SUPPLY_INTERVAL6	10
79241675Suqs#define	RIP_LIFETIME		60
80241675Suqs#define	RIP_HOLDDOWN		40
81241675Suqs#define	RIP_TRIG_INT6_MAX	5
82241675Suqs#define	RIP_TRIG_INT6_MIN	1
83241675Suqs#endif
84241675Suqs
85241675Suqs#define	RIP6_PORT		521
86241675Suqs#define	RIP6_DEST		"ff02::9"
87241675Suqs
88241675Suqs#define	LOOPBACK_IF		"lo0"
89241675Suqs