]>
git.saurik.com Git - apple/network_cmds.git/blob - rbootd.tproj/conf.c
2 * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * "Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
7 * Reserved. This file contains Original Code and/or Modifications of
8 * Original Code as defined in and that are subject to the Apple Public
9 * Source License Version 1.0 (the 'License'). You may not use this file
10 * except in compliance with the License. Please obtain a copy of the
11 * License at http://www.apple.com/publicsource and read it before using
14 * The Original Code and all software distributed under the License are
15 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
16 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
19 * License for the specific language governing rights and limitations
22 * @APPLE_LICENSE_HEADER_END@
25 * Copyright (c) 1988, 1992 The University of Utah and the Center
26 * for Software Science (CSS).
27 * Copyright (c) 1992, 1993
28 * The Regents of the University of California. All rights reserved.
30 * This code is derived from software contributed to Berkeley by
31 * the Center for Software Science of the University of Utah Computer
32 * Science Department. CSS requests users of this software to return
33 * to css-dist@cs.utah.edu any improvements that they make and grant
34 * CSS redistribution rights.
36 * Redistribution and use in source and binary forms, with or without
37 * modification, are permitted provided that the following conditions
39 * 1. Redistributions of source code must retain the above copyright
40 * notice, this list of conditions and the following disclaimer.
41 * 2. Redistributions in binary form must reproduce the above copyright
42 * notice, this list of conditions and the following disclaimer in the
43 * documentation and/or other materials provided with the distribution.
44 * 3. All advertising materials mentioning features or use of this software
45 * must display the following acknowledgement:
46 * This product includes software developed by the University of
47 * California, Berkeley and its contributors.
48 * 4. Neither the name of the University nor the names of its contributors
49 * may be used to endorse or promote products derived from this software
50 * without specific prior written permission.
52 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
53 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
54 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
55 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
56 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
57 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
58 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
59 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
60 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
61 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
64 * @(#)conf.c 8.1 (Berkeley) 6/4/93
66 * Utah $Hdr: conf.c 3.1 92/07/06$
67 * Author: Jeff Forys, University of Utah CSS
71 static char sccsid
[] = "@(#)conf.c 8.1 (Berkeley) 6/4/93";
74 #include <sys/param.h>
79 #include "pathnames.h"
82 ** Define (and possibly initialize) global variables here.
85 ** The maximum number of bootable files (`char *BootFiles[]') is
86 ** limited to C_MAXFILE (i.e. the maximum number of files that
87 ** can be spec'd in the configuration file). This was done to
88 ** simplify the boot file search code.
91 char *ProgName
; /* path-stripped argv[0] */
92 char MyHost
[MAXHOSTNAMELEN
+1]; /* host name */
93 int MyPid
; /* process id */
94 int DebugFlg
= 0; /* set true if debugging */
95 int BootAny
= 0; /* set true if we boot anyone */
97 char *ConfigFile
= NULL
; /* configuration file */
98 char *DfltConfig
= _PATH_RBOOTDCONF
; /* default configuration file */
99 char *PidFile
= _PATH_RBOOTDPID
; /* file w/pid of server */
100 char *BootDir
= _PATH_RBOOTDLIB
; /* directory w/boot files */
101 char *DbgFile
= _PATH_RBOOTDDBG
; /* debug output file */
103 FILE *DbgFp
= NULL
; /* debug file pointer */
104 char *IntfName
= NULL
; /* intf we are attached to */
106 u_short SessionID
= 0; /* generated session ID */
108 char *BootFiles
[C_MAXFILE
]; /* list of boot files */
110 CLIENT
*Clients
= NULL
; /* list of addrs we'll accept */
111 RMPCONN
*RmpConns
= NULL
; /* list of active connections */
113 char RmpMcastAddr
[RMP_ADDRLEN
] = RMP_ADDR
; /* RMP multicast address */