11592Srgrimes/* 21592Srgrimes * Copyright (c) 1988, 1992 The University of Utah and the Center 31592Srgrimes * for Software Science (CSS). 41592Srgrimes * Copyright (c) 1992, 1993 51592Srgrimes * The Regents of the University of California. All rights reserved. 61592Srgrimes * 71592Srgrimes * This code is derived from software contributed to Berkeley by 81592Srgrimes * the Center for Software Science of the University of Utah Computer 91592Srgrimes * Science Department. CSS requests users of this software to return 101592Srgrimes * to css-dist@cs.utah.edu any improvements that they make and grant 111592Srgrimes * CSS redistribution rights. 121592Srgrimes * 131592Srgrimes * Redistribution and use in source and binary forms, with or without 141592Srgrimes * modification, are permitted provided that the following conditions 151592Srgrimes * are met: 161592Srgrimes * 1. Redistributions of source code must retain the above copyright 171592Srgrimes * notice, this list of conditions and the following disclaimer. 181592Srgrimes * 2. Redistributions in binary form must reproduce the above copyright 191592Srgrimes * notice, this list of conditions and the following disclaimer in the 201592Srgrimes * documentation and/or other materials provided with the distribution. 21262435Sbrueffer * 3. Neither the name of the University nor the names of its contributors 221592Srgrimes * may be used to endorse or promote products derived from this software 231592Srgrimes * without specific prior written permission. 241592Srgrimes * 251592Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 261592Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 271592Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 281592Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 291592Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 301592Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 311592Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 321592Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 331592Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 341592Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 351592Srgrimes * SUCH DAMAGE. 361592Srgrimes * 3727074Ssteve * from: @(#)conf.c 8.1 (Berkeley) 6/4/93 381592Srgrimes * 3927074Ssteve * From: Utah Hdr: conf.c 3.1 92/07/06 401592Srgrimes * Author: Jeff Forys, University of Utah CSS 411592Srgrimes */ 421592Srgrimes 431592Srgrimes#ifndef lint 4431386Scharnier#if 0 4527077Sstevestatic const char sccsid[] = "@(#)conf.c 8.1 (Berkeley) 6/4/93"; 4631386Scharnier#endif 4731386Scharnierstatic const char rcsid[] = 4850476Speter "$FreeBSD$"; 491592Srgrimes#endif /* not lint */ 501592Srgrimes 511592Srgrimes#include <sys/param.h> 521592Srgrimes#include <sys/time.h> 531592Srgrimes 541592Srgrimes#include <stdio.h> 551592Srgrimes#include "defs.h" 561592Srgrimes#include "pathnames.h" 571592Srgrimes 581592Srgrimes/* 591592Srgrimes** Define (and possibly initialize) global variables here. 601592Srgrimes** 611592Srgrimes** Caveat: 621592Srgrimes** The maximum number of bootable files (`char *BootFiles[]') is 631592Srgrimes** limited to C_MAXFILE (i.e. the maximum number of files that 641592Srgrimes** can be spec'd in the configuration file). This was done to 651592Srgrimes** simplify the boot file search code. 661592Srgrimes*/ 671592Srgrimes 6845422Sbrianchar MyHost[MAXHOSTNAMELEN]; /* host name */ 6927074Sstevepid_t MyPid; /* process id */ 701592Srgrimesint DebugFlg = 0; /* set true if debugging */ 711592Srgrimesint BootAny = 0; /* set true if we boot anyone */ 721592Srgrimes 731592Srgrimeschar *ConfigFile = NULL; /* configuration file */ 741592Srgrimeschar *DfltConfig = _PATH_RBOOTDCONF; /* default configuration file */ 751592Srgrimeschar *PidFile = _PATH_RBOOTDPID; /* file w/pid of server */ 761592Srgrimeschar *BootDir = _PATH_RBOOTDLIB; /* directory w/boot files */ 771592Srgrimeschar *DbgFile = _PATH_RBOOTDDBG; /* debug output file */ 781592Srgrimes 791592SrgrimesFILE *DbgFp = NULL; /* debug file pointer */ 801592Srgrimeschar *IntfName = NULL; /* intf we are attached to */ 811592Srgrimes 8227074Ssteveu_int16_t SessionID = 0; /* generated session ID */ 831592Srgrimes 841592Srgrimeschar *BootFiles[C_MAXFILE]; /* list of boot files */ 851592Srgrimes 861592SrgrimesCLIENT *Clients = NULL; /* list of addrs we'll accept */ 871592SrgrimesRMPCONN *RmpConns = NULL; /* list of active connections */ 881592Srgrimes 8927074Ssteveu_int8_t RmpMcastAddr[RMP_ADDRLEN] = RMP_ADDR; /* RMP multicast address */ 90