xref: /original-bsd/libexec/rbootd/conf.c (revision 896ccb97)
1 /*
2  * Copyright (c) 1992 Regents of the University of California.
3  * Copyright (c) 1988, 1992 The University of Utah and the Center
4  *	for Software Science (CSS).
5  * All rights reserved.
6  *
7  * This code is derived from software contributed to Berkeley by
8  * the Center for Software Science of the University of Utah Computer
9  * Science Department.  CSS requests users of this software to return
10  * to css-dist@cs.utah.edu any improvements that they make and grant
11  * CSS redistribution rights.
12  *
13  * %sccs.include.redist.c%
14  *
15  *	@(#)conf.c	5.2 (Berkeley) 07/23/92
16  *
17  * Utah $Hdr: conf.c 3.1 92/07/06$
18  * Author: Jeff Forys, University of Utah CSS
19  */
20 
21 #ifndef lint
22 static char sccsid[] = "@(#)conf.c	5.2 (Berkeley) 07/23/92";
23 #endif /* not lint */
24 
25 #include <sys/param.h>
26 #include <sys/time.h>
27 
28 #include <stdio.h>
29 #include "defs.h"
30 #include "pathnames.h"
31 
32 /*
33 **  Define (and possibly initialize) global variables here.
34 **
35 **  Caveat:
36 **	The maximum number of bootable files (`char *BootFiles[]') is
37 **	limited to C_MAXFILE (i.e. the maximum number of files that
38 **	can be spec'd in the configuration file).  This was done to
39 **	simplify the boot file search code.
40 */
41 
42 char	*ProgName;				/* path-stripped argv[0] */
43 char	MyHost[MAXHOSTNAMELEN+1];		/* host name */
44 int	MyPid;					/* process id */
45 int	DebugFlg = 0;				/* set true if debugging */
46 int	BootAny = 0;				/* set true if we boot anyone */
47 
48 char	*ConfigFile = NULL;			/* configuration file */
49 char	*DfltConfig = _PATH_RBOOTDCONF;		/* default configuration file */
50 char	*PidFile = _PATH_RBOOTDPID;		/* file w/pid of server */
51 char	*BootDir = _PATH_RBOOTDLIB;		/* directory w/boot files */
52 char	*DbgFile = _PATH_RBOOTDDBG;		/* debug output file */
53 
54 FILE	*DbgFp = NULL;				/* debug file pointer */
55 char	*IntfName = NULL;			/* intf we are attached to */
56 
57 u_short	SessionID = 0;				/* generated session ID */
58 
59 char	*BootFiles[C_MAXFILE];			/* list of boot files */
60 
61 CLIENT	*Clients = NULL;			/* list of addrs we'll accept */
62 RMPCONN	*RmpConns = NULL;			/* list of active connections */
63 
64 char	RmpMcastAddr[RMP_ADDRLEN] = RMP_ADDR;	/* RMP multicast address */
65