43 log_fatal (
"Can't allocate check of default collection");
49 log_fatal (
"Can't allocate default check expression");
75#if defined (DEBUG_CLASS_MATCHING)
76 log_info (
"checking against class %s...",
class ->
name);
78 memset (&data, 0,
sizeof data);
96#if defined (DEBUG_CLASS_MATCHING)
116 if (status && data.
len) {
121#ifdef LDAP_CONFIGURATION
127#if defined (DEBUG_CLASS_MATCHING)
143#if defined (DEBUG_CLASS_MATCHING)
158 sizeof (
struct lease *),
173 sizeof (
struct lease *)));
206 packet -> raw -> chaddr));
270 for (
i = 0;
i <
class->lease_limit;
i++) {
281 log_error (
"lease %s unbilled with no billing arrangement.",
286 class->leases_consumed--;
303 log_error (
"lease billed with existing billing arrangement.");
307 if (
class -> leases_consumed ==
class -> lease_limit)
310 for (
i = 0;
i <
class -> lease_limit;
i++)
311 if (!
class -> billed_leases [
i])
314 if (
i ==
class -> lease_limit) {
315 log_error (
"class billing consumption disagrees with leases.");
321 class -> leases_consumed++;
void classification_setup()
isc_result_t find_class(struct class **class, const char *name, const char *file, int line)
int bill_class(struct lease *lease, struct class *class)
int check_collection(struct packet *packet, struct lease *lease, struct collection *collection)
struct executable_statement * default_classification_rules
void classify(struct packet *packet, struct class *class)
isc_result_t unlink_class(struct class **class)
void unbill_class(struct lease *lease)
void classify_client(struct packet *packet)
int expression_allocate(struct expression **cptr, const char *file, int line)
int executable_statement_allocate(struct executable_statement **ptr, const char *file, int line)
struct collection default_collection
struct collection * collections
char * print_hw_addr(int htype, const int hlen, const unsigned char *data) const
void data_string_copy(struct data_string *, const struct data_string *, const char *, int)
struct binding_scope * global_scope
#define PACKET_MAX_CLASSES
void data_string_forget(struct data_string *, const char *, int)
int evaluate_boolean_expression_result(int *, struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct binding_scope **, struct expression *)
int group_reference(struct group **, struct group *, const char *, int)
int evaluate_data_expression(struct data_string *, struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct binding_scope **, struct expression *, const char *, int)
void classify(struct packet *, struct class *)
#define print_hex_1(len, data, limit)
int execute_statements(struct binding_value **result, struct packet *packet, struct lease *lease, struct client_state *client_state, struct option_state *in_options, struct option_state *out_options, struct binding_scope **scope, struct executable_statement *statements, struct on_star *on_star)
const char * piaddr(const struct iaddr addr)
void * dmalloc(size_t, const char *, int)
int log_error(const char *,...) __attribute__((__format__(__printf__
void log_fatal(const char *,...) __attribute__((__format__(__printf__
int int log_info(const char *,...) __attribute__((__format__(__printf__
struct expression * submatch
struct lease ** billed_leases
struct class * superclass
struct data_string hash_string
const unsigned char * data
enum executable_statement::statement_op op
union executable_statement::@7 data
struct class * billing_class
struct option_state * options
struct binding_scope * global_scope