efc53947193711d596e86603c85cd68d20847645
[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
23 extern int errno;
24
25 struct serverParms {
26     char *whoami;
27     u_int threads;
28     int authentication;                 /* minimum level  of auth to permit */
29 };
30
31 struct clientParms {
32     char *whoami;
33     u_int threads;
34     char server[32];
35     u_long sendLen;                     /* parameters for call to Copious */
36     u_long recvLen;
37     u_long fastCalls;                   /* number of calls to perform */
38     u_long slowCalls;
39     u_long copiousCalls;
40     int noExit;                         /* don't exit after successful end */
41     int printStats;                     /* print rx statistics before exit */
42     int printTiming;                    /* print timings for calls */
43     int callTest;                       /* check call number preservation */
44     int hijackTest;                     /* check hijack prevention measures */
45     int stopServer;                     /* send stop server RPC */
46     int authentication;                 /* type of authentication to use */
47     u_long repeatInterval;              /* secs between load test activity */
48     u_long repeatCount;                 /* times load test activity repeated */
49 };
50
51 long rxkst_StartClient(INOUT struct clientParms *parms);
52 long rxkst_StartServer(INOUT struct serverParms *parms);
53
54 long RXKST_Fast();
55 long RXKST_Slow();
56 long RXKST_Copious();
57 long RXKST_Kill();
58
59 /* For backward compatibility with AFS3.0 release. */
60
61 #ifndef assert
62 #define assert(x) \
63     (!(x) ? (fprintf (stderr, "assertion failed: line %d, file %s\n",\
64                       __LINE__,__FILE__), fflush(stderr), abort(), 0) : 0)
65 #endif
66
67 #ifdef opaque
68 #undef opaque
69 #undef const
70 #ifdef __STDC__
71 typedef void *opaque;
72 #else /* __STDC__ */
73 #define const
74 typedef char *opaque;
75 #endif /* __STDC__ */
76 #endif
77
78 #ifndef rx_GetPacketCksum
79 #define rxs_Release(a) RXS_Close(a)
80 #endif
81
82 /* to keep GCC happy */
83
84 extern int LWP_CreateProcess();
85 extern char *lcstring();
86 extern void exit();
87 extern int cmd_AddParm();
88 extern int cmd_Dispatch();