c7340170 |
1 | #ifndef HARNESS_H_INCLUDED |
2 | #define HARNESS_H_INCLUDED |
3 | #include "internal.h" |
4 | #include "hsyscalls.h" |
5 | /* There is a Q function (Q for Question) for each such syscall; |
6 | * it constructs a string representing the call, and calls Q_str |
7 | * on it, or constructs it in vb and calls Q_vb; |
8 | */ |
9 | void Qselect( int max , const fd_set *rfds , const fd_set *wfds , const fd_set *efds , struct timeval *to ); |
10 | #ifdef HAVE_POLL |
11 | void Qpoll( const struct pollfd *fds , int nfds , int timeout ); |
12 | #endif |
13 | void Qsocket( int type ); |
14 | void Qfcntl( int fd , int cmd , long arg ); |
15 | void Qconnect( int fd , const struct sockaddr *addr , int addrlen ); |
0366bd10 |
16 | void Qbind( int fd , const struct sockaddr *addr , int addrlen ); |
17 | void Qlisten( int fd , int backlog ); |
c7340170 |
18 | void Qclose( int fd ); |
19 | void Qsendto( int fd , const void *msg , int msglen , const struct sockaddr *addr , int addrlen ); |
20 | void Qrecvfrom( int fd , int buflen , int addrlen ); |
21 | void Qread( int fd , size_t buflen ); |
22 | void Qwrite( int fd , const void *buf , size_t len ); |
23 | void Q_vb(void); |
24 | extern void Tshutdown(void); |
25 | /* General help functions */ |
26 | void Tfailed(const char *why); |
27 | void Toutputerr(void); |
28 | void Tnomem(void); |
29 | void Tfsyscallr(const char *fmt, ...) PRINTFFORMAT(1,2); |
0366bd10 |
30 | void Tensurerecordfile(void); |
c7340170 |
31 | void Tmust(const char *call, const char *arg, int cond); |
32 | void Tvbf(const char *fmt, ...) PRINTFFORMAT(1,2); |
33 | void Tvbvf(const char *fmt, va_list al); |
34 | void Tvbfdset(int max, const fd_set *set); |
35 | void Tvbpollfds(const struct pollfd *fds, int nfds); |
36 | void Tvbaddr(const struct sockaddr *addr, int addrlen); |
37 | void Tvbbytes(const void *buf, int len); |
38 | void Tvberrno(int e); |
39 | void Tvba(const char *str); |
40 | /* Shared globals */ |
41 | extern vbuf vb; |
42 | extern struct timeval currenttime; |
43 | extern const struct Terrno { const char *n; int v; } Terrnos[]; |
44 | #endif |