09d538fa52bb489ae2ce808cd7eeadba7ddbf86b
[openafs.git] / src / lwp / test / seltest.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 /* seltest.h - Common RPC codes from client and server. */
11
12 #ifndef _SELTEST_H_
13 #define _SELTEST_H_
14
15
16 typedef struct {
17 #define SC_PROBE 0
18 #define SC_WRITE 1
19 #define SC_END   2              /* server terminates with this. */
20     int sc_cmd;
21
22     int sc_delay;
23
24 #define SC_WAIT_ONLY 0
25 #define SC_WAIT_OOB  1
26     int sc_flags;
27     int sc_info;                /* stores size of write for SC_WRITE */
28 } selcmd_t;
29
30 #define MIN_D_VALUE 0
31 #define MAX_D_VALUE 254
32 #define END_DATA 255
33
34 /* Function Declarations. */
35 void OpenFDs(int);
36 void assertNullFDSet(int fd, fd_set *);
37 void Die(int flag, char *);
38 void Log(char *fmt, ...);
39 void sendOOB(int);
40 void recvOOB(int);
41
42 #ifdef NEEDS_ALLOCFDSET
43 /* Include these if testing against 32 bit fd_set IOMGR. */
44 fd_set *IOMGR_AllocFDSet(void);
45 void IOMGR_FreeFDSet(fd_set * fds);
46 #endif
47
48 #endif /* _SELTEST_H_ */