2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
10 #include <afsconfig.h>
11 #include <afs/param.h>
17 #include <afs/afsint.h>
18 #include <sys/socket.h>
19 #include <rx/rx_globals.h>
20 #include <netinet/in.h>
21 #include <arpa/inet.h>
34 struct ubik_client *cstruct;
35 struct rx_connection *serverconns[MAXSERVERS];
38 extern int AFS_FetchData(), AFS_StoreData(), AFS_StoreACL();
39 extern int RXAFS_GetTime(), AFS_GetStatistics(), AFS_FetchStatus(),
41 extern int AFS_StoreStatus(), AFS_RemoveFile(), AFS_CreateFile();
42 extern int AFS_Rename(), AFS_Symlink(), AFS_HardLink(), AFS_MakeDir(),
44 extern int AFS_Readdir(), AFS_MakeMountPoint(), AFS_ReleaseTokens(),
46 extern int AFS_BulkStatus(), AFS_Lookup();
47 extern int AFS_BulkStatus(), AFS_BulkLookup(), AFS_RenewAllTokens();
48 extern int AFS_BulkFetchVV(), AFS_BulkKeepAlive();
49 extern int AFS_Spare1(), AFS_Spare2(), AFS_Spare3(), AFS_Spare4(),
50 AFS_Spare5(), AFS_Spare6();
53 pxclient_Initialize(int auth, afs_int32 serverAddr)
57 struct rx_securityClass *sc;
59 code = rx_Init(htons(2115) /*0 */ );
61 fprintf(stderr, "pxclient_Initialize: Could not initialize rx.\n");
68 sc = rxnull_NewClientSecurityObject();
71 #ifdef notdef /* security */
73 sc = rxvab_NewClientSecurityObject(&ttoken.sessionKey, ttoken.ticket,
78 sc = rxkad_NewClientSecurityObject(rxkad_clear, &ttoken.sessionKey,
79 ttoken.kvno, ttoken.ticketLen,
84 rx_NewConnection(serverAddr, htons(7000), 1, sc, scIndex);
86 code = ubik_ClientInit(serverconns, &cstruct);
89 fprintf(stderr, "pxclient_Initialize: ubik client init failed.\n");
97 #include "AFS_component_version_number.c"
100 main(int argc, char **argv)
103 struct sockaddr_in host;
104 register afs_int32 code;
105 extern struct hostent *gethostbyname();
110 int noAuth = 1; /* Default is authenticated connections */
114 printf("usage: pxclient <serverHost>\n");
117 memset((char *)&host, 0, sizeof(struct sockaddr_in));
118 host.sin_family = AF_INET;
119 host.sin_addr.s_addr = inet_addr(av[0]);
120 #ifdef STRUCT_SOCKADDR_HAS_SA_LEN
121 host.sin_len = sizeof(struct sockaddr_in);
123 if (host.sin_addr.s_addr != -1) {
124 strcpy(hnamebuf, av[0]);
127 hp = gethostbyname(av[0]);
129 host.sin_family = hp->h_addrtype;
130 memcpy((caddr_t) & host.sin_addr, hp->h_addr, hp->h_length);
131 hostname = hp->h_name;
133 printf("unknown server host %s\n", av[0]);
137 if ((code = pxclient_Initialize(noAuth, host.sin_addr.s_addr)) != 0) {
138 printf("Couldn't initialize fs library (code=%d).\n", code);
142 code = ubik_Call(RXAFS_GetTime, cstruct, 0, &tv.tv_sec, &tv.tv_usec);
144 printf("AFS_GetTime on %s sec=%ld, usec=%ld\n", av[0], tv.tv_sec,
147 printf("return code is %d\n", code);
155 if (fgets(line, 499, stdin) != NULL) {
157 register char **argp = args;
158 GetArgs(line, argp, &nargs);
161 if (!strcmp(oper, "probe")) {
163 ubik_Call(RXAFS_GetTime, cstruct, 0, &tv.tv_sec,
165 printf("return code is %d\n", code);
167 printf("sec=%d\n", tv.tv_sec);
168 } else if (!strcmp(oper, "fsstats")) {
169 struct afsStatistics stats;
171 code = ubik_AFS_GetStatistics(cstruct, 0, &stats);
172 printf("return code is %d\n", code);
173 } else if (!strcmp(oper, "fd")) {
174 code = FetchData(argp);
175 printf("return code is %d\n", code);
176 } else if (!strcmp(oper, "fs")) {
177 code = FetchStatus(argp);
178 printf("return code is %d\n", code);
179 } else if (!strcmp(oper, "fa")) {
180 code = FetchACL(argp);
181 printf("return code is %d\n", code);
182 } else if (!strcmp(oper, "sd")) {
183 code = StoreData(argp);
184 printf("return code is %d\n", code);
185 } else if (!strcmp(oper, "ss")) {
186 code = StoreStatus(argp);
187 printf("return code is %d\n", code);
188 } else if (!strcmp(oper, "sa")) {
189 code = StoreACL(argp);
190 printf("return code is %d\n", code);
191 } else if (!strcmp(oper, "cf")) {
192 code = CreateFile(argp);
193 printf("return code is %d\n", code);
194 } else if (!strcmp(oper, "rf")) {
195 code = RemoveFile(argp);
196 printf("return code is %d\n", code);
197 } else if (!strcmp(oper, "rn")) {
199 printf("return code is %d\n", code);
200 } else if (!strcmp(oper, "sl")) {
201 code = Symlink(argp);
202 printf("return code is %d\n", code);
203 } else if (!strcmp(oper, "hl")) {
204 code = HardLink(argp);
205 printf("return code is %d\n", code);
206 } else if (!strcmp(oper, "md")) {
207 code = MakeDir(argp);
208 printf("return code is %d\n", code);
209 } else if (!strcmp(oper, "rd")) {
210 code = RemoveDir(argp);
211 printf("return code is %d\n", code);
212 } else if (!strcmp(oper, "rdd")) {
213 code = Readdir(argp);
214 printf("return code is %d\n", code);
215 } else if (!strcmp(oper, "mm")) {
216 code = MakeMountPoint(argp);
217 printf("return code is %d\n", code);
218 } else if (!strcmp(oper, "rt")) {
219 code = ReleaseTokens(argp);
220 printf("return code is %d\n", code);
221 } else if (!strcmp(oper, "bs")) {
222 code = BulkStatus(argp);
223 printf("return code is %d\n", code);
224 } else if (!strcmp(oper, "lk")) {
226 printf("return code is %d\n", code);
227 } else if (!strcmp(oper, "gt")) {
228 code = GetToken(argp);
229 printf("return code is %d\n", code);
230 } else if (!strcmp(oper, "ka")) {
231 code = KeepAlive(argp);
232 printf("return code is %d\n", code);
233 } else if ((!strcmp(oper, "q")) || !strcmp(oper, "quit"))
236 printf("Unknown oper! Available operations: \n\n");
237 printf("fd <vnode> <unique> <pos> <len>\n");
238 printf("fs <vnode> <unique>\n");
239 printf("fa <vnode> <unique>\n");
241 ("sd <vnode> <unique> <pos> <len> <flen> [<mode>|-1] [<owner>|-1] [<length>|-1] <string>\n");
243 ("ss <vnode> <unique> [<mode>|-1] [<owner>|-1] [<length>|-1]\n");
244 printf("sa <vnode> <unique> <string>\n");
245 printf("rf <vnode> <unique> <name>\n");
247 ("cf <vnode> <unique> <name> [<mode>|-1] [<owner>|-1] [<length>|-1]\n");
249 ("rn <ovnode> <ounique> <oname> <nvnode> <nunique> <nname>\n");
251 ("sl <vnode> <unique> <name> <contents> [<mode>|-1] [<owner>|-1] [<length>|-1]\n");
252 printf("hl <dvnode> <dunique> <name> <evnode> <eunique>\n");
254 ("md <vnode> <unique> <name> [<mode>|-1] [<owner>|-1] [<length>|-1]\n");
255 printf("rd <vnode> <unique> <name>\n");
256 printf("rdd <vnode> <unique> <pos> <len>\n");
257 printf("lk <vnode> <unique> <name>\n");
258 printf("gt <vnode> <unique> <tokenID>\n");
259 printf("ka <vol.l> <vnode> <unique> <isExec> <kaTime>\n");
268 GetArgs(register char *line, register char **args, register int *nargs)
272 register char *last = line;
279 *args++ = line, (*nargs)++;
280 while (*line && *line != ' ')
287 FetchData(char **argp)
289 struct afsFetchStatus OutStatus;
290 struct afsToken Token;
291 struct afsVolSync tsync;
293 int vnode, unique, position, length;
295 struct rx_call *tcall;
297 sscanf(&(*argp)[0], "%d", &vnode);
299 sscanf(&(*argp)[0], "%d", &unique);
301 memset(&fid, 0, sizeof(struct afsFid));
302 fid.Volume.low = 10; /* XXX */
305 sscanf(&(*argp)[0], "%d", &position);
307 sscanf(&(*argp)[0], "%d", &length);
309 tcall = rx_NewCall(cstruct->conns[0]);
310 code = StartAFS_FetchData(tcall, &fid, &hyp0, position, length, 0);
312 code = FetchProc(tcall);
315 code = EndAFS_FetchData(tcall, &OutStatus, &Token, &tsync);
317 code = rx_EndCall(tcall, code);
323 FetchProc(register struct rx_call *acall)
325 extern char *malloc();
326 register char *tbuffer;
327 afs_int32 tlen, length, code;
329 code = rx_Read(acall, &length, sizeof(afs_int32));
330 length = ntohl(length);
331 if (code != sizeof(afs_int32))
333 tbuffer = malloc(256);
335 tlen = (length > 256 ? 256 : length);
336 code = rx_Read(acall, tbuffer, tlen);
349 FetchStatus(char **argp)
351 struct afsFetchStatus OutStatus;
352 struct afsToken Token;
353 struct afsVolSync tsync;
358 sscanf(&(*argp)[0], "%d", &vnode);
360 sscanf(&(*argp)[0], "%d", &unique);
362 memset(&fid, 0, sizeof(struct afsFid));
363 fid.Volume.low = 10; /* XXX */
367 ubik_AFS_FetchStatus(cstruct, 0, &fid, &hyp0, 0, &OutStatus,
374 FetchACL(char **argp)
376 struct afsFetchStatus OutStatus;
377 struct afsACL AccessList;
378 struct afsToken Token;
379 struct afsVolSync tsync;
384 sscanf(&(*argp)[0], "%d", &vnode);
386 sscanf(&(*argp)[0], "%d", &unique);
388 memset(&fid, 0, sizeof(struct afsFid));
389 fid.Volume.low = 10; /* XXX */
393 ubik_AFS_FetchACL(cstruct, 0, &fid, &hyp0, 0, &AccessList,
400 StoreData(char **argp)
402 struct afsStoreStatus InStatus;
403 struct afsFetchStatus OutStatus;
404 struct afsVolSync tsync;
406 int vnode, unique, position, length, filelength;
407 int mode, owner, len;
410 struct rx_call *tcall;
412 sscanf(&(*argp)[0], "%d", &vnode);
414 sscanf(&(*argp)[0], "%d", &unique);
416 memset(&fid, 0, sizeof(struct afsFid));
417 fid.Volume.low = 10; /* XXX */
420 sscanf(&(*argp)[0], "%d", &position);
422 sscanf(&(*argp)[0], "%d", &length);
424 sscanf(&(*argp)[0], "%d", &filelength);
426 memset(&InStatus, 0, sizeof(struct afsStoreStatus));
427 sscanf(&(*argp)[0], "%d", &mode);
429 sscanf(&(*argp)[0], "%d", &owner);
431 sscanf(&(*argp)[0], "%d", &len);
434 InStatus.mode = mode;
435 InStatus.mask |= AFS_SETMODE;
438 InStatus.owner = owner;
439 InStatus.mask |= AFS_SETOWNER;
442 InStatus.length = length;
443 InStatus.mask |= AFS_SETLENGTH;
445 string = &argp[0][0];
448 tcall = rx_NewCall(cstruct->conns[0]);
450 StartAFS_StoreData(tcall, &fid, &InStatus, position, length,
451 filelength, &hyp0, 0);
453 code = StoreProc(tcall, string, length);
456 code = EndAFS_StoreData(tcall, &OutStatus, &tsync);
458 code = rx_EndCall(tcall, code);
464 StoreProc(register struct rx_call *acall, char *string, int length)
466 afs_int32 tlen, code;
469 tlen = (length > 256 ? 256 : length);
470 code = rx_Write(acall, string, tlen);
481 StoreStatus(char **argp)
483 struct afsStoreStatus InStatus;
484 struct afsFetchStatus OutStatus;
485 struct afsVolSync tsync;
487 int vnode, unique, mode, owner, length;
490 sscanf(&(*argp)[0], "%d", &vnode);
492 sscanf(&(*argp)[0], "%d", &unique);
494 memset(&fid, 0, sizeof(struct afsFid));
495 fid.Volume.low = 10; /* XXX */
498 memset(&InStatus, 0, sizeof(struct afsStoreStatus));
499 sscanf(&(*argp)[0], "%d", &mode);
501 sscanf(&(*argp)[0], "%d", &owner);
503 sscanf(&(*argp)[0], "%d", &length);
506 InStatus.mode = mode;
507 InStatus.mask |= AFS_SETMODE;
510 InStatus.owner = owner;
511 InStatus.mask |= AFS_SETOWNER;
514 InStatus.length = length;
515 InStatus.mask |= AFS_SETLENGTH;
518 ubik_AFS_StoreStatus(cstruct, 0, &fid, &InStatus, &hyp0, 0,
525 StoreACL(char **argp)
527 struct afsFetchStatus OutStatus;
528 struct afsACL AccessList;
529 struct afsToken Token;
530 struct afsVolSync tsync;
536 sscanf(&(*argp)[0], "%d", &vnode);
538 sscanf(&(*argp)[0], "%d", &unique);
540 memset(&fid, 0, sizeof(struct afsFid));
541 fid.Volume.low = 10; /* XXX */
544 string = &argp[0][0];
546 AccessList.afsACL_len = strlen(string) + 1;
547 AccessList.afsACL_val = string;
549 ubik_AFS_StoreACL(cstruct, 0, &fid, &AccessList, &hyp0, 0,
556 RemoveFile(char **argp)
558 struct afsFetchStatus OutDirStatus, OutFidStatus;
559 struct afsVolSync tsync;
560 struct afsFidName nameFid;
561 struct afsFid fid, outFid;
566 sscanf(&(*argp)[0], "%d", &vnode);
568 sscanf(&(*argp)[0], "%d", &unique);
570 memset(&fid, 0, sizeof(struct afsFid));
571 fid.Volume.low = 10; /* XXX */
576 memset(&nameFid, 0, sizeof(struct afsFidName));
577 strcpy(nameFid.name, name);
579 ubik_AFS_RemoveFile(cstruct, 0, &fid, &nameFid, &hyp0, 0,
580 &OutDirStatus, &OutFidStatus, &outFid, &tsync);
586 CreateFile(char **argp)
588 struct afsFetchStatus OutDirStatus, OutFidStatus;
589 struct afsStoreStatus InStatus;
590 struct afsVolSync tsync;
591 struct afsFid fid, outFid;
592 struct afsToken Token;
594 int vnode, unique, mode, owner, length;
597 sscanf(&(*argp)[0], "%d", &vnode);
599 sscanf(&(*argp)[0], "%d", &unique);
601 memset(&fid, 0, sizeof(struct afsFid));
602 fid.Volume.low = 10; /* XXX */
607 memset(&InStatus, 0, sizeof(struct afsStoreStatus));
608 sscanf(&(*argp)[0], "%d", &mode);
610 sscanf(&(*argp)[0], "%d", &owner);
612 sscanf(&(*argp)[0], "%d", &length);
615 InStatus.mode = mode;
616 InStatus.mask |= AFS_SETMODE;
619 InStatus.owner = owner;
620 InStatus.mask |= AFS_SETOWNER;
623 InStatus.length = length;
624 InStatus.mask |= AFS_SETLENGTH;
627 ubik_AFS_CreateFile(cstruct, 0, &fid, name, &InStatus, &hyp0, 0,
628 &outFid, &OutFidStatus, &OutDirStatus, &Token, &tsync);
636 struct afsFetchStatus OutOldDirStatus, OutNewDirStatus;
637 struct afsFetchStatus OutOldFileStatus, OutNewFileStatus;
638 struct afsVolSync tsync;
639 struct afsFid OldDirFid, NewDirFid, OutOldFileFid, OutNewFileFid;
640 struct afsFidName OldName, NewName;
642 int ovnode, ounique, nvnode, nunique;
645 sscanf(&(*argp)[0], "%d", &ovnode);
647 sscanf(&(*argp)[0], "%d", &ounique);
649 memset(&OldDirFid, 0, sizeof(struct afsFid));
650 OldDirFid.Volume.low = 10; /* XXX */
651 OldDirFid.Vnode = ovnode;
652 OldDirFid.Unique = ounique;
655 memset(&OldName, 0, sizeof(struct afsFidName));
656 strcpy(OldName.name, oname);
657 sscanf(&(*argp)[0], "%d", &nvnode);
659 sscanf(&(*argp)[0], "%d", &nunique);
661 memset(&NewDirFid, 0, sizeof(struct afsFid));
662 NewDirFid.Volume.low = 10; /* XXX */
663 NewDirFid.Vnode = nvnode;
664 NewDirFid.Unique = nunique;
667 memset(&NewName, 0, sizeof(struct afsFidName));
668 strcpy(NewName.name, nname);
670 ubik_AFS_Rename(cstruct, 0, &OldDirFid, &OldName, &NewDirFid,
671 &NewName, &hyp0, 0, &OutOldDirStatus, &OutNewDirStatus,
672 &OutOldFileFid, &OutOldFileStatus, &OutNewFileFid,
673 &OutNewFileStatus, &tsync);
681 struct afsFetchStatus OutDirStatus, OutFidStatus;
682 struct afsStoreStatus InStatus;
683 struct afsVolSync tsync;
684 struct afsFid fid, outFid;
685 struct afsToken Token;
686 char *name, *linkcontents;
687 int vnode, unique, mode, owner, length;
690 sscanf(&(*argp)[0], "%d", &vnode);
692 sscanf(&(*argp)[0], "%d", &unique);
694 memset(&fid, 0, sizeof(struct afsFid));
695 fid.Volume.low = 10; /* XXX */
700 linkcontents = &argp[0][0];
702 memset(&InStatus, 0, sizeof(struct afsStoreStatus));
703 sscanf(&(*argp)[0], "%d", &mode);
705 sscanf(&(*argp)[0], "%d", &owner);
707 sscanf(&(*argp)[0], "%d", &length);
710 InStatus.mode = mode;
711 InStatus.mask |= AFS_SETMODE;
714 InStatus.owner = owner;
715 InStatus.mask |= AFS_SETOWNER;
718 InStatus.length = length;
719 InStatus.mask |= AFS_SETLENGTH;
722 ubik_AFS_Symlink(cstruct, 0, &fid, name, linkcontents,
723 &InStatus, &hyp0, 0, &outFid, &OutFidStatus, &OutDirStatus,
730 HardLink(char **argp)
732 struct afsFetchStatus OutDirStatus, OutFidStatus;
733 struct afsVolSync tsync;
734 struct afsFid fid, existingFid;
739 sscanf(&(*argp)[0], "%d", &vnode);
741 sscanf(&(*argp)[0], "%d", &unique);
743 memset(&fid, 0, sizeof(struct afsFid));
744 fid.Volume.low = 10; /* XXX */
749 sscanf(&(*argp)[0], "%d", &vnode);
751 sscanf(&(*argp)[0], "%d", &unique);
753 memset(&existingFid, 0, sizeof(struct afsFid));
754 existingFid.Volume.low = 10; /* XXX */
755 existingFid.Vnode = vnode;
756 existingFid.Unique = unique;
758 ubik_AFS_HardLink(cstruct, 0, &fid, name, &existingFid, &hyp0,
759 0, &OutFidStatus, &OutDirStatus, &tsync);
767 struct afsFetchStatus OutDirStatus, OutFidStatus;
768 struct afsStoreStatus InStatus;
769 struct afsVolSync tsync;
770 struct afsFid fid, outFid;
771 struct afsToken Token;
773 int vnode, unique, mode, owner, length;
776 sscanf(&(*argp)[0], "%d", &vnode);
778 sscanf(&(*argp)[0], "%d", &unique);
780 memset(&fid, 0, sizeof(struct afsFid));
781 fid.Volume.low = 10; /* XXX */
786 memset(&InStatus, 0, sizeof(struct afsStoreStatus));
787 sscanf(&(*argp)[0], "%d", &mode);
789 sscanf(&(*argp)[0], "%d", &owner);
791 sscanf(&(*argp)[0], "%d", &length);
794 InStatus.mode = mode;
795 InStatus.mask |= AFS_SETMODE;
798 InStatus.owner = owner;
799 InStatus.mask |= AFS_SETOWNER;
802 InStatus.length = length;
803 InStatus.mask |= AFS_SETLENGTH;
806 ubik_AFS_MakeDir(cstruct, 0, &fid, name, &InStatus, &hyp0, 0,
807 &outFid, &OutFidStatus, &OutDirStatus, &Token, &tsync);
813 RemoveDir(char **argp)
815 struct afsFetchStatus OutDirStatus;
816 struct afsVolSync tsync;
817 struct afsFid fid, outFid;
818 struct afsFidName nameFid;
823 sscanf(&(*argp)[0], "%d", &vnode);
825 sscanf(&(*argp)[0], "%d", &unique);
827 memset(&fid, 0, sizeof(struct afsFid));
828 fid.Volume.low = 10; /* XXX */
833 memset(&nameFid, 0, sizeof(struct afsFidName));
834 strcpy(nameFid.name, name);
836 ubik_AFS_RemoveDir(cstruct, 0, &fid, &nameFid, &hyp0, 0,
837 &OutDirStatus, &outFid, &tsync);
845 struct afsFetchStatus OutDirStatus;
846 struct afsVolSync tsync;
848 struct afsToken Token;
850 struct rx_call *tcall;
851 int vnode, unique, offset, length, NextOffset;
854 sscanf(&(*argp)[0], "%d", &vnode);
856 sscanf(&(*argp)[0], "%d", &unique);
858 sscanf(&(*argp)[0], "%d", &offset);
860 sscanf(&(*argp)[0], "%d", &length);
862 memset(&fid, 0, sizeof(struct afsFid));
863 fid.Volume.low = 10; /* XXX */
866 tcall = rx_NewCall(cstruct->conns[0]);
867 code = StartAFS_Readdir(tcall, &fid, offset, length, &hyp0, 0);
869 code = FetchDir(tcall);
873 EndAFS_FetchData(tcall, &NextOffset, &OutDirStatus, &Token,
876 code = rx_EndCall(tcall, code);
882 FetchDir(register struct rx_call *acall)
884 extern char *malloc();
885 register char *tbuffer;
886 afs_int32 tlen, length, code;
890 tbuffer = malloc(256);
892 code = rx_Read(acall, &length, sizeof(afs_int32));
893 length = ntohl(length);
894 if (code != sizeof(afs_int32))
898 tlen = (length > 8192 ? 8192 : length);
899 code = rx_Read(acall, tbuffer, tlen);
906 dp = (struct dirent *)dp;
915 struct afsFetchStatus OutDirStatus, OutFidStatus;
916 struct afsVolSync tsync;
917 struct afsFid fid, outFid;
922 sscanf(&(*argp)[0], "%d", &vnode);
924 sscanf(&(*argp)[0], "%d", &unique);
926 memset(&fid, 0, sizeof(struct afsFid));
927 fid.Volume.low = 10; /* XXX */
933 ubik_AFS_Lookup(cstruct, 0, &fid, name, &hyp0, 0, &outFid,
934 &OutFidStatus, &OutDirStatus, &tsync);
940 GetToken(char **argp)
942 struct afsFetchStatus OutStatus;
943 struct afsVolSync tsync;
944 struct afsToken MinToken, RealToken;
946 int vnode, unique, tokenId;
949 sscanf(&(*argp)[0], "%d", &vnode);
951 sscanf(&(*argp)[0], "%d", &unique);
953 memset(&fid, 0, sizeof(struct afsFid));
954 fid.Volume.low = 10; /* XXX */
957 sscanf(&(*argp)[0], "%d", &tokenId);
959 memset(&MinToken, 0, sizeof(struct afsToken));
960 MinToken.tokenID.low = tokenId; /* XXX */
962 ubik_AFS_GetToken(cstruct, 0, &fid, &MinToken, &hyp0, 0,
963 &RealToken, &OutStatus, &tsync);
969 MakeMountPoint(char **argp)
975 ReleaseTokens(char **argp)
981 BulkStatus(char **argp)
985 /* printf("ka <vol.l> <vnode> <unique> <isExec> <kaTime>\n"); */
987 KeepAlive(char **argp)
989 struct afsBulkFEX fex;
990 afs_uint32 numExec, spare4;
994 memset(&fx, 0, sizeof(struct afsFidExp));
995 sscanf(&(*argp)[0], "%d", &fx.fid.Volume.low);
997 sscanf(&(*argp)[0], "%d", &fx.fid.Vnode);
999 sscanf(&(*argp)[0], "%d", &fx.fid.Unique);
1001 sscanf(&(*argp)[0], "%d", &numExec);
1003 sscanf(&(*argp)[0], "%d", &fx.keepAliveTime);
1004 memset(&fex, 0, sizeof(struct afsBulkFEX));
1005 fex.afsBulkFEX_val = &fx;
1006 fex.afsBulkFEX_len = 1;
1008 ubik_AFS_BulkKeepAlive(cstruct, 0, &fex, numExec, 0, 0, 0,