xref: /csrg-svn/libexec/rbootd/conf.c (revision 61443)
155570Sbostic /*
255570Sbostic  * Copyright (c) 1988, 1992 The University of Utah and the Center
355570Sbostic  *	for Software Science (CSS).
4*61443Sbostic  * Copyright (c) 1992, 1993
5*61443Sbostic  *	The Regents of the University of California.  All rights reserved.
655570Sbostic  *
755570Sbostic  * This code is derived from software contributed to Berkeley by
855570Sbostic  * the Center for Software Science of the University of Utah Computer
955570Sbostic  * Science Department.  CSS requests users of this software to return
1055570Sbostic  * to css-dist@cs.utah.edu any improvements that they make and grant
1155570Sbostic  * CSS redistribution rights.
1255570Sbostic  *
1355570Sbostic  * %sccs.include.redist.c%
1455570Sbostic  *
15*61443Sbostic  *	@(#)conf.c	8.1 (Berkeley) 06/04/93
1655570Sbostic  *
1755570Sbostic  * Utah $Hdr: conf.c 3.1 92/07/06$
1855570Sbostic  * Author: Jeff Forys, University of Utah CSS
1955570Sbostic  */
2055570Sbostic 
2155570Sbostic #ifndef lint
22*61443Sbostic static char sccsid[] = "@(#)conf.c	8.1 (Berkeley) 06/04/93";
2355570Sbostic #endif /* not lint */
2455570Sbostic 
2555600Sbostic #include <sys/param.h>
2655600Sbostic #include <sys/time.h>
2755600Sbostic 
2855600Sbostic #include <stdio.h>
2955570Sbostic #include "defs.h"
3055570Sbostic #include "pathnames.h"
3155570Sbostic 
3255570Sbostic /*
3355570Sbostic **  Define (and possibly initialize) global variables here.
3455570Sbostic **
3555570Sbostic **  Caveat:
3655570Sbostic **	The maximum number of bootable files (`char *BootFiles[]') is
3755570Sbostic **	limited to C_MAXFILE (i.e. the maximum number of files that
3855570Sbostic **	can be spec'd in the configuration file).  This was done to
3955570Sbostic **	simplify the boot file search code.
4055570Sbostic */
4155570Sbostic 
4255570Sbostic char	*ProgName;				/* path-stripped argv[0] */
4355570Sbostic char	MyHost[MAXHOSTNAMELEN+1];		/* host name */
4455570Sbostic int	MyPid;					/* process id */
4555570Sbostic int	DebugFlg = 0;				/* set true if debugging */
4655570Sbostic int	BootAny = 0;				/* set true if we boot anyone */
4755570Sbostic 
4855570Sbostic char	*ConfigFile = NULL;			/* configuration file */
4955570Sbostic char	*DfltConfig = _PATH_RBOOTDCONF;		/* default configuration file */
5055570Sbostic char	*PidFile = _PATH_RBOOTDPID;		/* file w/pid of server */
5155570Sbostic char	*BootDir = _PATH_RBOOTDLIB;		/* directory w/boot files */
5255570Sbostic char	*DbgFile = _PATH_RBOOTDDBG;		/* debug output file */
5355570Sbostic 
5455570Sbostic FILE	*DbgFp = NULL;				/* debug file pointer */
5555570Sbostic char	*IntfName = NULL;			/* intf we are attached to */
5655570Sbostic 
5755570Sbostic u_short	SessionID = 0;				/* generated session ID */
5855570Sbostic 
5955570Sbostic char	*BootFiles[C_MAXFILE];			/* list of boot files */
6055570Sbostic 
6155570Sbostic CLIENT	*Clients = NULL;			/* list of addrs we'll accept */
6255570Sbostic RMPCONN	*RmpConns = NULL;			/* list of active connections */
6355570Sbostic 
6455570Sbostic char	RmpMcastAddr[RMP_ADDRLEN] = RMP_ADDR;	/* RMP multicast address */
65