-/* Copyright (C) 1990, 1998 Transarc Corporation - All rights reserved */
/*
- * (C) COPYRIGHT IBM CORPORATION 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>
char **argv;
{
register afs_int32 code;
- afs_int32 serverList[MAXSERVERS];
afs_int32 myHost;
register struct hostent *th;
char hostname[64];
int kerberosKeys; /* set if found some keys */
afs_int32 i,j;
int lwps = 3;
+ char clones[MAXHOSTSPERCELL];
const char *pr_dbaseName;
char *whoami = "ptserver";
else if (strncmp (arg, "-enable_process_stats", alen) == 0) {
rx_enableProcessRPCStats();
}
+#ifndef AFS_NT40_ENV
+ else if (strncmp(arg, "-syslog", alen)==0) {
+ /* set syslog logging flag */
+ serverLogSyslog = 1;
+ }
+ else if (strncmp(arg, "-syslog=", MIN(8,alen))==0) {
+ serverLogSyslog = 1;
+ serverLogSyslogFacility = atoi(arg+8);
+ }
+#endif
else if (*arg == '-') {
usage:
/* hack in help flag support */
+#ifndef AFS_NT40_ENV
printf ("Usage: ptserver [-database <db path>] "
- "[-p <number of processes>] [-rebuildDB] "
- /* "[-enable_peer_stats] [-enable_process_stats] " */
+ "[-syslog[=FACILITY]] "
+ "[-p <number of processes>] [-rebuild] "
+ "[-enable_peer_stats] [-enable_process_stats] "
"[-help]\n");
+#else
+ printf ("Usage: ptserver [-database <db path>] "
+ "[-p <number of processes>] [-rebuild] "
+ "[-help]\n");
+#endif
fflush(stdout);
PT_EXIT(1);
bcopy(th->h_addr,&myHost,sizeof(afs_int32));
/* get list of servers */
- code = afsconf_GetCellInfo(prdir,(char *)0,"afsprot",&info);
+ code = afsconf_GetExtendedCellInfo(prdir,(char *)0,"afsprot",
+ &info, &clones);
if (code) {
com_err (whoami, code, "Couldn't get server list");
PT_EXIT(2);
pr_realmName = info.name;
pr_realmNameLen = strlen (pr_realmName);
- for (i=0,j=0;i<info.numServers;i++)
- if (info.hostAddr[i].sin_addr.s_addr != myHost) /* ubik already tacks myHost onto list */
- serverList[j++] = info.hostAddr[i].sin_addr.s_addr;
- serverList[j] = 0;
-
#if 0
/* get keys */
code = afsconf_GetKey(prdir,999,&tkey);
* and the header are in separate Ubik buffers then 120 buffers may be
* required. */
ubik_nBuffers = 120 + /*fudge*/40;
- code = ubik_ServerInit(myHost, htons(AFSCONF_PROTPORT), serverList,
- pr_dbaseName, &dbase);
+ code = ubik_ServerInitByInfo(myHost, htons(AFSCONF_PROTPORT), &info,
+ &clones, pr_dbaseName, &dbase);
if (code) {
com_err (whoami, code, "Ubik init failed");
PT_EXIT(2);