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