Import Upstream version 1.8.5
[hcoop/debian/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
39 void Log(char *fmt, ...)
40 AFS_ATTRIBUTE_FORMAT(__printf__, 1, 2);
41
42 void sendOOB(int);
43 void recvOOB(int);
44
45 #ifdef NEEDS_ALLOCFDSET
46 /* Include these if testing against 32 bit fd_set IOMGR. */
47 fd_set *IOMGR_AllocFDSet(void);
48 void IOMGR_FreeFDSet(fd_set * fds);
49 #endif
50
51 #endif /* _SELTEST_H_ */