-
-/* Copyright (C) 1998 Transarc Corporation - All rights reserved */
/*
- * (C) COPYRIGHT IBM CORPORATION 1987, 1988
- * LICENSED MATERIALS - PROPERTY OF IBM
+ * Copyright 2000, International Business Machines Corporation and others.
+ * All Rights Reserved.
+ *
+ * This software has been released under the terms of the IBM Public
+ * License. For details, see the LICENSE file in the top-level source
+ * directory or online at http://www.openafs.org/dl/license10.html
*/
#include <afs/param.h>
+#include <afsconfig.h>
+
+RCSID("$Header$");
+
#include <afs/stds.h>
#include <sys/types.h>
#include <signal.h>
struct vldstats dynamic_statistics;
struct ubik_dbase *VL_dbase;
afs_uint32 HostAddress[MAXSERVERID+1];
-extern afs_int32 afsconf_GetKey();
extern int afsconf_CheckAuth();
-extern int afsconf_ClientAuth();
extern int afsconf_ServerAuth();
extern afs_int32 ubik_lastYesTime;
int smallMem = 0;
int rxJumbograms = 1; /* default is to send and receive jumbo grams */
-CheckSignal_Signal() {IOMGR_SoftSig(CheckSignal, 0);}
+static void CheckSignal_Signal() {IOMGR_SoftSig(CheckSignal, 0);}
static CheckSignal()
{
char **argv;
{
register afs_int32 code;
- afs_int32 serverList[MAXSERVERS];
afs_int32 myHost;
struct rx_service *tservice;
struct rx_securityClass *sc[3];
int noAuth = 0, index, i;
extern int rx_extraPackets;
char commandLine[150];
-
+ char clones[MAXHOSTSPERCELL];
+
#ifdef AFS_AIX32_ENV
/*
* The following signal action for AIX is necessary so that in case of a
rx_enablePeerRPCStats();
} else if (strcmp(argv[index], "-enable_process_stats") == 0) {
rx_enableProcessRPCStats();
+#ifndef AFS_NT40_ENV
+ } else if (strcmp(argv[index], "-syslog")==0) {
+ /* set syslog logging flag */
+ serverLogSyslog = 1;
+ } else if (strncmp(argv[index], "-syslog=", 8)==0) {
+ serverLogSyslog = 1;
+ serverLogSyslogFacility = atoi(argv[index]+8);
+#endif
} else {
/* support help flag */
+#ifndef AFS_NT40_ENV
printf("Usage: vlserver [-p <number of processes>] [-nojumbo] "
- /*" [-enable_peer_stats] [-enable_process_stats] " */
+ "[-syslog[=FACILITY]] "
+ "[-enable_peer_stats] [-enable_process_stats] "
"[-help]\n");
+#else
+ printf("Usage: vlserver [-p <number of processes>] [-nojumbo] "
+ "[-enable_peer_stats] [-enable_process_stats] "
+ "[-help]\n");
+#endif
fflush(stdout);
exit(0);
}
}
bcopy(th->h_addr,&myHost,sizeof(afs_int32));
-#if !defined(AFS_HPUX_ENV) && !defined(AFS_NT40_ENV)
+#if !defined(AFS_HPUX_ENV) && !defined(AFS_NT40_ENV) && !defined(AFS_DJGPP_ENV)
signal(SIGXCPU, CheckSignal_Signal);
#endif
/* get list of servers */
- code = afsconf_GetCellInfo(tdir,(char *)0, AFSCONF_VLDBSERVICE,&info);
+ code = afsconf_GetExtendedCellInfo(tdir,(char *)0, AFSCONF_VLDBSERVICE,
+ &info, &clones);
if (code) {
printf("vlserver: Couldn't get cell server list for 'afsvldb'.\n");
exit(2);
}
- for (index=0,i = 0;index<info.numServers;index++)
- if (info.hostAddr[index].sin_addr.s_addr != myHost) /* ubik already tacks myHost onto list */
- serverList[i++] = info.hostAddr[index].sin_addr.s_addr;
- serverList[i] = 0;
vldb_confdir = tdir; /* Preserve our configuration dir */
/* rxvab no longer supported */
ubik_SRXSecurityRock = (char *) tdir;
ubik_CheckRXSecurityProc = afsconf_CheckAuth;
ubik_CheckRXSecurityRock = (char *) tdir;
- code = ubik_ServerInit(myHost, htons(AFSCONF_VLDBPORT), serverList, vl_dbaseName, &VL_dbase);
+ code = ubik_ServerInitByInfo(myHost, htons(AFSCONF_VLDBPORT), &info,
+ &clones, vl_dbaseName, &VL_dbase);
if (code) {
printf("vlserver: Ubik init failed with code %d\n",code);
exit(2);