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>
15 #include <afs/afsint.h>
16 #include <sys/socket.h>
17 #include <rx/rx_globals.h>
18 #include <netinet/in.h>
19 #include <arpa/inet.h>
24 struct ubik_client *cstruct;
25 struct rx_connection *serverconns[MAXSERVERS];
28 extern int AFS_FetchData(), AFS_StoreData(), AFS_StoreACL();
29 extern int RXAFS_GetTime(), AFS_GetStatistics(), AFS_FetchStatus(),
31 extern int AFS_StoreStatus(), AFS_RemoveFile(), AFS_CreateFile();
32 extern int AFS_Rename(), AFS_Symlink(), AFS_HardLink(), AFS_MakeDir(),
34 extern int AFS_Readdir(), AFS_MakeMountPoint(), AFS_ReleaseTokens(),
36 extern int AFS_BulkStatus(), AFS_Lookup();
37 extern int AFS_BulkStatus(), AFS_BulkLookup(), AFS_RenewAllTokens();
38 extern int AFS_BulkFetchVV(), AFS_BulkKeepAlive();
39 extern int AFS_Spare1(), AFS_Spare2(), AFS_Spare3(), AFS_Spare4(),
40 AFS_Spare5(), AFS_Spare6();
43 pxclient_Initialize(int auth, afs_int32 serverAddr)
47 struct rx_securityClass *sc;
49 code = rx_Init(htons(2115) /*0 */ );
51 fprintf(stderr, "pxclient_Initialize: Could not initialize rx.\n");
58 sc = rxnull_NewClientSecurityObject();
61 #ifdef notdef /* security */
63 sc = rxvab_NewClientSecurityObject(&ttoken.sessionKey, ttoken.ticket,
68 sc = rxkad_NewClientSecurityObject(rxkad_clear, &ttoken.sessionKey,
69 ttoken.kvno, ttoken.ticketLen,
74 rx_NewConnection(serverAddr, htons(7000), 1, sc, scIndex);
76 code = ubik_ClientInit(serverconns, &cstruct);
79 fprintf(stderr, "pxclient_Initialize: ubik client init failed.\n");
87 #include "AFS_component_version_number.c"
90 main(int argc, char **argv)
93 struct sockaddr_in host;
94 register afs_int32 code;
95 extern struct hostent *gethostbyname();
100 int noAuth = 1; /* Default is authenticated connections */
104 printf("usage: pxclient <serverHost>\n");
107 memset((char *)&host, 0, sizeof(struct sockaddr_in));
108 host.sin_family = AF_INET;
109 host.sin_addr.s_addr = inet_addr(av[0]);
110 #ifdef STRUCT_SOCKADDR_HAS_SA_LEN
111 host.sin_len = sizeof(struct sockaddr_in);
113 if (host.sin_addr.s_addr != -1) {
114 strcpy(hnamebuf, av[0]);
117 hp = gethostbyname(av[0]);
119 host.sin_family = hp->h_addrtype;
120 memcpy((caddr_t) & host.sin_addr, hp->h_addr, hp->h_length);
121 hostname = hp->h_name;
123 printf("unknown server host %s\n", av[0]);
127 if ((code = pxclient_Initialize(noAuth, host.sin_addr.s_addr)) != 0) {
128 printf("Couldn't initialize fs library (code=%d).\n", code);
132 code = ubik_Call(RXAFS_GetTime, cstruct, 0, &tv.tv_sec, &tv.tv_usec);
134 printf("AFS_GetTime on %s sec=%ld, usec=%ld\n", av[0], tv.tv_sec,
137 printf("return code is %d\n", code);
145 if (fgets(line, 499, stdin) != NULL) {
147 register char **argp = args;
148 GetArgs(line, argp, &nargs);
151 if (!strcmp(oper, "probe")) {
153 ubik_Call(RXAFS_GetTime, cstruct, 0, &tv.tv_sec,
155 printf("return code is %d\n", code);
157 printf("sec=%d\n", tv.tv_sec);
158 } else if (!strcmp(oper, "fsstats")) {
159 struct afsStatistics stats;
161 code = ubik_AFS_GetStatistics(cstruct, 0, &stats);
162 printf("return code is %d\n", code);
163 } else if (!strcmp(oper, "fd")) {
164 code = FetchData(argp);
165 printf("return code is %d\n", code);
166 } else if (!strcmp(oper, "fs")) {
167 code = FetchStatus(argp);
168 printf("return code is %d\n", code);
169 } else if (!strcmp(oper, "fa")) {
170 code = FetchACL(argp);
171 printf("return code is %d\n", code);
172 } else if (!strcmp(oper, "sd")) {
173 code = StoreData(argp);
174 printf("return code is %d\n", code);
175 } else if (!strcmp(oper, "ss")) {
176 code = StoreStatus(argp);
177 printf("return code is %d\n", code);
178 } else if (!strcmp(oper, "sa")) {
179 code = StoreACL(argp);
180 printf("return code is %d\n", code);
181 } else if (!strcmp(oper, "cf")) {
182 code = CreateFile(argp);
183 printf("return code is %d\n", code);
184 } else if (!strcmp(oper, "rf")) {
185 code = RemoveFile(argp);
186 printf("return code is %d\n", code);
187 } else if (!strcmp(oper, "rn")) {
189 printf("return code is %d\n", code);
190 } else if (!strcmp(oper, "sl")) {
191 code = Symlink(argp);
192 printf("return code is %d\n", code);
193 } else if (!strcmp(oper, "hl")) {
194 code = HardLink(argp);
195 printf("return code is %d\n", code);
196 } else if (!strcmp(oper, "md")) {
197 code = MakeDir(argp);
198 printf("return code is %d\n", code);
199 } else if (!strcmp(oper, "rd")) {
200 code = RemoveDir(argp);
201 printf("return code is %d\n", code);
202 } else if (!strcmp(oper, "rdd")) {
203 code = Readdir(argp);
204 printf("return code is %d\n", code);
205 } else if (!strcmp(oper, "mm")) {
206 code = MakeMountPoint(argp);
207 printf("return code is %d\n", code);
208 } else if (!strcmp(oper, "rt")) {
209 code = ReleaseTokens(argp);
210 printf("return code is %d\n", code);
211 } else if (!strcmp(oper, "bs")) {
212 code = BulkStatus(argp);
213 printf("return code is %d\n", code);
214 } else if (!strcmp(oper, "lk")) {
216 printf("return code is %d\n", code);
217 } else if (!strcmp(oper, "gt")) {
218 code = GetToken(argp);
219 printf("return code is %d\n", code);
220 } else if (!strcmp(oper, "ka")) {
221 code = KeepAlive(argp);
222 printf("return code is %d\n", code);
223 } else if ((!strcmp(oper, "q")) || !strcmp(oper, "quit"))
226 printf("Unknown oper! Available operations: \n\n");
227 printf("fd <vnode> <unique> <pos> <len>\n");
228 printf("fs <vnode> <unique>\n");
229 printf("fa <vnode> <unique>\n");
231 ("sd <vnode> <unique> <pos> <len> <flen> [<mode>|-1] [<owner>|-1] [<length>|-1] <string>\n");
233 ("ss <vnode> <unique> [<mode>|-1] [<owner>|-1] [<length>|-1]\n");
234 printf("sa <vnode> <unique> <string>\n");
235 printf("rf <vnode> <unique> <name>\n");
237 ("cf <vnode> <unique> <name> [<mode>|-1] [<owner>|-1] [<length>|-1]\n");
239 ("rn <ovnode> <ounique> <oname> <nvnode> <nunique> <nname>\n");
241 ("sl <vnode> <unique> <name> <contents> [<mode>|-1] [<owner>|-1] [<length>|-1]\n");
242 printf("hl <dvnode> <dunique> <name> <evnode> <eunique>\n");
244 ("md <vnode> <unique> <name> [<mode>|-1] [<owner>|-1] [<length>|-1]\n");
245 printf("rd <vnode> <unique> <name>\n");
246 printf("rdd <vnode> <unique> <pos> <len>\n");
247 printf("lk <vnode> <unique> <name>\n");
248 printf("gt <vnode> <unique> <tokenID>\n");
249 printf("ka <vol.l> <vnode> <unique> <isExec> <kaTime>\n");
259 GetArgs(register char *line, register char **args, register int *nargs)
263 register char *last = line;
270 *args++ = line, (*nargs)++;
271 while (*line && *line != ' ')
278 FetchData(char **argp)
280 struct afsFetchStatus OutStatus;
281 struct afsToken Token;
282 struct afsVolSync tsync;
284 int vnode, unique, position, length;
286 struct rx_call *tcall;
288 sscanf(&(*argp)[0], "%d", &vnode);
290 sscanf(&(*argp)[0], "%d", &unique);
292 memset(&fid, 0, sizeof(struct afsFid));
293 fid.Volume.low = 10; /* XXX */
296 sscanf(&(*argp)[0], "%d", &position);
298 sscanf(&(*argp)[0], "%d", &length);
300 tcall = rx_NewCall(cstruct->conns[0]);
301 code = StartAFS_FetchData(tcall, &fid, &hyp0, position, length, 0);
303 code = FetchProc(tcall);
306 code = EndAFS_FetchData(tcall, &OutStatus, &Token, &tsync);
308 code = rx_EndCall(tcall, code);
314 FetchProc(register struct rx_call *acall)
316 extern char *malloc();
317 register char *tbuffer;
318 afs_int32 tlen, length, code;
320 code = rx_Read(acall, &length, sizeof(afs_int32));
321 length = ntohl(length);
322 if (code != sizeof(afs_int32))
324 tbuffer = malloc(256);
326 tlen = (length > 256 ? 256 : length);
327 code = rx_Read(acall, tbuffer, tlen);
340 FetchStatus(char **argp)
342 struct afsFetchStatus OutStatus;
343 struct afsToken Token;
344 struct afsVolSync tsync;
349 sscanf(&(*argp)[0], "%d", &vnode);
351 sscanf(&(*argp)[0], "%d", &unique);
353 memset(&fid, 0, sizeof(struct afsFid));
354 fid.Volume.low = 10; /* XXX */
358 ubik_AFS_FetchStatus(cstruct, 0, &fid, &hyp0, 0, &OutStatus,
365 FetchACL(char **argp)
367 struct afsFetchStatus OutStatus;
368 struct afsACL AccessList;
369 struct afsToken Token;
370 struct afsVolSync tsync;
375 sscanf(&(*argp)[0], "%d", &vnode);
377 sscanf(&(*argp)[0], "%d", &unique);
379 memset(&fid, 0, sizeof(struct afsFid));
380 fid.Volume.low = 10; /* XXX */
384 ubik_AFS_FetchACL(cstruct, 0, &fid, &hyp0, 0, &AccessList,
391 StoreData(char **argp)
393 struct afsStoreStatus InStatus;
394 struct afsFetchStatus OutStatus;
395 struct afsVolSync tsync;
397 int vnode, unique, position, length, filelength;
398 int mode, owner, len;
401 struct rx_call *tcall;
403 sscanf(&(*argp)[0], "%d", &vnode);
405 sscanf(&(*argp)[0], "%d", &unique);
407 memset(&fid, 0, sizeof(struct afsFid));
408 fid.Volume.low = 10; /* XXX */
411 sscanf(&(*argp)[0], "%d", &position);
413 sscanf(&(*argp)[0], "%d", &length);
415 sscanf(&(*argp)[0], "%d", &filelength);
417 memset(&InStatus, 0, sizeof(struct afsStoreStatus));
418 sscanf(&(*argp)[0], "%d", &mode);
420 sscanf(&(*argp)[0], "%d", &owner);
422 sscanf(&(*argp)[0], "%d", &len);
425 InStatus.mode = mode;
426 InStatus.mask |= AFS_SETMODE;
429 InStatus.owner = owner;
430 InStatus.mask |= AFS_SETOWNER;
433 InStatus.length = length;
434 InStatus.mask |= AFS_SETLENGTH;
436 string = &argp[0][0];
439 tcall = rx_NewCall(cstruct->conns[0]);
441 StartAFS_StoreData(tcall, &fid, &InStatus, position, length,
442 filelength, &hyp0, 0);
444 code = StoreProc(tcall, string, length);
447 code = EndAFS_StoreData(tcall, &OutStatus, &tsync);
449 code = rx_EndCall(tcall, code);
455 StoreProc(register struct rx_call *acall, char *string, int length)
457 afs_int32 tlen, code;
460 tlen = (length > 256 ? 256 : length);
461 code = rx_Write(acall, string, tlen);
472 StoreStatus(char **argp)
474 struct afsStoreStatus InStatus;
475 struct afsFetchStatus OutStatus;
476 struct afsVolSync tsync;
478 int vnode, unique, mode, owner, length;
481 sscanf(&(*argp)[0], "%d", &vnode);
483 sscanf(&(*argp)[0], "%d", &unique);
485 memset(&fid, 0, sizeof(struct afsFid));
486 fid.Volume.low = 10; /* XXX */
489 memset(&InStatus, 0, sizeof(struct afsStoreStatus));
490 sscanf(&(*argp)[0], "%d", &mode);
492 sscanf(&(*argp)[0], "%d", &owner);
494 sscanf(&(*argp)[0], "%d", &length);
497 InStatus.mode = mode;
498 InStatus.mask |= AFS_SETMODE;
501 InStatus.owner = owner;
502 InStatus.mask |= AFS_SETOWNER;
505 InStatus.length = length;
506 InStatus.mask |= AFS_SETLENGTH;
509 ubik_AFS_StoreStatus(cstruct, 0, &fid, &InStatus, &hyp0, 0,
516 StoreACL(char **argp)
518 struct afsFetchStatus OutStatus;
519 struct afsACL AccessList;
520 struct afsToken Token;
521 struct afsVolSync tsync;
527 sscanf(&(*argp)[0], "%d", &vnode);
529 sscanf(&(*argp)[0], "%d", &unique);
531 memset(&fid, 0, sizeof(struct afsFid));
532 fid.Volume.low = 10; /* XXX */
535 string = &argp[0][0];
537 AccessList.afsACL_len = strlen(string) + 1;
538 AccessList.afsACL_val = string;
540 ubik_AFS_StoreACL(cstruct, 0, &fid, &AccessList, &hyp0, 0,
547 RemoveFile(char **argp)
549 struct afsFetchStatus OutDirStatus, OutFidStatus;
550 struct afsVolSync tsync;
551 struct afsFidName nameFid;
552 struct afsFid fid, outFid;
557 sscanf(&(*argp)[0], "%d", &vnode);
559 sscanf(&(*argp)[0], "%d", &unique);
561 memset(&fid, 0, sizeof(struct afsFid));
562 fid.Volume.low = 10; /* XXX */
567 memset(&nameFid, 0, sizeof(struct afsFidName));
568 strcpy(nameFid.name, name);
570 ubik_AFS_RemoveFile(cstruct, 0, &fid, &nameFid, &hyp0, 0,
571 &OutDirStatus, &OutFidStatus, &outFid, &tsync);
577 CreateFile(char **argp)
579 struct afsFetchStatus OutDirStatus, OutFidStatus;
580 struct afsStoreStatus InStatus;
581 struct afsVolSync tsync;
582 struct afsFid fid, outFid;
583 struct afsToken Token;
585 int vnode, unique, mode, owner, length;
588 sscanf(&(*argp)[0], "%d", &vnode);
590 sscanf(&(*argp)[0], "%d", &unique);
592 memset(&fid, 0, sizeof(struct afsFid));
593 fid.Volume.low = 10; /* XXX */
598 memset(&InStatus, 0, sizeof(struct afsStoreStatus));
599 sscanf(&(*argp)[0], "%d", &mode);
601 sscanf(&(*argp)[0], "%d", &owner);
603 sscanf(&(*argp)[0], "%d", &length);
606 InStatus.mode = mode;
607 InStatus.mask |= AFS_SETMODE;
610 InStatus.owner = owner;
611 InStatus.mask |= AFS_SETOWNER;
614 InStatus.length = length;
615 InStatus.mask |= AFS_SETLENGTH;
618 ubik_AFS_CreateFile(cstruct, 0, &fid, name, &InStatus, &hyp0, 0,
619 &outFid, &OutFidStatus, &OutDirStatus, &Token, &tsync);
627 struct afsFetchStatus OutOldDirStatus, OutNewDirStatus;
628 struct afsFetchStatus OutOldFileStatus, OutNewFileStatus;
629 struct afsVolSync tsync;
630 struct afsFid OldDirFid, NewDirFid, OutOldFileFid, OutNewFileFid;
631 struct afsFidName OldName, NewName;
633 int ovnode, ounique, nvnode, nunique;
636 sscanf(&(*argp)[0], "%d", &ovnode);
638 sscanf(&(*argp)[0], "%d", &ounique);
640 memset(&OldDirFid, 0, sizeof(struct afsFid));
641 OldDirFid.Volume.low = 10; /* XXX */
642 OldDirFid.Vnode = ovnode;
643 OldDirFid.Unique = ounique;
646 memset(&OldName, 0, sizeof(struct afsFidName));
647 strcpy(OldName.name, oname);
648 sscanf(&(*argp)[0], "%d", &nvnode);
650 sscanf(&(*argp)[0], "%d", &nunique);
652 memset(&NewDirFid, 0, sizeof(struct afsFid));
653 NewDirFid.Volume.low = 10; /* XXX */
654 NewDirFid.Vnode = nvnode;
655 NewDirFid.Unique = nunique;
658 memset(&NewName, 0, sizeof(struct afsFidName));
659 strcpy(NewName.name, nname);
661 ubik_AFS_Rename(cstruct, 0, &OldDirFid, &OldName, &NewDirFid,
662 &NewName, &hyp0, 0, &OutOldDirStatus, &OutNewDirStatus,
663 &OutOldFileFid, &OutOldFileStatus, &OutNewFileFid,
664 &OutNewFileStatus, &tsync);
672 struct afsFetchStatus OutDirStatus, OutFidStatus;
673 struct afsStoreStatus InStatus;
674 struct afsVolSync tsync;
675 struct afsFid fid, outFid;
676 struct afsToken Token;
677 char *name, *linkcontents;
678 int vnode, unique, mode, owner, length;
681 sscanf(&(*argp)[0], "%d", &vnode);
683 sscanf(&(*argp)[0], "%d", &unique);
685 memset(&fid, 0, sizeof(struct afsFid));
686 fid.Volume.low = 10; /* XXX */
691 linkcontents = &argp[0][0];
693 memset(&InStatus, 0, sizeof(struct afsStoreStatus));
694 sscanf(&(*argp)[0], "%d", &mode);
696 sscanf(&(*argp)[0], "%d", &owner);
698 sscanf(&(*argp)[0], "%d", &length);
701 InStatus.mode = mode;
702 InStatus.mask |= AFS_SETMODE;
705 InStatus.owner = owner;
706 InStatus.mask |= AFS_SETOWNER;
709 InStatus.length = length;
710 InStatus.mask |= AFS_SETLENGTH;
713 ubik_AFS_Symlink(cstruct, 0, &fid, name, linkcontents,
714 &InStatus, &hyp0, 0, &outFid, &OutFidStatus, &OutDirStatus,
721 HardLink(char **argp)
723 struct afsFetchStatus OutDirStatus, OutFidStatus;
724 struct afsVolSync tsync;
725 struct afsFid fid, existingFid;
730 sscanf(&(*argp)[0], "%d", &vnode);
732 sscanf(&(*argp)[0], "%d", &unique);
734 memset(&fid, 0, sizeof(struct afsFid));
735 fid.Volume.low = 10; /* XXX */
740 sscanf(&(*argp)[0], "%d", &vnode);
742 sscanf(&(*argp)[0], "%d", &unique);
744 memset(&existingFid, 0, sizeof(struct afsFid));
745 existingFid.Volume.low = 10; /* XXX */
746 existingFid.Vnode = vnode;
747 existingFid.Unique = unique;
749 ubik_AFS_HardLink(cstruct, 0, &fid, name, &existingFid, &hyp0,
750 0, &OutFidStatus, &OutDirStatus, &tsync);
758 struct afsFetchStatus OutDirStatus, OutFidStatus;
759 struct afsStoreStatus InStatus;
760 struct afsVolSync tsync;
761 struct afsFid fid, outFid;
762 struct afsToken Token;
764 int vnode, unique, mode, owner, length;
767 sscanf(&(*argp)[0], "%d", &vnode);
769 sscanf(&(*argp)[0], "%d", &unique);
771 memset(&fid, 0, sizeof(struct afsFid));
772 fid.Volume.low = 10; /* XXX */
777 memset(&InStatus, 0, sizeof(struct afsStoreStatus));
778 sscanf(&(*argp)[0], "%d", &mode);
780 sscanf(&(*argp)[0], "%d", &owner);
782 sscanf(&(*argp)[0], "%d", &length);
785 InStatus.mode = mode;
786 InStatus.mask |= AFS_SETMODE;
789 InStatus.owner = owner;
790 InStatus.mask |= AFS_SETOWNER;
793 InStatus.length = length;
794 InStatus.mask |= AFS_SETLENGTH;
797 ubik_AFS_MakeDir(cstruct, 0, &fid, name, &InStatus, &hyp0, 0,
798 &outFid, &OutFidStatus, &OutDirStatus, &Token, &tsync);
804 RemoveDir(char **argp)
806 struct afsFetchStatus OutDirStatus;
807 struct afsVolSync tsync;
808 struct afsFid fid, outFid;
809 struct afsFidName nameFid;
814 sscanf(&(*argp)[0], "%d", &vnode);
816 sscanf(&(*argp)[0], "%d", &unique);
818 memset(&fid, 0, sizeof(struct afsFid));
819 fid.Volume.low = 10; /* XXX */
824 memset(&nameFid, 0, sizeof(struct afsFidName));
825 strcpy(nameFid.name, name);
827 ubik_AFS_RemoveDir(cstruct, 0, &fid, &nameFid, &hyp0, 0,
828 &OutDirStatus, &outFid, &tsync);
836 struct afsFetchStatus OutDirStatus;
837 struct afsVolSync tsync;
839 struct afsToken Token;
841 struct rx_call *tcall;
842 int vnode, unique, offset, length, NextOffset;
845 sscanf(&(*argp)[0], "%d", &vnode);
847 sscanf(&(*argp)[0], "%d", &unique);
849 sscanf(&(*argp)[0], "%d", &offset);
851 sscanf(&(*argp)[0], "%d", &length);
853 memset(&fid, 0, sizeof(struct afsFid));
854 fid.Volume.low = 10; /* XXX */
857 tcall = rx_NewCall(cstruct->conns[0]);
858 code = StartAFS_Readdir(tcall, &fid, offset, length, &hyp0, 0);
860 code = FetchDir(tcall);
864 EndAFS_FetchData(tcall, &NextOffset, &OutDirStatus, &Token,
867 code = rx_EndCall(tcall, code);
873 FetchDir(register struct rx_call *acall)
875 extern char *malloc();
876 register char *tbuffer;
877 afs_int32 tlen, length, code;
881 tbuffer = malloc(256);
883 code = rx_Read(acall, &length, sizeof(afs_int32));
884 length = ntohl(length);
885 if (code != sizeof(afs_int32))
889 tlen = (length > 8192 ? 8192 : length);
890 code = rx_Read(acall, tbuffer, tlen);
897 dp = (struct dirent *)dp;
906 struct afsFetchStatus OutDirStatus, OutFidStatus;
907 struct afsVolSync tsync;
908 struct afsFid fid, outFid;
913 sscanf(&(*argp)[0], "%d", &vnode);
915 sscanf(&(*argp)[0], "%d", &unique);
917 memset(&fid, 0, sizeof(struct afsFid));
918 fid.Volume.low = 10; /* XXX */
924 ubik_AFS_Lookup(cstruct, 0, &fid, name, &hyp0, 0, &outFid,
925 &OutFidStatus, &OutDirStatus, &tsync);
931 GetToken(char **argp)
933 struct afsFetchStatus OutStatus;
934 struct afsVolSync tsync;
935 struct afsToken MinToken, RealToken;
937 int vnode, unique, tokenId;
940 sscanf(&(*argp)[0], "%d", &vnode);
942 sscanf(&(*argp)[0], "%d", &unique);
944 memset(&fid, 0, sizeof(struct afsFid));
945 fid.Volume.low = 10; /* XXX */
948 sscanf(&(*argp)[0], "%d", &tokenId);
950 memset(&MinToken, 0, sizeof(struct afsToken));
951 MinToken.tokenID.low = tokenId; /* XXX */
953 ubik_AFS_GetToken(cstruct, 0, &fid, &MinToken, &hyp0, 0,
954 &RealToken, &OutStatus, &tsync);
960 MakeMountPoint(char **argp)
966 ReleaseTokens(char **argp)
972 BulkStatus(char **argp)
976 /* printf("ka <vol.l> <vnode> <unique> <isExec> <kaTime>\n"); */
978 KeepAlive(char **argp)
980 struct afsBulkFEX fex;
981 afs_uint32 numExec, spare4;
985 memset(&fx, 0, sizeof(struct afsFidExp));
986 sscanf(&(*argp)[0], "%d", &fx.fid.Volume.low);
988 sscanf(&(*argp)[0], "%d", &fx.fid.Vnode);
990 sscanf(&(*argp)[0], "%d", &fx.fid.Unique);
992 sscanf(&(*argp)[0], "%d", &numExec);
994 sscanf(&(*argp)[0], "%d", &fx.keepAliveTime);
995 memset(&fex, 0, sizeof(struct afsBulkFEX));
996 fex.afsBulkFEX_val = &fx;
997 fex.afsBulkFEX_len = 1;
999 ubik_AFS_BulkKeepAlive(cstruct, 0, &fex, numExec, 0, 0, 0,