]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Support binding scopes, filename and sname.
authorTed Lemon <source@isc.org>
Tue, 25 Jan 2000 01:25:43 +0000 (01:25 +0000)
committerTed Lemon <source@isc.org>
Tue, 25 Jan 2000 01:25:43 +0000 (01:25 +0000)
includes/tree.h

index 95ceada9c5b959da419bab3e000fd54c652ebbe0..1efc851c6612057235f73560b1a44661f0aff598 100644 (file)
@@ -55,6 +55,17 @@ struct data_string {
        int terminated;
 };
 
+struct binding {
+       struct binding *next;
+       char *name;
+       struct data_string value;
+};
+
+struct binding_scope {
+       struct binding_scope *outer;
+       struct binding *bindings;
+};
+
 /* Expression tree structure. */
 
 enum expr_op {
@@ -99,7 +110,9 @@ enum expr_op {
        expr_not_equal,
        expr_null,
        expr_variable_exists,
-       expr_variable_reference
+       expr_variable_reference,
+       expr_filename,
+       expr_sname
 };
 
 struct expression {
@@ -195,7 +208,8 @@ struct universe {
        int (*get_func) PROTO ((struct data_string *, struct universe *,
                                struct packet *, struct lease *,
                                struct option_state *, struct option_state *,
-                               struct option_state *, unsigned));
+                               struct option_state *, struct binding_scope *,
+                               unsigned));
        void (*set_func) PROTO ((struct universe *, struct option_state *,
                                 struct option_cache *, enum statement_op));
                
@@ -205,7 +219,8 @@ struct universe {
                                                struct option_state *));
        int (*encapsulate) PROTO ((struct data_string *, struct packet *,
                                   struct lease *, struct option_state *,
-                                  struct option_state *, struct universe *));
+                                  struct option_state *,
+                                  struct binding_scope *, struct universe *));
        void (*store_tag) PROTO ((unsigned char *, u_int32_t));
        void (*store_length) PROTO ((unsigned char *, u_int32_t));
        int tag_size, length_size;
@@ -229,9 +244,3 @@ enum expression_context {
        context_dns,
        context_data_or_numeric
 };
-
-struct binding {
-       struct binding *next;
-       char *name;
-       struct data_string value;
-};