route6d.h revision 55163
155163Sshin/*
255163Sshin * $Header: /cvsroot/kame/kame/kame/kame/route6d/route6d.h,v 1.1.1.1 1999/08/08 23:31:35 itojun Exp $
355163Sshin */
455163Sshin
555163Sshin/*
655163Sshin * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
755163Sshin * All rights reserved.
855163Sshin *
955163Sshin * Redistribution and use in source and binary forms, with or without
1055163Sshin * modification, are permitted provided that the following conditions
1155163Sshin * are met:
1255163Sshin * 1. Redistributions of source code must retain the above copyright
1355163Sshin *    notice, this list of conditions and the following disclaimer.
1455163Sshin * 2. Redistributions in binary form must reproduce the above copyright
1555163Sshin *    notice, this list of conditions and the following disclaimer in the
1655163Sshin *    documentation and/or other materials provided with the distribution.
1755163Sshin * 3. Neither the name of the project nor the names of its contributors
1855163Sshin *    may be used to endorse or promote products derived from this software
1955163Sshin *    without specific prior written permission.
2055163Sshin *
2155163Sshin * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
2255163Sshin * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2355163Sshin * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2455163Sshin * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
2555163Sshin * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2655163Sshin * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2755163Sshin * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2855163Sshin * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2955163Sshin * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3055163Sshin * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3155163Sshin * SUCH DAMAGE.
3255163Sshin *
3355163Sshin * $FreeBSD: head/usr.sbin/route6d/route6d.h 55163 1999-12-28 02:37:14Z shin $
3455163Sshin */
3555163Sshin
3655163Sshin/* not yet in use
3755163Sshin#define	ROUTE6D_CONF	"/usr/local/v6/etc/route6d.conf"
3855163Sshin*/
3955163Sshin
4055163Sshin#define	ROUTE6D_DUMP	"/var/tmp/route6d_dump"
4155163Sshin#define	ROUTE6D_PID	"/var/run/route6d.pid"
4255163Sshin
4355163Sshin#define	RIP6_VERSION	1
4455163Sshin
4555163Sshin#define	RIP6_REQUEST	1
4655163Sshin#define	RIP6_RESPONSE	2
4755163Sshin
4855163Sshinstruct netinfo6 {
4955163Sshin	struct	in6_addr	rip6_dest;
5055163Sshin	u_short	rip6_tag;
5155163Sshin	u_char	rip6_plen;
5255163Sshin	u_char	rip6_metric;
5355163Sshin};
5455163Sshin
5555163Sshinstruct	rip6 {
5655163Sshin	u_char	rip6_cmd;
5755163Sshin	u_char	rip6_vers;
5855163Sshin	u_char	rip6_res1[2];
5955163Sshin	union {
6055163Sshin		struct	netinfo6	ru6_nets[1];
6155163Sshin		char	ru6_tracefile[1];
6255163Sshin	} rip6un;
6355163Sshin#define	rip6_nets	rip6un.ru6_nets
6455163Sshin#define	rip6_tracefile	rip6un.ru6_tracefile
6555163Sshin};
6655163Sshin
6755163Sshin#define	HOPCNT_INFINITY6	16
6855163Sshin#define	NEXTHOP_METRIC		0xff
6955163Sshin#define	RIP6_MAXMTU		1500
7055163Sshin
7155163Sshin#define	IFMINMTU		576
7255163Sshin
7355163Sshin#ifndef	DEBUG
7455163Sshin#define	SUPPLY_INTERVAL6	30
7555163Sshin#define	RIP_LIFETIME		180
7655163Sshin#define	RIP_HOLDDOWN		120
7755163Sshin#define	RIP_TRIG_INT6_MAX	5
7855163Sshin#define	RIP_TRIG_INT6_MIN	1
7955163Sshin#else
8055163Sshin/* only for debugging; can not wait for 30sec to appear a bug */
8155163Sshin#define	SUPPLY_INTERVAL6	10
8255163Sshin#define	RIP_LIFETIME		60
8355163Sshin#define	RIP_HOLDDOWN		40
8455163Sshin#define	RIP_TRIG_INT6_MAX	5
8555163Sshin#define	RIP_TRIG_INT6_MIN	1
8655163Sshin#endif
8755163Sshin
8855163Sshin#define	RIP6_PORT		521
8955163Sshin#define	RIP6_DEST		"ff02::9"
9055163Sshin
9155163Sshin#define	LOOPBACK_IF		"lo0"
92