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>
18 #include <afs/comauth.h>
28 int i; /*Cell entry number */
29 int useCellEntry; /*Do a cellular call? */
30 ClearToken cToken; /*Clear token returned */
31 SecretToken sToken; /*Secret token returned */
32 char cellID[64]; /*Cell ID returned */
33 int isPrimary; /*Is cell ID primary? */
34 int rc; /*Return value from U_CellGetLocalTokens */
36 printf("\nTesting the cellular Venus token interface.\n\n");
37 printf("Getting tokens, non-cellular request:\n");
39 rc = U_CellGetLocalTokens(useCellEntry, i, &cToken, &sToken, cellID,
42 printf(" **Error getting local tokens: %d, errno is %d\n", rc,
45 printf(" Got local tokens: Vice ID is %d\n", cToken.ViceId);
47 printf("\nGetting tokens, cellular request.\n");
50 for (i = 0; (i <= 1000) && !(rc && errno == EDOM); i++) {
51 printf(" Cell entry %2d: ", i);
52 rc = U_CellGetLocalTokens(useCellEntry, i, &cToken, &sToken, cellID,
55 /*Something didn't go well. Print out errno, unless we got an EDOM */
57 printf("--End of list--\n");
59 printf("** Error in call, errno is %d\n", errno);
61 printf("Vice ID %4d in cell '%s' [isPrimary=%d]\n", cToken.ViceId,
65 printf("\nEnd of cellular Venus token interface test.\n\n");