ISC DHCP  4.3.1
A reference DHCPv4 and DHCPv6 implementation
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
tree.c File Reference
#include "dhcpd.h"
#include <omapip/omapip_p.h>
#include <ctype.h>
#include <sys/wait.h>

Go to the source code of this file.

Macros

#define DS_SPRINTF_SIZE   128
 

Functions

int data_string_sprintfa (struct data_string *ds, const char *fmt,...)
 
pair cons (caddr_t car, pair cdr)
 
int make_const_option_cache (struct option_cache **oc, struct buffer **buffer, u_int8_t *data, unsigned len, struct option *option, const char *file, int line)
 
int make_host_lookup (struct expression **expr, const char *name)
 
int enter_dns_host (struct dns_host_entry **dh, const char *name)
 
int make_const_data (struct expression **expr, const unsigned char *data, unsigned len, int terminated, int allocate, const char *file, int line)
 
int make_const_int (struct expression **expr, unsigned long val)
 
int make_concat (struct expression **expr, struct expression *left, struct expression *right)
 
int make_encapsulation (struct expression **expr, struct data_string *name)
 
int make_substring (struct expression **new, struct expression *expr, struct expression *offset, struct expression *length)
 
int make_limit (struct expression **new, struct expression *expr, int limit)
 
int option_cache (struct option_cache **oc, struct data_string *dp, struct expression *expr, struct option *option, const char *file, int line)
 
int make_let (struct executable_statement **result, const char *name)
 
int evaluate_expression (struct binding_value **result, struct packet *packet, struct lease *lease, struct client_state *client_state, struct option_state *in_options, struct option_state *cfg_options, struct binding_scope **scope, struct expression *expr, const char *file, int line)
 
int binding_value_dereference (struct binding_value **v, const char *file, int line)
 
int evaluate_boolean_expression (int *result, struct packet *packet, struct lease *lease, struct client_state *client_state, struct option_state *in_options, struct option_state *cfg_options, struct binding_scope **scope, struct expression *expr)
 
int evaluate_data_expression (struct data_string *result, struct packet *packet, struct lease *lease, struct client_state *client_state, struct option_state *in_options, struct option_state *cfg_options, struct binding_scope **scope, struct expression *expr, const char *file, int line)
 
int evaluate_numeric_expression (unsigned long *result, struct packet *packet, struct lease *lease, struct client_state *client_state, struct option_state *in_options, struct option_state *cfg_options, struct binding_scope **scope, struct expression *expr)
 
int evaluate_option_cache (struct data_string *result, struct packet *packet, struct lease *lease, struct client_state *client_state, struct option_state *in_options, struct option_state *cfg_options, struct binding_scope **scope, struct option_cache *oc, const char *file, int line)
 
int evaluate_boolean_option_cache (int *ignorep, struct packet *packet, struct lease *lease, struct client_state *client_state, struct option_state *in_options, struct option_state *cfg_options, struct binding_scope **scope, struct option_cache *oc, const char *file, int line)
 
int evaluate_boolean_expression_result (int *ignorep, struct packet *packet, struct lease *lease, struct client_state *client_state, struct option_state *in_options, struct option_state *cfg_options, struct binding_scope **scope, struct expression *expr)
 
void expression_dereference (struct expression **eptr, const char *file, int line)
 
int is_boolean_expression (struct expression *expr)
 
int is_data_expression (struct expression *expr)
 
int is_numeric_expression (struct expression *expr)
 
int is_compound_expression (struct expression *expr)
 
int op_precedence (enum expr_op op1, enum expr_op op2)
 
enum expression_context expression_context (struct expression *expr)
 
enum expression_context op_context (enum expr_op op)
 
int write_expression (FILE *file, struct expression *expr, int col, int indent, int firstp)
 
struct bindingfind_binding (struct binding_scope *scope, const char *name)
 
int free_bindings (struct binding_scope *scope, const char *file, int line)
 
int binding_scope_dereference (struct binding_scope **ptr, const char *file, int line)
 
int fundef_dereference (struct fundef **ptr, const char *file, int line)
 
struct bindingcreate_binding (struct binding_scope **scope, const char *name)
 
int bind_ds_value (struct binding_scope **scope, const char *name, struct data_string *value)
 
int find_bound_string (struct data_string *value, struct binding_scope *scope, const char *name)
 
int unset (struct binding_scope *scope, const char *name)
 

Variables

struct binding_scopeglobal_scope
 

Macro Definition Documentation

#define DS_SPRINTF_SIZE   128

Definition at line 43 of file tree.c.

Function Documentation

int bind_ds_value ( struct binding_scope **  scope,
const char *  name,
struct data_string value 
)

Definition at line 4016 of file tree.c.

int binding_scope_dereference ( struct binding_scope **  ptr,
const char *  file,
int  line 
)

Definition at line 3722 of file tree.c.

int binding_value_dereference ( struct binding_value **  v,
const char *  file,
int  line 
)

Definition at line 653 of file tree.c.

pair cons ( caddr_t  car,
pair  cdr 
)

Definition at line 138 of file tree.c.

struct binding* create_binding ( struct binding_scope **  scope,
const char *  name 
)

Definition at line 3985 of file tree.c.

int data_string_sprintfa ( struct data_string ds,
const char *  fmt,
  ... 
)

