#
#	README,v 1.29.2.6 1993/10/13 01:47:54 jch Exp
#
# Gated Release 3.0
# Copyright (c) 1990,1991,1992,1993 by Cornell University. All rights reserved.
# Refer to Particulars and other Copyright notices at the end of this file.
#

		Configuring gated for compilation

A configuration file is needed so gated can be configured to compile
on your system.  This configuration file consists of one or more lines
that start with keywords.  All keywords are in lower case.  Blank
lines and lines starting with a pound sign (`#') are ignored.

The default for all of the following options are listed in
parentheses.


Paths for installation:

	bindir		(/etc)

		Where to install the support executables.  Depends on
		system, for BSD 4.3 Reno this should probably be
		`/usr/bin'.  Some people like to use `/usr/local/bin'.

	sbindir		(/etc)

		Where to install the gated executables.  Depends on the
		system, for BSD 4.3 Reno and later this should probably
		be `sbin' or `/usr/sbin'.  Some people like to use
		`/usr/local/sbin'.

	destdir		()

		Prefix used for installing in bindir, normally empty.

	objdir		(obj)

		Directory where gated should put it's object files.
		If you only compile for one architecture, use `obj'.
		If you compile for many, use `obj.' suffixed with the
		output of util/archtype.  Note that the Makefile in
		the source directory looks for the the latter and then
		tries the former.  If your machine does not supply a
		program to determine the archtype, archtype uses the
		first level of the hostname.  If you compile on
		several machines, use symbolic links to point their
		obj directories to the same place.

	signal_h	(/usr/include/signal.h)

		Where to find the definition on signals.  Some systems
		use `/usr/include/sys/signal.h'.

	template	(Makefile.template)

		Makefile template used to build makefiles.  In
		relation to utildir

	compatdir	(compat)

		Where the source files for the compaitiblility routes
		reside in relation to srcdir.
	
	srcdir		(..)

		Where the src files reside in relation to objdir.  For
		BSD 4.3 Reno systems using a /usr/obj heirchy, this
		should be the rooted path name to srcdir.

	smandir		(../man)

		Where the sources of the man files reside in relation to
		the source directory.

	mandir		(/usr/man)

		Root of tree where man pages will be installed.  See
		also `mantype'.

	mibdir		(mib)

		Directory in relation to srcdir where the MIB
		defintions files (input to mosy) are located.

	utildir		(util)

		Where the configuration scripts and other files
		reside, in relation to srcdir.

		
Gated programs:

These specify the compiled and installed names of gated an it's support
programs. 

	gated		(gated)
	gdc		(gdc)
	ripquery	(ripquery)
	ospf_monitor	(ospf_monitor)

	
Programs:
	
Programs used by Make.  These should not need to be changed unless the
programs are not in your path, or the versions in your path are
non-standard and do not work with this software.

	awk		(awk)
	cat		(cat)
	chgrp		(chgrp)
	chmod		(chmod)
	date		(date)
	etags		(etags)
	make		(make)
	mv		(mv)
	rm		(rm)
	sed		(sed)
	size		(size)
	tee		(tee)
	touch		(touch)


Compiler, linker, ...:

	cc		(cc)

		Which compiler to use.  On an RT where HighC is the
		default, use `hc -U__STDC__'.  If you have gcc you
		may want to use that.

	cflags		(-O)

		Compiler flags.  You may want to use `-g' when you are
		debugging.  With gcc you can specify both at the same
		time.

	head		(head -25)

		Command to use to see the first few lines of all c and
		h files to look for $Header: when buliding version.c.
		If you don't have head try `sed 25q'.  If that does
		not work use cat, it will work but will be alot
		slower.

	install		(install)

		Program to install the executables into the correct
		system directories.  If there is no `install' program on
		your system, can try `@(SRCDIR)/@(UTILDIR)/install'

	installflags	(-c -s)

		Flags to specify to install program when installing the
		executables on your system.

	ldflags		()

		Loader flags.  `-lresolv' may be handy if you want to
		use the nameserver and don't have the resolver
		routines in libc.  Under SunOS 4.0 and later you will
		need `-lkvm'.  For BSD 4.3 Reno you will need
		`-lutil'.  For AIX 3.1 on an RS/6000 you will need
		`-lm -lbsd'.

		NOTE: In SunOS 4.1.1 there is a bug in the dynamically
		linked libkvm.  If you are using Sun's cc, or gcc 2.0
		or greater, you will need to specify `-Bstatic -lkvm'
		(`-static -lkvm' for gcc 2.0) as a workaround.  For A/UX
		2.01 you will need `-lm -lbsd'.

	ldothers	()

		Additional loader flags that should be included after
		the gated "compatibility" library.  For IRIX 4.0 you
		will need `-lmld'.		

	lex		(lex)

		Lexical analyzer generator to use.  Lex is OK, Flex
		2.1 is better.

	lflags		(-v)

		Flags to lex.  For flex 2.1 use `-p -s -c -I'.  For BSD
		4.3 Reno use `-p -s -C -I'.  If you leave of the `-I'
		and your lexical analyzer is flex, the %include directive
		will not work properly.

	link		(ln -s)

		Program to use to create links.  If your system does
		not support symbolic links, just use `ln'.

	lint		(lint)

		Program to error check the code.
	
	lintflags	(-hxz)

		Flags for lint.

	mantype		(bsd42)

		The method used to install man pages.  Choose the most
		appropriate method from the following list:

		bsd42		${MANDIR}/man<n>/<file>
		bsd44		${MANDIR}/cat<n>/thing.0
		ros		${MANDIR}/man<n>/<file> -- using install
		sys5		${MANDIR}/<a|p|u>_man/man<n>/<file>
		aix		${MANDIR}/<a|p|u>_man/man<n>/<file>
		local		${MANDIR}/manl/<base>.l
		l		${MANDIR}/man<n>/<base>.<n>l
		hpux		hpux

	
	mkdep		(mkdep)

		The script use to build dependencies, relative to
		`utildir' specified above.  If your system has one,
		you can use that.  If not, use `mkdep'.

		If you have gcc you can use `mkdep -flag -MM' which
		only generates dependencies based on the gated include
		files; it leaves out the system include files.

		On Ultrix systems, use `mkdep -flag -Em'.

		On systems where the compiler does not support
		building dependency lists, or does not produce them
		properly, use `mkdep.canned'.

		On SunOS 4 and later systems, you can use `mkdep.keepstate'
		which adds a `.KEEP_STATE:' rule to the makefile causing
		make to automatically build and maintain dependencies.

	yacc		(yacc)

		Parser generater.  A current release of bison is
		recommended.  Some versions of yacc will not return
		error indications when parsing is complete.  Depending
		on the protocols configured, the parser may be too big
		for yacc to proces.
	
	yflags		(-d)

		Flags for the parser generator.  If you use bison `-d
		-y -v' is recommended.

	ranlib	ranlib

		Command to update the symbol table in a library.
		Should be `ranlib' on BSD.  Since AIX/PS2 and IRIX 4.0
		do not have ranlib, use `:'.


Configuration for gdc:

	Gdc is a program that allows a selected group of non-root
	userids to control gated.

	config_mode	(0664)

		The file mode of the gated configuration file.

	gdc_mode	(4755)

		The mode with which to install gdc.  This mode will
		only be used if the group specified with gdc_group
		exists.  If installed as a setuid program Gdc will
		only allow members of gdc_group to control gated.

	gdc_group	(gdmaint)

		The group (from /etc/groups) for people allowed to
		start/stop and reconfigure gated.  If you do not want
		to create a new group, the use of group wheel may
		be appropriate.


Paths for runtime:

	Where a %s appears it is replaced by the name under which gated
	was started.

	path_config	(/etc/%s.conf)
	
		Where to find the configuration file.

	path_dump	(/usr/tmp/%s_dump)

		Where to put a gated state dump.  Some newer systems
		prefer `/var/tmp/%s_dump'.

	path_dumpdir	(/usr/tmp)

		Where to leave a gated core dump if possible.  Some
		systems prefer `/var/tmp'.

	path_pid	(/etc/%s.pid)

		Where to write the pid of the currenly running gated.
		On BSD 4.3 Reno this should be `/var/run/%s.pid'.

	path_version	(/etc/%s.version)

		Where to write version information for the currently
		running gated.  On BSD 4.3 Reno this should be
		`/var/run/%s.version'.

	path_unix	(/vmunix)

		Where to find the kernel symbol table for nlist() if
		it is not /vmunix and the system does not define
		_PATH_UNIX.  For AIX this is usually `/unix', for 
		HP systems `/hp-ux'.


Compile time options:

	options		()
	
		Compile-time options.  These result in #define keywords
		in the code.  They may be a single keyword, or a keyword
		followed by an equals `=' and a value to be assigned. 
		If the value contains spaces, surround it with double
		quotes `"'.  If the value requires double quotes (i.e. a
		string) surround it with duplicate double quotes (i.e.
		KEYWORD=""string value"").

			LOG_FACILITY	(LOG_DAEMON)

				The log facility used by default is
				LOG_DAEMON.  If you wish to change
				this to some other facility, such as
				LOG_LOCALx, do so here.

			LOG_OPTIONS	(LOG_PID | LOG_CONS | LOG_NDELAY)

				Options to specify for syslog.  Early
				versions of SunOS 5 have problems with
				LOG_CONS.

			RT_N_MULTIPATH

				Define the number of multipath
				destinations that should be maintained
				in the gated routing table.  Note that
				no Unix system supports more than one
				so the kernel interface routines will
				not compile if this number is greater
				than one.  The only protocol that will
				currently allow more than one is OSPF,
				although the ipForward MIB can report
				multiple destinations.

			INET_CLASS_E

				Include support for the experimental
				class E networks.

			MIB_GATED

				Include support for the gated specific
				MIB.  This is not yet implemented.

			ROUTE_AGGREGATION

				Used to delimit the code under
				development to support generic route
				aggregation.  This is not yet
				implemented.

			HPUX7_X
				For HPUX 7.* systems.

			SUNOS5_0

				For SunOS v5.0* (Solaris 2.0)

			SYSV
				For System V systems prior to SYSV4, including A/UX 2.01.

			SYSVR4
				For System V Release 4 systems.


		Kernel routing table interface specifications:
		
			KRT_RTREAD_KMEM
				For systems with BSD 4.3 hash based
				routing tables that are read directly
				from kernel memory.

			KRT_RTREAD_KINFO
				For systems based on BSD 4.3 Reno and
				later which read the routing table from
				the kernel via a getkerninfo() system
				call.

			KRT_RTREAD_SUNOS5
				For systems based on SunOS 5 which read
				the routing table from the kernel via
				the MIB interface.

			KRT_RTREAD_RADIX
				For systems based on BSD 4.3 Reno and
				later who's implementors were too stupid
				to include the getkerninfo() system
				interface to read the routing table.


			KRT_IFREAD_IOCTL
				For systems which read the interface
				list from the kernel with the
				SIOCGIFCONF ioctl interface.

			KRT_IFREAD_KINFO
				For systems which read the interface
				list from the kernel with the
				getkerninfo() system call.


			KRT_SYMBOLS_NLIST
				For systems that read interesting values
				from the kernel via the nlist()
				interface.

			KRT_SYMBOLS_SUNOS5
				For SunOS 5 based systems.


			KRT_RT_IOCTL
				For systems with BSD 4.3 based
				networking which manipulate the kernel
				routing table via SIOCADDRT and
				SIOCDELRT ioctls.

			KRT_RT_SOCK
				For systems with BSD 4.3 Reno or later
				based networking which manipulate the
				kernel routing table via the routing
				socket.

			KRT_RT_NOCHANGE
				For systems based on BSD 4.3 Reno or BSD
				4.3 Net/2 where the kernel processing of
				RTM_CHANGE messages is broken.



			KRT_LLADDR_KMEM
				For systems which read the physical
				address of IEEE 802 devices from the
				kernel by assuming that an arpcom
				structure preceeds the ifnet.

			KRT_LLADDR_SUNOS4
				For systems which read the physical
				address of IEEE 802 devices from the
				kernel by way of the NIT interface.

			KRT_LLADDR_SUNOS5
				For systems which read the physical
				address of IEEE 802 devices from the
				kernel by way of DLPI interface.

			KRT_LLADDR_NONE
				For systems where the normal interface
				scanning process will provide the
				physical address.


			KVM_TYPE_SUNSOS4
				For systems that use SunOS 4 style kvm
				libraries.

			KVM_TYPE_BSD44
				For systems that use BSD 4.4 style kvm
				libraries.

			KVM_TYPE_RENO
				For systems that use BSD 4.3 Reno style
				kvm libraries.

			KVM_TYPE_OTHER
				For systems that do not have kvm
				libraries but require reading kernel
				information from /dev/mem.

			KVM_TYPE_NONE
				For systems where it is not necessary to
				read information from /dev/mem.


			ROUTES_WO_MBUFS
				For systems with the BSD 4.3 hash based
				routing table that do not store the
				entries in mbufs.

			P2P_RT_REMOTE
				For BSD 4.2 based systems where the
				gateway of a route to a P2P interface is
				the remote address of that interface.

			VARIABLE_MASKS
				For systems supporting variable subnet
				masks.

			SOCKET_LENGTHS
				For systems where the struct sockaddr*
				include a length.

			SOCKADDR_DL
				For systems where AF_LINK sockaddrs are
				supported.

			INCLUDE_IF_DL
				For system where <net/if_dl.h> should be
				included.

			KSYM_IPFORWARDING	("_ipforwarding")
			KSYM_UDPCKSUM		("_udpcksum")
				The name of the kernel symbol for these
				values, to be read by kvm_nlist().  Some
				systems (i.e. SunOS4.*) require an
				underscore after `ip' and `udp".

		Signal types:
			SIGTYPE		(void)
			SIGRETURN	(return 0)
				The type and expected return value of
				signal handlers.  Older systems require:
					SIGTYPE=int
					SIGRETURN=return

			BSD_SIGNALS
				For systems using BSD signals

			SYSV_SIGNALS
				For systems using System V signals

			POSIX_SIGNALS
				For systems using POSIX signals

			HAVE_SYS_SIGLIST
				For systems that have a textual
				description of signals in sys_siglist.
				This is used for pretty-printing and is
				not critical.

			HAVE_WAITPID
				For systems that have POSIX compatabile
				waitpid().
				
		Other stuff:

			NO_STAT

				Define this for systems that do not have
				the stat() system call.

			NO_FORK
				For systems where it is not possible or
				desirable to use fork when making a
				status dump.

			HAVE_GETSYSTIMES
				For systems where the getsystems()
				system call should be used instead of
				gettimeofday().

			INCLUDE_UNISTD
				Systems where we should include
				/usr/include/unistd.h.

			INCLUDE_STRING
				Systems where we should include <string.h>
				instead of <strings.h>.

			NO_MBUF_H
				Systems that do not have <sys/mbuf.h>.

			INCLUDE_FCNTL
				Systems where we need to include
				<sys/fcntl.h> when including
				<sys/file.h>.

			INCLUDE_TYPES
				Systems where <sys/param.h> does not
				include <sys/types.h>.

			INCLUDE_BSDTYPES
				Systems where we also need to include
				<sys/bsdtypes.h>.

			USE_STREAMIO
				Systems where we need to use streams
				ioctls instead of BSD ioctls.

			USE_SYSCTL
				Systems (BSD 4.4) where sysctl performs the
				same function as getkerninfo.

			INCLUDE_SOCKIO
				Systems using streamio where we need to
				include <sys/sockio.h>.

			INCLUDE_SIOCTL
				Systems using streamio where we need to
				include <sys/sioctl.h>.

			ICMP_NOIP_HEADER
				Systems where ICMP packets are received
				without IP headers.

			LINGER_NO_PARAM
				Systems where SO_LINGER does not take a
				parameter.				

			INCLUDE_PATHS
				Systems that have <paths.h>.

			NLIST_NOUNDER
				Systems where kernel variables do not
				have a leading underscore.

			USE_SETPGRP
				Systems that use setpgrp() instead of
				TIOCNOTTY.

			NEED_INET_ATON
				For systems that do not have the
				inet_aton() system call. 

			MUST_FFLUSH
				For systems where setlinebuf() does not
				work properly and an fflush is required
				after every line written to the trace
				file.  Most notably Ultrix.

			FLAT_FS
				For systems that have no heirarchy to their
				file systems, such as when gated is
				imbedded into a rotuer.  Prevents attempts
				to prepend a path to all file names.

			VOID_T	(void *)
				Definition of a void pointer, for
				systems that do not support a void
				pointer, use caddr_t.

			GID_T
				For systems where GID_T is not defined.

			HAVE_DIRENT
				For systems that have <dirent.h>.

			BYTE_ORDER	()
				If your system has little endian byte order
				(x86, VAX, PMAX, ...) and your system does
				not define this, use
				BYTE_ORDER=LITTLE_ENDIAN.

		Word sizes:

			U_INT8	(unsigned char)
			S_INT8	(char)
			U_INT16	(unsigned short)
			S_INT16	(short)
			U_INT32 (unsigned int)
			S_INT32 (int)
				These defines can be changed to adapt gated
				to the word sizes of different hardware.

		Other useful info:

			Some of these might be useful to support routines
			not provided on some systems:

			bcmp(b1,b2,l)="memcmp(b1, b2, (size_t) l)"
			bcopy(s,d,l)="memcpy(d, s, (size_t) l)"
			bzero(s,l)="memset(s, 0, (size_t) l)"
			getpagesize()=BUFSIZ
			getwd(path)="getcwd(path, sizeof (path))"
			index=strchr
			random=rand
			rindex=strrchr 
			sigmask(m)="(1 << ((m)-1))"
			srandom=srand
			tzset()
			tzsetwall()={unsetenv("TZ");tzset();}

				
Protocol support:

	protocols	()

		Protocols to compile in.  The possible options are:

			bgp

				To include support for BGP (RFC-1164)

			egp

				To include support for EGP (RFC-904)

			hello

				To include support for DCN HELLO.
				Note that this is an igp similar to
				HELLO.  Inclusion of this protocol is
				not required for support of EGP and
				OSPF HELLO packets.

			icmp
	
				To include support for listening to
				ICMP redirects.  This is required on
				all system except BSD 4.3 Reno, where
				redirects are learned from the routing
				socket.

			ospf

				To include support for OSPF (RFC-1131)

			rip

				To include support for RIP (RFC-1058)

			isode_snmp

				To include support for SNMP via with
				ISODE's SMUX interface


ISODE SMUX support:

The following options should be specified to use the ISODE SMUX
support for SNMP.  To compile with SMUX support you must add
`isode_snmp' to the `protocols' line.  You must also point the loader
at the ISODE general and snmp libraries.  This is normally done by
adding `-lisnmp -lisode' to the `ldflags' line.

	isode_snmpi	(snmpi)

		Where to find the ISODE snmpi program.  This program
		is used to compile the gated MIB definitions.

	isode_mosy	(mosy)

		Where to find the ISODE mosy program.  This program is
		used to compile the gated MIB defintions on some
		systems.

	isode_snmp_include	(/usr/include/isode/snmp)

		Where the ISODE include files are installed on your
		system.  These are used to find the .h files while
		compiling.

	isode_snmp_defs_c	(@${ISODE_SNMPI} -f gated-mib.defs compile -s gated-mib)

		The command to use to convert the MIB .defs files into
		a .c program for inclusion in the gated binary.  On
		AIX 3.2 you'll need "mosy -s -c gated-mib.c ${MYS}".

	isode_snmp_c_o		(@${CC} -c ${CFLAGS} ${IFLAGS} gated-mib.c)

		The command to use to compile the .c code generated
		from the .defs file.  This is different from the
		normall .c.o line because many of the gcc warnings
		used on the rest of the code can not be use with this
		code.
		

#Local variables:
#eval:	(setq fill-column 72)
#end:

#
# ------------------------------------------------------------------------
# 
# 	GateD, Release 3
# 
# 	Copyright (c) 1990,1991,1992,1993 by Cornell University
# 	    All rights reserved.
# 
# 	THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY
# 	EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
# 	LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY
# 	AND FITNESS FOR A PARTICULAR PURPOSE.
# 
# 	Royalty-free licenses to redistribute GateD Release
# 	3 in whole or in part may be obtained by writing to:
# 
# 	    GateDaemon Project
# 	    Information Technologies/Network Resources
# 	    200 CCC, Garden Avenue
# 	    Cornell University
# 	    Ithaca, NY  14853-2601  USA
# 
# 	GateD is based on Kirton's EGP, UC Berkeley's routing
# 	daemon	 (routed), and DCN's HELLO routing Protocol.
# 	Development of GateD has been supported in part by the
# 	National Science Foundation.
# 
# 	Please forward bug fixes, enhancements and questions to the
# 	gated mailing list: gated-people@gated.cornell.edu.
# 
# 	Authors:
# 
# 		Jeffrey C Honig <jch@gated.cornell.edu>
# 		Scott W Brim <swb@gated.cornell.edu>
# 
# ------------------------------------------------------------------------
# 
#       Portions of this software may fall under the following
#       copyrights:
# 
# 	Copyright (c) 1988 Regents of the University of California.
# 	All rights reserved.
# 
# 	Redistribution and use in source and binary forms are
# 	permitted provided that the above copyright notice and
# 	this paragraph are duplicated in all such forms and that
# 	any documentation, advertising materials, and other
# 	materials related to such distribution and use
# 	acknowledge that the software was developed by the
# 	University of California, Berkeley.  The name of the
# 	University may not be used to endorse or promote
# 	products derived from this software without specific
# 	prior written permission.  THIS SOFTWARE IS PROVIDED
# 	``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES,
# 	INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
# 	MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#

