1998-06-25 03:58:24 +00:00
|
|
|
/* statement.h
|
|
|
|
|
|
|
|
Definitions for executable statements... */
|
|
|
|
|
|
|
|
/*
|
1999-03-16 05:50:46 +00:00
|
|
|
* Copyright (c) 1996-1999 Internet Software Consortium.
|
|
|
|
* Use is subject to license terms which appear in the file named
|
|
|
|
* ISC-LICENSE that should have accompanied this file when you
|
|
|
|
* received it. If a file named ISC-LICENSE did not accompany this
|
|
|
|
* file, or you are not sure the one you have is correct, you may
|
|
|
|
* obtain an applicable copy of the license at:
|
1998-06-25 03:58:24 +00:00
|
|
|
*
|
1999-03-16 05:50:46 +00:00
|
|
|
* http://www.isc.org/isc-license-1.0.html.
|
1998-06-25 03:58:24 +00:00
|
|
|
*
|
1999-03-16 05:50:46 +00:00
|
|
|
* This file is part of the ISC DHCP distribution. The documentation
|
|
|
|
* associated with this file is listed in the file DOCUMENTATION,
|
|
|
|
* included in the top-level directory of this release.
|
1998-06-25 03:58:24 +00:00
|
|
|
*
|
1999-03-16 05:50:46 +00:00
|
|
|
* Support and other services are available for ISC products - see
|
|
|
|
* http://www.isc.org for more information.
|
1998-06-25 03:58:24 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
struct executable_statement {
|
1999-07-16 21:34:14 +00:00
|
|
|
int refcnt;
|
1998-06-25 03:58:24 +00:00
|
|
|
struct executable_statement *next;
|
|
|
|
enum statement_op {
|
|
|
|
if_statement,
|
|
|
|
add_statement,
|
|
|
|
eval_statement,
|
|
|
|
break_statement,
|
|
|
|
default_option_statement,
|
|
|
|
supersede_option_statement,
|
|
|
|
append_option_statement,
|
|
|
|
prepend_option_statement,
|
1998-11-05 18:48:37 +00:00
|
|
|
send_option_statement,
|
1999-07-16 21:34:14 +00:00
|
|
|
statements_statement,
|
2000-01-08 01:41:08 +00:00
|
|
|
on_statement,
|
|
|
|
switch_statement,
|
|
|
|
case_statement,
|
|
|
|
default_statement,
|
2000-01-25 01:19:46 +00:00
|
|
|
set_statement,
|
|
|
|
unset_statement,
|
|
|
|
let_statement
|
1998-06-25 03:58:24 +00:00
|
|
|
} op;
|
|
|
|
union {
|
|
|
|
struct {
|
|
|
|
struct executable_statement *true, *false;
|
|
|
|
struct expression *expr;
|
|
|
|
} ie;
|
|
|
|
struct expression *eval;
|
|
|
|
struct class *add;
|
|
|
|
struct option_cache *option;
|
|
|
|
struct option_cache *supersede;
|
|
|
|
struct option_cache *prepend;
|
|
|
|
struct option_cache *append;
|
1999-07-16 21:34:14 +00:00
|
|
|
struct executable_statement *statements;
|
|
|
|
struct {
|
2000-01-08 01:41:08 +00:00
|
|
|
int evtypes;
|
|
|
|
# define ON_COMMIT 1
|
|
|
|
# define ON_EXPIRY 2
|
2000-01-25 01:19:46 +00:00
|
|
|
# define ON_RELEASE 4
|
1999-07-16 21:34:14 +00:00
|
|
|
struct executable_statement *statements;
|
|
|
|
} on;
|
2000-01-08 01:41:08 +00:00
|
|
|
struct {
|
|
|
|
struct expression *expr;
|
|
|
|
struct executable_statement *statements;
|
|
|
|
} s_switch;
|
|
|
|
struct expression *c_case;
|
|
|
|
struct {
|
|
|
|
char *name;
|
|
|
|
struct expression *expr;
|
2000-01-25 01:19:46 +00:00
|
|
|
struct executable_statement *statements;
|
|
|
|
} set, let;
|
|
|
|
char *unset;
|
1998-06-25 03:58:24 +00:00
|
|
|
} data;
|
|
|
|
};
|
|
|
|
|