Definition at line 57 of file tree.c.

int enter_dns_host ( struct dns_host_entry **  dh,
const char *  name 
)

Definition at line 205 of file tree.c.

int evaluate_boolean_expression ( int result,
struct packet packet,
struct lease lease,
struct client_state client_state,
struct option_state in_options,
struct option_state cfg_options,
struct binding_scope **  scope,
struct expression expr 
)

Definition at line 695 of file tree.c.

int evaluate_boolean_expression_result ( int ignorep,
struct packet packet,
struct lease lease,
struct client_state client_state,
struct option_state in_options,
struct option_state cfg_options,
struct binding_scope **  scope,
struct expression expr 
)

Definition at line 2718 of file tree.c.

int evaluate_boolean_option_cache ( int ignorep,
struct packet packet,
struct lease lease,
struct client_state client_state,
struct option_state in_options,
struct option_state cfg_options,
struct binding_scope **  scope,
struct option_cache oc,
const char *  file,
int  line 
)

Definition at line 2670 of file tree.c.

int evaluate_data_expression ( struct data_string result,
struct packet packet,
struct lease lease,
struct client_state client_state,
struct option_state in_options,
struct option_state cfg_options,
struct binding_scope **  scope,
struct expression expr,
const char *  file,
int  line 
)

Definition at line 1114 of file tree.c.

int evaluate_expression ( struct binding_value **  result,
struct packet packet,
struct lease lease,
struct client_state client_state,
struct option_state in_options,
struct option_state cfg_options,
struct binding_scope **  scope,
struct expression expr,
const char *  file,
int  line 
)

Definition at line 501 of file tree.c.

int evaluate_numeric_expression ( unsigned long *  result,
struct packet packet,
struct lease lease,
struct client_state client_state,
struct option_state in_options,
struct option_state cfg_options,
struct binding_scope **  scope,
struct expression expr 
)

Definition at line 2173 of file tree.c.

int evaluate_option_cache ( struct data_string result,
struct packet packet,
struct lease lease,
struct client_state client_state,
struct option_state in_options,
struct option_state cfg_options,
struct binding_scope **  scope,
struct option_cache oc,
const char *  file,
int  line 
)

Definition at line 2643 of file tree.c.

Definition at line 3143 of file tree.c.

void expression_dereference ( struct expression **  eptr,
const char *  file,
int  line 
)

Definition at line 2751 of file tree.c.

struct binding* find_binding ( struct binding_scope scope,
const char *  name 
)

Definition at line 3691 of file tree.c.

int find_bound_string ( struct data_string value,
struct binding_scope scope,
const char *  name 
)

Definition at line 4039 of file tree.c.

int free_bindings ( struct binding_scope scope,
const char *  file,
int  line 
)

Definition at line 3706 of file tree.c.

int fundef_dereference ( struct fundef **  ptr,
const char *  file,
int  line 
)

Definition at line 3765 of file tree.c.

int is_boolean_expression ( struct expression expr)

Definition at line 2969 of file tree.c.

int is_compound_expression ( struct expression expr)

Definition at line 3035 of file tree.c.

int is_data_expression ( struct expression expr)

Definition at line 2986 of file tree.c.

int is_numeric_expression ( struct expression expr)

Definition at line 3016 of file tree.c.

int make_concat ( struct expression **  expr,
struct expression left,
struct expression right 
)

Definition at line 269 of file tree.c.

int make_const_data ( struct expression **  expr,
const unsigned char *  data,
unsigned  len,
int  terminated,
int  allocate,
const char *  file,
int  line 
)

Definition at line 220 of file tree.c.

int make_const_int ( struct expression **  expr,
unsigned long  val 
)

Definition at line 255 of file tree.c.

int make_const_option_cache ( struct option_cache **  oc,
struct buffer **  buffer,
u_int8_t *  data,
unsigned  len,
struct option option,
const char *  file,
int  line 
)

Definition at line 150 of file tree.c.

int make_encapsulation ( struct expression **  expr,
struct data_string name 
)

Definition at line 299 of file tree.c.

int make_host_lookup ( struct expression **  expr,
const char *  name 
)

Definition at line 189 of file tree.c.

int make_let ( struct executable_statement **  result,
const char *  name 
)

Definition at line 378 of file tree.c.

int make_limit ( struct expression **  new,
struct expression expr,
int  limit 
)

Definition at line 332 of file tree.c.

int make_substring ( struct expression **  new,
struct expression expr,
struct expression offset,
struct expression length 
)

Definition at line 314 of file tree.c.

enum expression_context op_context ( enum expr_op  op)

Definition at line 3154 of file tree.c.

int op_precedence ( enum expr_op  op1,
enum expr_op  op2 
)

Definition at line 3137 of file tree.c.

int option_cache ( struct option_cache **  oc,
struct data_string dp,
struct expression expr,
struct option option,
const char *  file,
int  line 
)

Definition at line 364 of file tree.c.

int unset ( struct binding_scope scope,
const char *  name 
)

Definition at line 4070 of file tree.c.

int write_expression ( FILE *  file,
struct expression expr,
int  col,
int  indent,
int  firstp 
)

Definition at line 3234 of file tree.c.

Variable Documentation

struct binding_scope* global_scope

Definition at line 39 of file tree.c.