1 #ifndef HARNESS_H_INCLUDED
2 #define HARNESS_H_INCLUDED
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;
9 void Qselect( int max
, const fd_set
*rfds
, const fd_set
*wfds
, const fd_set
*efds
, struct timeval
*to
);
11 void Qpoll( const struct pollfd
*fds
, int nfds
, int timeout
);
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
);
16 void Qclose( int fd
);
17 void Qsendto( int fd
, const void *msg
, int msglen
, const struct sockaddr
*addr
, int addrlen
);
18 void Qrecvfrom( int fd
, int buflen
, int addrlen
);
19 void Qread( int fd
, size_t buflen
);
20 void Qwrite( int fd
, const void *buf
, size_t len
);
22 extern void Tshutdown(void);
23 /* General help functions */
24 void Tfailed(const char *why
);
25 void Toutputerr(void);
27 void Tfsyscallr(const char *fmt
, ...) PRINTFFORMAT(1,2);
28 void Tensureoutputfile(void);
29 void Tmust(const char *call
, const char *arg
, int cond
);
30 void Tvbf(const char *fmt
, ...) PRINTFFORMAT(1,2);
31 void Tvbvf(const char *fmt
, va_list al
);
32 void Tvbfdset(int max
, const fd_set
*set
);
33 void Tvbpollfds(const struct pollfd
*fds
, int nfds
);
34 void Tvbaddr(const struct sockaddr
*addr
, int addrlen
);
35 void Tvbbytes(const void *buf
, int len
);
37 void Tvba(const char *str
);
40 extern struct timeval currenttime
;
41 extern const struct Terrno
{ const char *n
; int v
; } Terrnos
[];