Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00030 #ifndef CR_DOMAIN_H
00031 #define CR_DOMAIN_H
00032
00033 #include "../../str.h"
00034 #include "../../flags.h"
00035 #include "../../lib/trie/dtrie.h"
00036
00037
00042 struct domain_data_t {
00043 int id;
00044 str * name;
00045 struct dtrie_node_t * tree;
00046 struct dtrie_node_t * failure_tree;
00047 };
00048
00049
00059 struct domain_data_t * create_domain_data(int id, str * domain);
00060
00061
00067 void destroy_domain_data(struct domain_data_t *domain_data);
00068
00069
00101 int add_route_to_tree(struct dtrie_node_t *node, const str * scan_prefix,
00102 flag_t flags, flag_t mask, const str * full_prefix, int max_targets, double prob,
00103 const str * rewrite_hostpart, int strip, const str * rewrite_local_prefix,
00104 const str * rewrite_local_suffix, int status, int hash_index,
00105 int backup, int * backed_up, const str * comment);
00106
00107
00128 int add_failure_route_to_tree(struct dtrie_node_t * failure_node, const str * scan_prefix,
00129 const str * full_prefix, const str * host, const str * reply_code,
00130 const flag_t flags, const flag_t mask, const int next_domain, const str * comment);
00131
00132
00139 int compare_domain_data(const void *v1, const void *v2);
00140
00141
00142 #endif