]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
- Add switch, case, default and set.
authorTed Lemon <source@isc.org>
Sat, 8 Jan 2000 01:41:08 +0000 (01:41 +0000)
committerTed Lemon <source@isc.org>
Sat, 8 Jan 2000 01:41:08 +0000 (01:41 +0000)
- Tweak on so more than one type of event can be set at once.

includes/statement.h

index 0ff7b5366722f39d058379d147b88f9a3d4902a0..87514ce14d9fe4fd3b71983f20b2d7bac9006295 100644 (file)
@@ -34,7 +34,11 @@ struct executable_statement {
                prepend_option_statement,
                send_option_statement,
                statements_statement,
-               on_statement
+               on_statement,
+               switch_statement,
+               case_statement,
+               default_statement,
+               set_statement
        } op;
        union {
                struct {
@@ -49,9 +53,21 @@ struct executable_statement {
                struct option_cache *append;
                struct executable_statement *statements;
                struct {
-                       enum { expiry, commit, release } evtype;
+                       int evtypes;
+#                      define ON_COMMIT  1
+#                      define ON_EXPIRY  2
+#                      define ON_RELEASE 3
                        struct executable_statement *statements;
                } on;
+               struct {
+                       struct expression *expr;
+                       struct executable_statement *statements;
+               } s_switch;
+               struct expression *c_case;
+               struct {
+                       char *name;
+                       struct expression *expr;
+               } set;
        } data;
 };