xref: /original-bsd/libexec/rbootd/conf.c (revision 3dea4107)
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.1 (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.1 (Berkeley) 07/23/92";
23 #endif /* not lint */
24 
25 #include "defs.h"
26 #include "pathnames.h"
27 
28 /*
29 **  Define (and possibly initialize) global variables here.
30 **
31 **  Caveat:
32 **	The maximum number of bootable files (`char *BootFiles[]') is
33 **	limited to C_MAXFILE (i.e. the maximum number of files that
34 **	can be spec'd in the configuration file).  This was done to
35 **	simplify the boot file search code.
36 */
37 
38 char	*ProgName;				/* path-stripped argv[0] */
39 char	MyHost[MAXHOSTNAMELEN+1];		/* host name */
40 int	MyPid;					/* process id */
41 int	DebugFlg = 0;				/* set true if debugging */
42 int	BootAny = 0;				/* set true if we boot anyone */
43 
44 char	*ConfigFile = NULL;			/* configuration file */
45 char	*DfltConfig = _PATH_RBOOTDCONF;		/* default configuration file */
46 char	*PidFile = _PATH_RBOOTDPID;		/* file w/pid of server */
47 char	*BootDir = _PATH_RBOOTDLIB;		/* directory w/boot files */
48 char	*DbgFile = _PATH_RBOOTDDBG;		/* debug output file */
49 
50 FILE	*DbgFp = NULL;				/* debug file pointer */
51 char	*IntfName = NULL;			/* intf we are attached to */
52 
53 u_short	SessionID = 0;				/* generated session ID */
54 
55 char	*BootFiles[C_MAXFILE];			/* list of boot files */
56 
57 CLIENT	*Clients = NULL;			/* list of addrs we'll accept */
58 RMPCONN	*RmpConns = NULL;			/* list of active connections */
59 
60 char	RmpMcastAddr[RMP_ADDRLEN] = RMP_ADDR;	/* RMP multicast address */
61