eca6614cab7b184701863258177de1c533e4f850
[openafs.git] / src / rxkad / test / stress_internal.h
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  *
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
8  */
9
10 /* RX Authentication Stress test: private shared structures. */
11
12
13 #include "stress_errs.h"
14
15 extern struct ktc_encryptionKey serviceKey;
16 extern long serviceKeyVersion;
17
18 #define RXKST_SERVER_NAME "rxkad_stress_test_server"
19 #define RXKST_SERVER_INST ""
20 #define RXKST_CLIENT_NAME "rxkad_stress_test_client"
21 #define RXKST_CLIENT_INST ""
22 #define RXKST_CLIENT_CELL "rxtest.openafs.org"
23
24 extern int errno;
25
26 struct serverParms {
27     char *whoami;
28     u_int threads;
29     int authentication;         /* minimum level  of auth to permit */
30     char *keyfile;
31 };
32
33 struct clientParms {
34     char *whoami;
35     u_int threads;
36     char server[32];
37     u_long sendLen;             /* parameters for call to Copious */
38     u_long recvLen;
39     u_long fastCalls;           /* number of calls to perform */
40     u_long slowCalls;
41     u_long copiousCalls;
42     int noExit;                 /* don't exit after successful end */
43     int printStats;             /* print rx statistics before exit */
44     int printTiming;            /* print timings for calls */
45     int callTest;               /* check call number preservation */
46     int hijackTest;             /* check hijack prevention measures */
47     int stopServer;             /* send stop server RPC */
48     int authentication;         /* type of authentication to use */
49     int useTokens;              /* use user's existing tokens */
50     char *cell;                 /* test cell name */
51     u_long repeatInterval;      /* secs between load test activity */
52     u_long repeatCount;         /* times load test activity repeated */
53 };
54
55 long rxkst_StartClient(INOUT struct clientParms *parms);
56 long rxkst_StartServer(INOUT struct serverParms *parms);
57
58 /* For backward compatibility with AFS3.0 release. */
59
60 #ifndef assert
61 #define assert(x) \
62     (!(x) ? (fprintf (stderr, "assertion failed: line %d, file %s\n",\
63                       __LINE__,__FILE__), fflush(stderr), abort(), 0) : 0)
64 #endif
65
66 #ifdef opaque
67 #undef opaque
68 #undef const
69 #ifdef __STDC__
70 typedef void *opaque;
71 #else /* __STDC__ */
72 #define const
73 typedef char *opaque;
74 #endif /* __STDC__ */
75 #endif
76
77 #ifndef rx_GetPacketCksum
78 #define rxs_Release(a) RXS_Close(a)
79 #endif
80
81 /* to keep GCC happy */
82
83 extern int LWP_CreateProcess();
84 extern char *lcstring();
85 extern void exit();
86 extern int cmd_AddParm();
87 extern int cmd_Dispatch();