]>
Commit | Line | Data |
---|---|---|
ae0b5b7d TL |
1 | /* statement.h |
2 | ||
3 | Definitions for executable statements... */ | |
4 | ||
5 | /* | |
7512d88b | 6 | * Copyright (c) 2004-2017 by Internet Systems Consortium, Inc. ("ISC") |
98311e4b | 7 | * Copyright (c) 1996-2003 by Internet Software Consortium |
ae0b5b7d | 8 | * |
7512d88b TM |
9 | * This Source Code Form is subject to the terms of the Mozilla Public |
10 | * License, v. 2.0. If a copy of the MPL was not distributed with this | |
11 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
ae0b5b7d | 12 | * |
98311e4b DH |
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. | |
ae0b5b7d | 20 | * |
98311e4b DH |
21 | * Internet Systems Consortium, Inc. |
22 | * 950 Charter Street | |
23 | * Redwood City, CA 94063 | |
24 | * <info@isc.org> | |
2c85ac9b | 25 | * https://www.isc.org/ |
49733f31 | 26 | * |
ae0b5b7d TL |
27 | */ |
28 | ||
29 | struct executable_statement { | |
79a65726 | 30 | int refcnt; |
ae0b5b7d TL |
31 | struct executable_statement *next; |
32 | enum statement_op { | |
59ae3999 | 33 | null_statement, |
ae0b5b7d TL |
34 | if_statement, |
35 | add_statement, | |
36 | eval_statement, | |
37 | break_statement, | |
38 | default_option_statement, | |
39 | supersede_option_statement, | |
40 | append_option_statement, | |
41 | prepend_option_statement, | |
95732025 | 42 | send_option_statement, |
79a65726 | 43 | statements_statement, |
c7b7a549 TL |
44 | on_statement, |
45 | switch_statement, | |
46 | case_statement, | |
47 | default_statement, | |
24fe31eb TL |
48 | set_statement, |
49 | unset_statement, | |
558f4a0a | 50 | let_statement, |
e7a9c293 | 51 | define_statement, |
1b234d44 | 52 | log_statement, |
253c8b6a | 53 | return_statement, |
45c332f0 SR |
54 | execute_statement, |
55 | vendor_opt_statement | |
ae0b5b7d TL |
56 | } op; |
57 | union { | |
58 | struct { | |
d758ad8c | 59 | struct executable_statement *tc, *fc; |
ae0b5b7d TL |
60 | struct expression *expr; |
61 | } ie; | |
62 | struct expression *eval; | |
1b234d44 | 63 | struct expression *retval; |
ae0b5b7d TL |
64 | struct class *add; |
65 | struct option_cache *option; | |
66 | struct option_cache *supersede; | |
67 | struct option_cache *prepend; | |
68 | struct option_cache *append; | |
79a65726 TL |
69 | struct executable_statement *statements; |
70 | struct { | |
c7b7a549 TL |
71 | int evtypes; |
72 | # define ON_COMMIT 1 | |
73 | # define ON_EXPIRY 2 | |
24fe31eb | 74 | # define ON_RELEASE 4 |
be80b1a6 | 75 | # define ON_TRANSMISSION 8 |
79a65726 TL |
76 | struct executable_statement *statements; |
77 | } on; | |
c7b7a549 TL |
78 | struct { |
79 | struct expression *expr; | |
80 | struct executable_statement *statements; | |
81 | } s_switch; | |
82 | struct expression *c_case; | |
83 | struct { | |
84 | char *name; | |
85 | struct expression *expr; | |
24fe31eb TL |
86 | struct executable_statement *statements; |
87 | } set, let; | |
88 | char *unset; | |
e7a9c293 DN |
89 | struct { |
90 | enum { | |
91 | log_priority_fatal, | |
92 | log_priority_error, | |
93 | log_priority_debug, | |
94 | log_priority_info | |
95 | } priority; | |
96 | struct expression *expr; | |
97 | } log; | |
253c8b6a EH |
98 | struct { |
99 | char *command; | |
100 | struct expression *arglist; | |
101 | int argc; | |
102 | } execute; | |
ae0b5b7d TL |
103 | } data; |
104 | }; | |
105 |