veriexecctl.h revision 1.9 1 1.9 elad /* $NetBSD: veriexecctl.h,v 1.9 2006/11/28 22:22:03 elad Exp $ */
2 1.1 blymn
3 1.1 blymn /*-
4 1.8 elad * Copyright 2005 Elad Efrat <elad (at) NetBSD.org>
5 1.1 blymn * Copyright 2005 Brett Lymn <blymn (at) netbsd.org>
6 1.1 blymn *
7 1.1 blymn * All rights reserved.
8 1.1 blymn *
9 1.1 blymn * This code has been donated to The NetBSD Foundation by the Author.
10 1.1 blymn *
11 1.1 blymn * Redistribution and use in source and binary forms, with or without
12 1.1 blymn * modification, are permitted provided that the following conditions
13 1.1 blymn * are met:
14 1.1 blymn * 1. Redistributions of source code must retain the above copyright
15 1.1 blymn * notice, this list of conditions and the following disclaimer.
16 1.1 blymn * 2. The name of the author may not be used to endorse or promote products
17 1.1 blymn * derived from this software withough specific prior written permission
18 1.1 blymn *
19 1.1 blymn * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20 1.1 blymn * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21 1.1 blymn * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22 1.1 blymn * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23 1.1 blymn * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24 1.1 blymn * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 1.1 blymn * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 1.1 blymn * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 1.1 blymn * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 1.1 blymn * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 1.1 blymn *
30 1.1 blymn *
31 1.1 blymn */
32 1.1 blymn
33 1.3 christos #ifndef _VERIEXECCTL_H_
34 1.3 christos #define _VERIEXECCTL_H_
35 1.1 blymn
36 1.5 elad #define STATUS_STRING(status) ((status) == FINGERPRINT_NOTEVAL ? \
37 1.5 elad "not evaluated" : \
38 1.5 elad (status) == FINGERPRINT_VALID ? \
39 1.5 elad "valid" : \
40 1.5 elad (status) == FINGERPRINT_NOMATCH ? \
41 1.5 elad "mismatch" : \
42 1.5 elad "<unknown>")
43 1.5 elad
44 1.9 elad #define dict_sets(d, k, v) \
45 1.9 elad prop_dictionary_set(d, k, prop_string_create_cstring(v))
46 1.9 elad
47 1.9 elad #define dict_gets(d, k) \
48 1.9 elad prop_string_cstring_nocopy(prop_dictionary_get(d, k))
49 1.9 elad
50 1.9 elad #define dict_setd(d, k, v, n) \
51 1.9 elad prop_dictionary_set(d, k, prop_data_create_data(v, n))
52 1.9 elad
53 1.9 elad #define dict_getd(d, k) \
54 1.9 elad prop_data_data_nocopy(prop_dictionary_get(d, k))
55 1.9 elad
56 1.4 elad CIRCLEQ_HEAD(veriexec_ups, veriexec_up) params_list;
57 1.4 elad struct veriexec_up {
58 1.9 elad prop_dictionary_t vu_preload;
59 1.4 elad CIRCLEQ_ENTRY(veriexec_up) vu_list;
60 1.1 blymn };
61 1.1 blymn
62 1.4 elad extern int gfd, verbose, phase;
63 1.3 christos extern size_t line;
64 1.1 blymn extern char *infile;
65 1.1 blymn extern FILE *yyin;
66 1.1 blymn
67 1.1 blymn int yywrap(void);
68 1.1 blymn int yylex(void);
69 1.1 blymn int yyparse(void);
70 1.1 blymn void yyerror(const char *);
71 1.6 elad struct veriexec_up *dev_lookup(char *);
72 1.7 elad struct veriexec_up *dev_add(char *);
73 1.1 blymn void phase2_load(void);
74 1.1 blymn
75 1.3 christos #endif /* _VERIEXECCTL_H_ */
76