/*
* 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 <afsconfig.h>
#include <afs/param.h>
-RCSID
- ("$Header$");
#include <afs/stds.h>
#include <afs/afsint.h>
struct rx_connection *serverconns[MAXSERVERS];
char *(args[50]);
-extern int AFS_FetchData(), AFS_StoreData(), AFS_StoreACL();
-extern int RXAFS_GetTime(), AFS_GetStatistics(), AFS_FetchStatus(),
-AFS_FetchACL();
-extern int AFS_StoreStatus(), AFS_RemoveFile(), AFS_CreateFile();
-extern int AFS_Rename(), AFS_Symlink(), AFS_HardLink(), AFS_MakeDir(),
-AFS_RemoveDir();
-extern int AFS_Readdir(), AFS_MakeMountPoint(), AFS_ReleaseTokens(),
-AFS_GetToken();
-extern int AFS_BulkStatus(), AFS_Lookup();
-extern int AFS_BulkStatus(), AFS_BulkLookup(), AFS_RenewAllTokens();
-extern int AFS_BulkFetchVV(), AFS_BulkKeepAlive();
-extern int AFS_Spare1(), AFS_Spare2(), AFS_Spare3(), AFS_Spare4(),
-AFS_Spare5(), AFS_Spare6();
-
afs_int32
pxclient_Initialize(int auth, afs_int32 serverAddr)
{
afs_int32 code;
- afs_int32 scIndex;
+ rx_securityIndex scIndex;
struct rx_securityClass *sc;
code = rx_Init(htons(2115) /*0 */ );
fprintf(stderr, "pxclient_Initialize: Could not initialize rx.\n");
return code;
}
- scIndex = 0;
+ scIndex = RX_SECIDX_NULL;
rx_SetRxDeadTime(50);
- switch (scIndex) {
- case 0:
- sc = rxnull_NewClientSecurityObject();
- break;
-
-#ifdef notdef /* security */
- case 1:
- sc = rxvab_NewClientSecurityObject(&ttoken.sessionKey, ttoken.ticket,
- 0);
- break;
-
- case 2:
- sc = rxkad_NewClientSecurityObject(rxkad_clear, &ttoken.sessionKey,
- ttoken.kvno, ttoken.ticketLen,
- ttoken.ticket);
-#endif /* notdef */
- }
+ sc = rxnull_NewClientSecurityObject();
serverconns[0] =
rx_NewConnection(serverAddr, htons(7000), 1, sc, scIndex);
{
char **av = argv;
struct sockaddr_in host;
- register afs_int32 code;
- extern struct hostent *gethostbyname();
+ afs_int32 code;
struct hostent *hp;
- char *hostname;
char hnamebuf[200];
struct timeval tv;
int noAuth = 1; /* Default is authenticated connections */
argc--, av++;
if (argc < 1) {
- printf("usage: pxclient <serverHost>\n");
+ printf("usage: fsprobe <serverHost>\n");
exit(1);
}
- memset((char *)&host, 0, sizeof(struct sockaddr_in));
+ memset(&host, 0, sizeof(struct sockaddr_in));
host.sin_family = AF_INET;
host.sin_addr.s_addr = inet_addr(av[0]);
#ifdef STRUCT_SOCKADDR_HAS_SA_LEN
#endif
if (host.sin_addr.s_addr != -1) {
strcpy(hnamebuf, av[0]);
- hostname = hnamebuf;
} else {
hp = gethostbyname(av[0]);
if (hp) {
host.sin_family = hp->h_addrtype;
memcpy((caddr_t) & host.sin_addr, hp->h_addr, hp->h_length);
- hostname = hp->h_name;
} else {
printf("unknown server host %s\n", av[0]);
exit(1);
exit(1);
}
- code = ubik_Call(RXAFS_GetTime, cstruct, 0, &tv.tv_sec, &tv.tv_usec);
+ code = RXAFS_GetTime(cstruct->conns[0], (afs_uint32 *)&tv.tv_sec, (afs_uint32 *)&tv.tv_usec);
if (!code)
printf("AFS_GetTime on %s sec=%ld, usec=%ld\n", av[0], tv.tv_sec,
- tv.tv_usec);
+ (long int)tv.tv_usec);
else
printf("return code is %d\n", code);
printf("fs> ");
if (fgets(line, 499, stdin) != NULL) {
char *oper;
- register char **argp = args;
+ char **argp = args;
GetArgs(line, argp, &nargs);
oper = &argp[0][0];
++argp, --nargs;
}
}
#endif
+ return 0;
}
void
-GetArgs(register char *line, register char **args, register int *nargs)
+GetArgs(char *line, char **args, int *nargs)
{
*nargs = 0;
while (*line) {
- register char *last = line;
+ char *last = line;
while (*line == ' ')
line++;
if (*last == ' ')
static afs_int32
-FetchProc(register struct rx_call *acall)
+FetchProc(struct rx_call *acall)
{
extern char *malloc();
- register char *tbuffer;
+ char *tbuffer;
afs_int32 tlen, length, code;
code = rx_Read(acall, &length, sizeof(afs_int32));
static afs_int32
-StoreProc(register struct rx_call *acall, char *string, int length)
+StoreProc(struct rx_call *acall, char *string, int length)
{
afs_int32 tlen, code;
static afs_int32
-FetchDir(register struct rx_call *acall)
+FetchDir(struct rx_call *acall)
{
extern char *malloc();
- register char *tbuffer;
+ char *tbuffer;
afs_int32 tlen, length, code;
struct dirent *dp;