ISC DHCP 4.4.3-P1
A reference DHCPv4 and DHCPv6 implementation
 
Loading...
Searching...
No Matches
t_api.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2004-2017 Internet Systems Consortium, Inc. ("ISC")
3 * Copyright (C) 1999-2003 Internet Software Consortium.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15 * PERFORMANCE OF THIS SOFTWARE.
16 */
17
18/* $Id: t_api.h,v 1.4 2009/11/24 02:06:56 sar Exp $ */
19
20#ifndef TESTS_T_API_H
21#define TESTS_T_API_H 1
22
24
25#include <stdio.h>
26
27#include <omapip/result.h>
28#include <isc/lang.h>
29#include <isc/formatcheck.h>
30
31/*
32 *
33 * Result codes.
34 *
35 */
36
37#define T_PASS 0x1
38#define T_FAIL 0x2
39#define T_UNRESOLVED 0x3
40#define T_UNSUPPORTED 0x4
41#define T_UNTESTED 0x5
42#define T_THREADONLY 0x6
43
44/*
45 *
46 * Assertion class codes.
47 *
48 */
49
50#define T_OPTIONAL 0x0
51#define T_REQUIRED 0x1
52
53/*
54 * Misc
55 */
56
57#define T_MAXTOKS 16
58#define T_ARG(n) (*(av + (n)))
59
60typedef void (*PFV)(void);
61
62typedef struct {
64 const char *func_name;
66
67extern int T_debug;
68extern testspec_t T_testlist[];
69
70ISC_LANG_BEGINDECLS
71
72void
73t_assert(const char *component, int anum, int class, const char *what, ...)
74 ISC_FORMAT_PRINTF(4, 5);
75
76void
77t_info(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
78
79void
80t_result(int result);
81
82char *
83t_getenv(const char *name);
84
85char *
86t_fgetbs(FILE *fp);
87
88isc_result_t
90
91unsigned int
92t_dc_method_fromtext(char *dc_method);
93
94int
95t_bustline(char *line, char **toks);
96
97int
98t_eval(const char *filename, int (*func)(char **), int nargs);
99
100ISC_LANG_ENDDECLS
101
102#endif /* TESTS_T_API_H */
103
const char int line
Definition dhcpd.h:3802
PFV pfv
Definition t_api.h:63
const char * func_name
Definition t_api.h:64
ISC_LANG_BEGINDECLS void void void t_result(int result)
testspec_t T_testlist[]
int t_eval(const char *filename, int(*func)(char **), int nargs)
int t_bustline(char *line, char **toks)
isc_result_t t_dns_result_fromtext(char *result)
char * t_getenv(const char *name)
char * t_fgetbs(FILE *fp)
unsigned int t_dc_method_fromtext(char *dc_method)
ISC_LANG_BEGINDECLS void t_assert(const char *component, int anum, int class, const char *what,...) ISC_FORMAT_PRINTF(4
int T_debug
void(* PFV)(void)
Definition t_api.h:60
ISC_LANG_BEGINDECLS void void t_info(const char *format,...) ISC_FORMAT_PRINTF(1