Import initial version of 1:1 pthread library.
[dragonfly.git] / contrib / dhcp-3.0 / includes / statement.h
1 /* statement.h
2
3    Definitions for executable statements... */
4
5 /*
6  * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
7  * Copyright (c) 1996-2003 by Internet Software Consortium
8  *
9  * Permission to use, copy, modify, and distribute this software for any
10  * purpose with or without fee is hereby granted, provided that the above
11  * copyright notice and this permission notice appear in all copies.
12  *
13  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
14  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
15  * MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
16  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
17  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
18  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
19  * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20  *
21  *   Internet Systems Consortium, Inc.
22  *   950 Charter Street
23  *   Redwood City, CA 94063
24  *   <info@isc.org>
25  *   http://www.isc.org/
26  *
27  * This software has been written for Internet Systems Consortium
28  * by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
29  * To learn more about Internet Systems Consortium, see
30  * ``http://www.isc.org/''.  To learn more about Vixie Enterprises,
31  * see ``http://www.vix.com''.   To learn more about Nominum, Inc., see
32  * ``http://www.nominum.com''.
33  */
34
35 struct executable_statement {
36         int refcnt;
37         struct executable_statement *next;
38         enum statement_op {
39                 null_statement,
40                 if_statement,
41                 add_statement,
42                 eval_statement,
43                 break_statement,
44                 default_option_statement,
45                 supersede_option_statement,
46                 append_option_statement,
47                 prepend_option_statement,
48                 send_option_statement,
49                 statements_statement,
50                 on_statement,
51                 switch_statement,
52                 case_statement,
53                 default_statement,
54                 set_statement,
55                 unset_statement,
56                 let_statement,
57                 define_statement,
58                 log_statement,
59                 return_statement
60         } op;
61         union {
62                 struct {
63                         struct executable_statement *tc, *fc;
64                         struct expression *expr;
65                 } ie;
66                 struct expression *eval;
67                 struct expression *retval;
68                 struct class *add;
69                 struct option_cache *option;
70                 struct option_cache *supersede;
71                 struct option_cache *prepend;
72                 struct option_cache *append;
73                 struct executable_statement *statements;
74                 struct {
75                         int evtypes;
76 #                       define ON_COMMIT  1
77 #                       define ON_EXPIRY  2
78 #                       define ON_RELEASE 4
79 #                       define ON_TRANSMISSION 8
80                         struct executable_statement *statements;
81                 } on;
82                 struct {
83                         struct expression *expr;
84                         struct executable_statement *statements;
85                 } s_switch;
86                 struct expression *c_case;
87                 struct {
88                         char *name;
89                         struct expression *expr;
90                         struct executable_statement *statements;
91                 } set, let;
92                 char *unset;
93                 struct {
94                         enum {
95                                 log_priority_fatal,
96                                 log_priority_error,
97                                 log_priority_debug,
98                                 log_priority_info
99                         } priority;
100                         struct expression *expr;
101                 } log;
102         } data;
103 };
104