Commit | Line | Data |
---|---|---|
bb7ba677 | 1 | m4_dnl harness.h.m4 |
2 | m4_dnl (part of complex test harness, not of the library) | |
3 | m4_dnl - function and other declarations | |
4 | ||
ae8cc977 | 5 | m4_dnl This file is part of adns, which is |
baa953c9 | 6 | m4_dnl Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson |
17cd4f48 | 7 | m4_dnl Copyright (C) 2014 Mark Wooding |
ae8cc977 | 8 | m4_dnl Copyright (C) 1999-2000,2003,2006 Tony Finch |
9 | m4_dnl Copyright (C) 1991 Massachusetts Institute of Technology | |
10 | m4_dnl (See the file INSTALL for full details.) | |
bb7ba677 | 11 | m4_dnl |
12 | m4_dnl This program is free software; you can redistribute it and/or modify | |
13 | m4_dnl it under the terms of the GNU General Public License as published by | |
7f8bbe29 | 14 | m4_dnl the Free Software Foundation; either version 3, or (at your option) |
bb7ba677 | 15 | m4_dnl any later version. |
16 | m4_dnl | |
17 | m4_dnl This program is distributed in the hope that it will be useful, | |
18 | m4_dnl but WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 | m4_dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 | m4_dnl GNU General Public License for more details. | |
21 | m4_dnl | |
22 | m4_dnl You should have received a copy of the GNU General Public License | |
8c09a4c6 | 23 | m4_dnl along with this program; if not, write to the Free Software Foundation. |
bb7ba677 | 24 | |
25 | m4_include(hmacros.i4) | |
26 | ||
27 | #ifndef HARNESS_H_INCLUDED | |
28 | #define HARNESS_H_INCLUDED | |
29 | ||
bb7ba677 | 30 | #include "internal.h" |
0ebff22d | 31 | #include "hsyscalls.h" |
914a5ff5 | 32 | |
bb7ba677 | 33 | /* There is a Q function (Q for Question) for each such syscall; |
34 | * it constructs a string representing the call, and calls Q_str | |
35 | * on it, or constructs it in vb and calls Q_vb; | |
36 | */ | |
37 | ||
38 | hm_create_proto_q | |
39 | m4_define(`hm_syscall', `void Q$1(hm_args_massage($3,void));') | |
0ebff22d | 40 | m4_define(`hm_specsyscall', `') |
bb7ba677 | 41 | m4_include(`hsyscalls.i4') |
42 | ||
43 | void Q_vb(void); | |
44 | ||
914a5ff5 | 45 | extern void Tshutdown(void); |
46 | ||
bb7ba677 | 47 | /* General help functions */ |
48 | ||
49 | void Tfailed(const char *why); | |
50 | void Toutputerr(void); | |
51 | void Tnomem(void); | |
52 | void Tfsyscallr(const char *fmt, ...) PRINTFFORMAT(1,2); | |
87dd6345 | 53 | void Tensurerecordfile(void); |
bb7ba677 | 54 | void Tmust(const char *call, const char *arg, int cond); |
55 | ||
56 | void Tvbf(const char *fmt, ...) PRINTFFORMAT(1,2); | |
57 | void Tvbvf(const char *fmt, va_list al); | |
58 | void Tvbfdset(int max, const fd_set *set); | |
8b1171e6 | 59 | void Tvbpollfds(const struct pollfd *fds, int nfds); |
bb7ba677 | 60 | void Tvbaddr(const struct sockaddr *addr, int addrlen); |
61 | void Tvbbytes(const void *buf, int len); | |
62 | void Tvberrno(int e); | |
63 | void Tvba(const char *str); | |
64 | ||
65 | /* Shared globals */ | |
66 | ||
67 | extern vbuf vb; | |
98b6d5b4 | 68 | extern struct timeval currenttime; |
bb7ba677 | 69 | extern const struct Terrno { const char *n; int v; } Terrnos[]; |
e7308d26 IJ |
70 | |
71 | /* Special cases */ | |
bb7ba677 | 72 | |
e7308d26 IJ |
73 | void Texit(int rv) NONRETURNING; |
74 | ||
bb7ba677 | 75 | #endif |