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>
26 struct ubik_client *cstruct;
27 struct rx_connection *serverconns[MAXSERVERS];
30 extern int AFS_FetchData(), AFS_StoreData(), AFS_StoreACL();
31 extern int RXAFS_GetTime(), AFS_GetStatistics(), AFS_FetchStatus(),
33 extern int AFS_StoreStatus(), AFS_RemoveFile(), AFS_CreateFile();
34 extern int AFS_Rename(), AFS_Symlink(), AFS_HardLink(), AFS_MakeDir(),
36 extern int AFS_Readdir(), AFS_MakeMountPoint(), AFS_ReleaseTokens(),
38 extern int AFS_BulkStatus(), AFS_Lookup();
39 extern int AFS_BulkStatus(), AFS_BulkLookup(), AFS_RenewAllTokens();
40 extern int AFS_BulkFetchVV(), AFS_BulkKeepAlive();
41 extern int AFS_Spare1(), AFS_Spare2(), AFS_Spare3(), AFS_Spare4(),
42 AFS_Spare5(), AFS_Spare6();
45 pxclient_Initialize(int auth, afs_int32 serverAddr)
49 struct rx_securityClass *sc;
51 code = rx_Init(htons(2115) /*0 */ );
53 fprintf(stderr, "pxclient_Initialize: Could not initialize rx.\n");
60 sc = rxnull_NewClientSecurityObject();
63 #ifdef notdef /* security */
65 sc = rxvab_NewClientSecurityObject(&ttoken.sessionKey, ttoken.ticket,
70 sc = rxkad_NewClientSecurityObject(rxkad_clear, &ttoken.sessionKey,
71 ttoken.kvno, ttoken.ticketLen,
76 rx_NewConnection(serverAddr, htons(7000), 1, sc, scIndex);
78 code = ubik_ClientInit(serverconns, &cstruct);
81 fprintf(stderr, "pxclient_Initialize: ubik client init failed.\n");
89 #include "AFS_component_version_number.c"
92 main(int argc, char **argv)
95 struct sockaddr_in host;
96 register afs_int32 code;
97 extern struct hostent *gethostbyname();
102 int noAuth = 1; /* Default is authenticated connections */
106 printf("usage: pxclient <serverHost>\n");
109 memset((char *)&host, 0, sizeof(struct sockaddr_in));
110 host.sin_family = AF_INET;
111 host.sin_addr.s_addr = inet_addr(av[0]);
112 #ifdef STRUCT_SOCKADDR_HAS_SA_LEN
113 host.sin_len = sizeof(struct sockaddr_in);
115 if (host.sin_addr.s_addr != -1) {
116 strcpy(hnamebuf, av[0]);
119 hp = gethostbyname(av[0]);
121 host.sin_family = hp->h_addrtype;
122 memcpy((caddr_t) & host.sin_addr, hp->h_addr, hp->h_length);
123 hostname = hp->h_name;
125 printf("unknown server host %s\n", av[0]);
129 if ((code = pxclient_Initialize(noAuth, host.sin_addr.s_addr)) != 0) {
130 printf("Couldn't initialize fs library (code=%d).\n", code);
134 code = ubik_Call(RXAFS_GetTime, cstruct, 0, &tv.tv_sec, &tv.tv_usec);
136 printf("AFS_GetTime on %s sec=%ld, usec=%ld\n", av[0], tv.tv_sec,
139 printf("return code is %d\n", code);
147 if (fgets(line, 499, stdin) != NULL) {
149 register char **argp = args;
150 GetArgs(line, argp, &nargs);
153 if (!strcmp(oper, "probe")) {
155 ubik_Call(RXAFS_GetTime, cstruct, 0, &tv.tv_sec,
157 printf("return code is %d\n", code);
159 printf("sec=%d\n", tv.tv_sec);
160 } else if (!strcmp(oper, "fsstats")) {
161 struct afsStatistics stats;
163 code = ubik_AFS_GetStatistics(cstruct, 0, &stats);
164 printf("return code is %d\n", code);
165 } else if (!strcmp(oper, "fd")) {
166 code = FetchData(argp);
167 printf("return code is %d\n", code);
168 } else if (!strcmp(oper, "fs")) {
169 code = FetchStatus(argp);
170 printf("return code is %d\n", code);
171 } else if (!strcmp(oper, "fa")) {
172 code = FetchACL(argp);
173 printf("return code is %d\n", code);
174 } else if (!strcmp(oper, "sd")) {
175 code = StoreData(argp);
176 printf("return code is %d\n", code);
177 } else if (!strcmp(oper, "ss")) {
178 code = StoreStatus(argp);
179 printf("return code is %d\n", code);
180 } else if (!strcmp(oper, "sa")) {
181 code = StoreACL(argp);
182 printf("return code is %d\n", code);
183 } else if (!strcmp(oper, "cf")) {
184 code = CreateFile(argp);
185 printf("return code is %d\n", code);
186 } else if (!strcmp(oper, "rf")) {
187 code = RemoveFile(argp);
188 printf("return code is %d\n", code);
189 } else if (!strcmp(oper, "rn")) {
191 printf("return code is %d\n", code);
192 } else if (!strcmp(oper, "sl")) {
193 code = Symlink(argp);
194 printf("return code is %d\n", code);
195 } else if (!strcmp(oper, "hl")) {
196 code = HardLink(argp);
197 printf("return code is %d\n", code);
198 } else if (!strcmp(oper, "md")) {
199 code = MakeDir(argp);
200 printf("return code is %d\n", code);
201 } else if (!strcmp(oper, "rd")) {
202 code = RemoveDir(argp);
203 printf("return code is %d\n", code);
204 } else if (!strcmp(oper, "rdd")) {
205 code = Readdir(argp);
206 printf("return code is %d\n", code);
207 } else if (!strcmp(oper, "mm")) {
208 code = MakeMountPoint(argp);
209 printf("return code is %d\n", code);
210 } else if (!strcmp(oper, "rt")) {
211 code = ReleaseTokens(argp);
212 printf("return code is %d\n", code);
213 } else if (!strcmp(oper, "bs")) {
214 code = BulkStatus(argp);
215 printf("return code is %d\n", code);
216 } else if (!strcmp(oper, "lk")) {
218 printf("return code is %d\n", code);
219 } else if (!strcmp(oper, "gt")) {
220 code = GetToken(argp);
221 printf("return code is %d\n", code);
222 } else if (!strcmp(oper, "ka")) {
223 code = KeepAlive(argp);
224 printf("return code is %d\n", code);
225 } else if ((!strcmp(oper, "q")) || !strcmp(oper, "quit"))
228 printf("Unknown oper! Available operations: \n\n");
229 printf("fd <vnode> <unique> <pos> <len>\n");
230 printf("fs <vnode> <unique>\n");
231 printf("fa <vnode> <unique>\n");
233 ("sd <vnode> <unique> <pos> <len> <flen> [<mode>|-1] [<owner>|-1] [<length>|-1] <string>\n");
235 ("ss <vnode> <unique> [<mode>|-1] [<owner>|-1] [<length>|-1]\n");
236 printf("sa <vnode> <unique> <string>\n");
237 printf("rf <vnode> <unique> <name>\n");
239 ("cf <vnode> <unique> <name> [<mode>|-1] [<owner>|-1] [<length>|-1]\n");
241 ("rn <ovnode> <ounique> <oname> <nvnode> <nunique> <nname>\n");
243 ("sl <vnode> <unique> <name> <contents> [<mode>|-1] [<owner>|-1] [<length>|-1]\n");
244 printf("hl <dvnode> <dunique> <name> <evnode> <eunique>\n");
246 ("md <vnode> <unique> <name> [<mode>|-1] [<owner>|-1] [<length>|-1]\n");
247 printf("rd <vnode> <unique> <name>\n");
248 printf("rdd <vnode> <unique> <pos> <len>\n");
249 printf("lk <vnode> <unique> <name>\n");
250 printf("gt <vnode> <unique> <tokenID>\n");
251 printf("ka <vol.l> <vnode> <unique> <isExec> <kaTime>\n");
260 GetArgs(register char *line, register char **args, register int *nargs)
264 register char *last = line;
271 *args++ = line, (*nargs)++;
272 while (*line && *line != ' ')
279 FetchData(char **argp)
281 struct afsFetchStatus OutStatus;
282 struct afsToken Token;
283 struct afsVolSync tsync;
285 int vnode, unique, position, length;
287 struct rx_call *tcall;
289 sscanf(&(*argp)[0], "%d", &vnode);
291 sscanf(&(*argp)[0], "%d", &unique);
293 memset(&fid, 0, sizeof(struct afsFid));
294 fid.Volume.low = 10; /* XXX */
297 sscanf(&(*argp)[0], "%d", &position);
299 sscanf(&(*argp)[0], "%d", &length);
301 tcall = rx_NewCall(cstruct->conns[0]);
302 code = StartAFS_FetchData(tcall, &fid, &hyp0, position, length, 0);
304 code = FetchProc(tcall);
307 code = EndAFS_FetchData(tcall, &OutStatus, &Token, &tsync);
309 code = rx_EndCall(tcall, code);
315 FetchProc(register struct rx_call *acall)
317 extern char *malloc();
318 register char *tbuffer;
319 afs_int32 tlen, length, code;
321 code = rx_Read(acall, &length, sizeof(afs_int32));
322 length = ntohl(length);
323 if (code != sizeof(afs_int32))
325 tbuffer = malloc(256);
327 tlen = (length > 256 ? 256 : length);
328 code = rx_Read(acall, tbuffer, tlen);
341 FetchStatus(char **argp)
343 struct afsFetchStatus OutStatus;
344 struct afsToken Token;
345 struct afsVolSync tsync;
350 sscanf(&(*argp)[0], "%d", &vnode);
352 sscanf(&(*argp)[0], "%d", &unique);
354 memset(&fid, 0, sizeof(struct afsFid));
355 fid.Volume.low = 10; /* XXX */
359 ubik_AFS_FetchStatus(cstruct, 0, &fid, &hyp0, 0, &OutStatus,
366 FetchACL(char **argp)
368 struct afsFetchStatus OutStatus;
369 struct afsACL AccessList;
370 struct afsToken Token;
371 struct afsVolSync tsync;
376 sscanf(&(*argp)[0], "%d", &vnode);
378 sscanf(&(*argp)[0], "%d", &unique);
380 memset(&fid, 0, sizeof(struct afsFid));
381 fid.Volume.low = 10; /* XXX */
385 ubik_AFS_FetchACL(cstruct, 0, &fid, &hyp0, 0, &AccessList,
392 StoreData(char **argp)
394 struct afsStoreStatus InStatus;
395 struct afsFetchStatus OutStatus;
396 struct afsVolSync tsync;
398 int vnode, unique, position, length, filelength;
399 int mode, owner, len;
402 struct rx_call *tcall;
404 sscanf(&(*argp)[0], "%d", &vnode);
406 sscanf(&(*argp)[0], "%d", &unique);
408 memset(&fid, 0, sizeof(struct afsFid));
409 fid.Volume.low = 10; /* XXX */
412 sscanf(&(*argp)[0], "%d", &position);
414 sscanf(&(*argp)[0], "%d", &length);
416 sscanf(&(*argp)[0], "%d", &filelength);
418 memset(&InStatus, 0, sizeof(struct afsStoreStatus));
419 sscanf(&(*argp)[0], "%d", &mode);
421 sscanf(&(*argp)[0], "%d", &owner);
423 sscanf(&(*argp)[0], "%d", &len);
426 InStatus.mode = mode;
427 InStatus.mask |= AFS_SETMODE;
430 InStatus.owner = owner;
431 InStatus.mask |= AFS_SETOWNER;
434 InStatus.length = length;
435 InStatus.mask |= AFS_SETLENGTH;
437 string = &argp[0][0];
440 tcall = rx_NewCall(cstruct->conns[0]);
442 StartAFS_StoreData(tcall, &fid, &InStatus, position, length,
443 filelength, &hyp0, 0);
445 code = StoreProc(tcall, string, length);
448 code = EndAFS_StoreData(tcall, &OutStatus, &tsync);
450 code = rx_EndCall(tcall, code);
456 StoreProc(register struct rx_call *acall, char *string, int length)
458 afs_int32 tlen, code;
461 tlen = (length > 256 ? 256 : length);
462 code = rx_Write(acall, string, tlen);
473 StoreStatus(char **argp)
475 struct afsStoreStatus InStatus;
476 struct afsFetchStatus OutStatus;
477 struct afsVolSync tsync;
479 int vnode, unique, mode, owner, length;
482 sscanf(&(*argp)[0], "%d", &vnode);
484 sscanf(&(*argp)[0], "%d", &unique);
486 memset(&fid, 0, sizeof(struct afsFid));
487 fid.Volume.low = 10; /* XXX */
490 memset(&InStatus, 0, sizeof(struct afsStoreStatus));
491 sscanf(&(*argp)[0], "%d", &mode);
493 sscanf(&(*argp)[0], "%d", &owner);
495 sscanf(&(*argp)[0], "%d", &length);
498 InStatus.mode = mode;
499 InStatus.mask |= AFS_SETMODE;
502 InStatus.owner = owner;
503 InStatus.mask |= AFS_SETOWNER;
506 InStatus.length = length;
507 InStatus.mask |= AFS_SETLENGTH;
510 ubik_AFS_StoreStatus(cstruct, 0, &fid, &InStatus, &hyp0, 0,
517 StoreACL(char **argp)
519 struct afsFetchStatus OutStatus;
520 struct afsACL AccessList;
521 struct afsToken Token;
522 struct afsVolSync tsync;
528 sscanf(&(*argp)[0], "%d", &vnode);
530 sscanf(&(*argp)[0], "%d", &unique);
532 memset(&fid, 0, sizeof(struct afsFid));
533 fid.Volume.low = 10; /* XXX */
536 string = &argp[0][0];
538 AccessList.afsACL_len = strlen(string) + 1;
539 AccessList.afsACL_val = string;
541 ubik_AFS_StoreACL(cstruct, 0, &fid, &AccessList, &hyp0, 0,
548 RemoveFile(char **argp)
550 struct afsFetchStatus OutDirStatus, OutFidStatus;
551 struct afsVolSync tsync;
552 struct afsFidName nameFid;
553 struct afsFid fid, outFid;
558 sscanf(&(*argp)[0], "%d", &vnode);
560 sscanf(&(*argp)[0], "%d", &unique);
562 memset(&fid, 0, sizeof(struct afsFid));
563 fid.Volume.low = 10; /* XXX */
568 memset(&nameFid, 0, sizeof(struct afsFidName));
569 strcpy(nameFid.name, name);
571 ubik_AFS_RemoveFile(cstruct, 0, &fid, &nameFid, &hyp0, 0,
572 &OutDirStatus, &OutFidStatus, &outFid, &tsync);
578 CreateFile(char **argp)
580 struct afsFetchStatus OutDirStatus, OutFidStatus;
581 struct afsStoreStatus InStatus;
582 struct afsVolSync tsync;
583 struct afsFid fid, outFid;
584 struct afsToken Token;
586 int vnode, unique, mode, owner, length;
589 sscanf(&(*argp)[0], "%d", &vnode);
591 sscanf(&(*argp)[0], "%d", &unique);
593 memset(&fid, 0, sizeof(struct afsFid));
594 fid.Volume.low = 10; /* XXX */
599 memset(&InStatus, 0, sizeof(struct afsStoreStatus));
600 sscanf(&(*argp)[0], "%d", &mode);
602 sscanf(&(*argp)[0], "%d", &owner);
604 sscanf(&(*argp)[0], "%d", &length);
607 InStatus.mode = mode;
608 InStatus.mask |= AFS_SETMODE;
611 InStatus.owner = owner;
612 InStatus.mask |= AFS_SETOWNER;
615 InStatus.length = length;
616 InStatus.mask |= AFS_SETLENGTH;
619 ubik_AFS_CreateFile(cstruct, 0, &fid, name, &InStatus, &hyp0, 0,
620 &outFid, &OutFidStatus, &OutDirStatus, &Token, &tsync);
628 struct afsFetchStatus OutOldDirStatus, OutNewDirStatus;
629 struct afsFetchStatus OutOldFileStatus, OutNewFileStatus;
630 struct afsVolSync tsync;
631 struct afsFid OldDirFid, NewDirFid, OutOldFileFid, OutNewFileFid;
632 struct afsFidName OldName, NewName;
634 int ovnode, ounique, nvnode, nunique;
637 sscanf(&(*argp)[0], "%d", &ovnode);
639 sscanf(&(*argp)[0], "%d", &ounique);
641 memset(&OldDirFid, 0, sizeof(struct afsFid));
642 OldDirFid.Volume.low = 10; /* XXX */
643 OldDirFid.Vnode = ovnode;
644 OldDirFid.Unique = ounique;
647 memset(&OldName, 0, sizeof(struct afsFidName));
648 strcpy(OldName.name, oname);
649 sscanf(&(*argp)[0], "%d", &nvnode);
651 sscanf(&(*argp)[0], "%d", &nunique);
653 memset(&NewDirFid, 0, sizeof(struct afsFid));
654 NewDirFid.Volume.low = 10; /* XXX */
655 NewDirFid.Vnode = nvnode;
656 NewDirFid.Unique = nunique;
659 memset(&NewName, 0, sizeof(struct afsFidName));
660 strcpy(NewName.name, nname);
662 ubik_AFS_Rename(cstruct, 0, &OldDirFid, &OldName, &NewDirFid,
663 &NewName, &hyp0, 0, &OutOldDirStatus, &OutNewDirStatus,
664 &OutOldFileFid, &OutOldFileStatus, &OutNewFileFid,
665 &OutNewFileStatus, &tsync);
673 struct afsFetchStatus OutDirStatus, OutFidStatus;
674 struct afsStoreStatus InStatus;
675 struct afsVolSync tsync;
676 struct afsFid fid, outFid;
677 struct afsToken Token;
678 char *name, *linkcontents;
679 int vnode, unique, mode, owner, length;
682 sscanf(&(*argp)[0], "%d", &vnode);
684 sscanf(&(*argp)[0], "%d", &unique);
686 memset(&fid, 0, sizeof(struct afsFid));
687 fid.Volume.low = 10; /* XXX */
692 linkcontents = &argp[0][0];
694 memset(&InStatus, 0, sizeof(struct afsStoreStatus));
695 sscanf(&(*argp)[0], "%d", &mode);
697 sscanf(&(*argp)[0], "%d", &owner);
699 sscanf(&(*argp)[0], "%d", &length);
702 InStatus.mode = mode;
703 InStatus.mask |= AFS_SETMODE;
706 InStatus.owner = owner;
707 InStatus.mask |= AFS_SETOWNER;
710 InStatus.length = length;
711 InStatus.mask |= AFS_SETLENGTH;
714 ubik_AFS_Symlink(cstruct, 0, &fid, name, linkcontents,
715 &InStatus, &hyp0, 0, &outFid, &OutFidStatus, &OutDirStatus,
722 HardLink(char **argp)
724 struct afsFetchStatus OutDirStatus, OutFidStatus;
725 struct afsVolSync tsync;
726 struct afsFid fid, existingFid;
731 sscanf(&(*argp)[0], "%d", &vnode);
733 sscanf(&(*argp)[0], "%d", &unique);
735 memset(&fid, 0, sizeof(struct afsFid));
736 fid.Volume.low = 10; /* XXX */
741 sscanf(&(*argp)[0], "%d", &vnode);
743 sscanf(&(*argp)[0], "%d", &unique);
745 memset(&existingFid, 0, sizeof(struct afsFid));
746 existingFid.Volume.low = 10; /* XXX */
747 existingFid.Vnode = vnode;
748 existingFid.Unique = unique;
750 ubik_AFS_HardLink(cstruct, 0, &fid, name, &existingFid, &hyp0,
751 0, &OutFidStatus, &OutDirStatus, &tsync);
759 struct afsFetchStatus OutDirStatus, OutFidStatus;
760 struct afsStoreStatus InStatus;
761 struct afsVolSync tsync;
762 struct afsFid fid, outFid;
763 struct afsToken Token;
765 int vnode, unique, mode, owner, length;
768 sscanf(&(*argp)[0], "%d", &vnode);
770 sscanf(&(*argp)[0], "%d", &unique);
772 memset(&fid, 0, sizeof(struct afsFid));
773 fid.Volume.low = 10; /* XXX */
778 memset(&InStatus, 0, sizeof(struct afsStoreStatus));
779 sscanf(&(*argp)[0], "%d", &mode);
781 sscanf(&(*argp)[0], "%d", &owner);
783 sscanf(&(*argp)[0], "%d", &length);
786 InStatus.mode = mode;
787 InStatus.mask |= AFS_SETMODE;
790 InStatus.owner = owner;
791 InStatus.mask |= AFS_SETOWNER;
794 InStatus.length = length;
795 InStatus.mask |= AFS_SETLENGTH;
798 ubik_AFS_MakeDir(cstruct, 0, &fid, name, &InStatus, &hyp0, 0,
799 &outFid, &OutFidStatus, &OutDirStatus, &Token, &tsync);
805 RemoveDir(char **argp)
807 struct afsFetchStatus OutDirStatus;
808 struct afsVolSync tsync;
809 struct afsFid fid, outFid;
810 struct afsFidName nameFid;
815 sscanf(&(*argp)[0], "%d", &vnode);
817 sscanf(&(*argp)[0], "%d", &unique);
819 memset(&fid, 0, sizeof(struct afsFid));
820 fid.Volume.low = 10; /* XXX */
825 memset(&nameFid, 0, sizeof(struct afsFidName));
826 strcpy(nameFid.name, name);
828 ubik_AFS_RemoveDir(cstruct, 0, &fid, &nameFid, &hyp0, 0,
829 &OutDirStatus, &outFid, &tsync);
837 struct afsFetchStatus OutDirStatus;
838 struct afsVolSync tsync;
840 struct afsToken Token;
842 struct rx_call *tcall;
843 int vnode, unique, offset, length, NextOffset;
846 sscanf(&(*argp)[0], "%d", &vnode);
848 sscanf(&(*argp)[0], "%d", &unique);
850 sscanf(&(*argp)[0], "%d", &offset);
852 sscanf(&(*argp)[0], "%d", &length);
854 memset(&fid, 0, sizeof(struct afsFid));
855 fid.Volume.low = 10; /* XXX */
858 tcall = rx_NewCall(cstruct->conns[0]);
859 code = StartAFS_Readdir(tcall, &fid, offset, length, &hyp0, 0);
861 code = FetchDir(tcall);
865 EndAFS_FetchData(tcall, &NextOffset, &OutDirStatus, &Token,
868 code = rx_EndCall(tcall, code);
874 FetchDir(register struct rx_call *acall)
876 extern char *malloc();
877 register char *tbuffer;
878 afs_int32 tlen, length, code;
882 tbuffer = malloc(256);
884 code = rx_Read(acall, &length, sizeof(afs_int32));
885 length = ntohl(length);
886 if (code != sizeof(afs_int32))
890 tlen = (length > 8192 ? 8192 : length);
891 code = rx_Read(acall, tbuffer, tlen);
898 dp = (struct dirent *)dp;
907 struct afsFetchStatus OutDirStatus, OutFidStatus;
908 struct afsVolSync tsync;
909 struct afsFid fid, outFid;
914 sscanf(&(*argp)[0], "%d", &vnode);
916 sscanf(&(*argp)[0], "%d", &unique);
918 memset(&fid, 0, sizeof(struct afsFid));
919 fid.Volume.low = 10; /* XXX */
925 ubik_AFS_Lookup(cstruct, 0, &fid, name, &hyp0, 0, &outFid,
926 &OutFidStatus, &OutDirStatus, &tsync);
932 GetToken(char **argp)
934 struct afsFetchStatus OutStatus;
935 struct afsVolSync tsync;
936 struct afsToken MinToken, RealToken;
938 int vnode, unique, tokenId;
941 sscanf(&(*argp)[0], "%d", &vnode);
943 sscanf(&(*argp)[0], "%d", &unique);
945 memset(&fid, 0, sizeof(struct afsFid));
946 fid.Volume.low = 10; /* XXX */
949 sscanf(&(*argp)[0], "%d", &tokenId);
951 memset(&MinToken, 0, sizeof(struct afsToken));
952 MinToken.tokenID.low = tokenId; /* XXX */
954 ubik_AFS_GetToken(cstruct, 0, &fid, &MinToken, &hyp0, 0,
955 &RealToken, &OutStatus, &tsync);
961 MakeMountPoint(char **argp)
967 ReleaseTokens(char **argp)
973 BulkStatus(char **argp)
977 /* printf("ka <vol.l> <vnode> <unique> <isExec> <kaTime>\n"); */
979 KeepAlive(char **argp)
981 struct afsBulkFEX fex;
982 afs_uint32 numExec, spare4;
986 memset(&fx, 0, sizeof(struct afsFidExp));
987 sscanf(&(*argp)[0], "%d", &fx.fid.Volume.low);
989 sscanf(&(*argp)[0], "%d", &fx.fid.Vnode);
991 sscanf(&(*argp)[0], "%d", &fx.fid.Unique);
993 sscanf(&(*argp)[0], "%d", &numExec);
995 sscanf(&(*argp)[0], "%d", &fx.keepAliveTime);
996 memset(&fex, 0, sizeof(struct afsBulkFEX));
997 fex.afsBulkFEX_val = &fx;
998 fex.afsBulkFEX_len = 1;
1000 ubik_AFS_BulkKeepAlive(cstruct, 0, &fex, numExec, 0, 0, 0,