Go to the source code of this file.
Macros | |
#define | rn_masktop (squid_mask_rnhead->rnh_treetop) |
#define | rn_dupedkey rn_u.rn_leaf.rn_Dupedkey |
#define | rn_off rn_u.rn_node.rn_Off |
#define | rn_l rn_u.rn_node.rn_L |
#define | rn_r rn_u.rn_node.rn_R |
#define | rm_mask rm_rmu.rmu_mask |
#define | rm_leaf rm_rmu.rmu_leaf /* extra field would make 32 bytes */ |
#define | squid_R_Malloc(p, t, n) (p = (t) xmalloc((unsigned int)(n))) |
#define | squid_Free(p) xfree((char *)p) |
#define | squid_MKGet(m) |
#define | squid_MKFree(m) { (m)->rm_mklist = squid_rn_mkfreelist; squid_rn_mkfreelist = (m);} |
#define | min(x, y) ((x)<(y)? (x) : (y)) |
Variables | |
int | squid_max_keylen |
struct squid_radix_mask * | squid_rn_mkfreelist |
struct squid_radix_node_head * | squid_mask_rnhead |
static char * | addmask_key |
static unsigned char | normal_chars [] = {0, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xFF} |
static char * | rn_zeros |
static char * | rn_ones |
Macro Definition Documentation
◆ min
◆ rm_leaf
#define rm_leaf rm_rmu.rmu_leaf /* extra field would make 32 bytes */ |
◆ rm_mask
◆ rn_dupedkey
◆ rn_l
◆ rn_masktop
#define rn_masktop (squid_mask_rnhead->rnh_treetop) |
◆ rn_off
◆ rn_r
◆ squid_Free
◆ squid_MKFree
#define squid_MKFree | ( | m | ) | { (m)->rm_mklist = squid_rn_mkfreelist; squid_rn_mkfreelist = (m);} |
◆ squid_MKGet
#define squid_MKGet | ( | m | ) |
◆ squid_R_Malloc
Function Documentation
◆ rn_lexobetter()
|
static |
Definition at line 484 of file radix.c.
Referenced by squid_rn_addroute().
◆ rn_new_radix_mask()
|
static |
Definition at line 498 of file radix.c.
References squid_radix_mask::rm_b, squid_radix_mask::rm_flags, squid_radix_mask::rm_mklist, squid_radix_node::rn_b, squid_radix_node::rn_flags, squid_radix_node::rn_mklist, RNF_NORMAL, and squid_MKGet.
Referenced by squid_rn_addroute().
◆ rn_satsifies_leaf()
|
static |
Definition at line 224 of file radix.c.
Referenced by squid_rn_match().
◆ squid_rn_addmask()
struct squid_radix_node * squid_rn_addmask | ( | void * | n_arg, |
int | search, | ||
int | skip | ||
) |
Definition at line 413 of file radix.c.
References addmask_key, normal_chars, squid_radix_node::rn_b, squid_radix_node::rn_flags, rn_masktop, rn_ones, RNF_NORMAL, squid_radix_node_head::rnh_nodes, squid_Free, squid_mask_rnhead, squid_max_keylen, squid_R_Malloc, squid_rn_insert(), and squid_rn_search().
Referenced by squid_rn_addroute(), squid_rn_delete(), and squid_rn_lookup().
◆ squid_rn_addroute()
struct squid_radix_node * squid_rn_addroute | ( | void * | v_arg, |
void * | n_arg, | ||
struct squid_radix_node_head * | head, | ||
struct squid_radix_node | treenodes[2] | ||
) |
Definition at line 519 of file radix.c.
References head, NULL, squid_radix_mask::rm_b, squid_radix_mask::rm_flags, squid_radix_mask::rm_mklist, squid_radix_mask::rm_refs, squid_radix_node::rn_b, squid_radix_node::rn_flags, rn_lexobetter(), squid_radix_node::rn_mklist, rn_new_radix_mask(), squid_radix_node::rn_p, RNF_ACTIVE, RNF_NORMAL, squid_rn_addmask(), squid_rn_insert(), and squid_rn_refines().
Referenced by asnAddNet(), and squid_rn_inithead().
◆ squid_rn_delete()
struct squid_radix_node * squid_rn_delete | ( | void * | v_arg, |
void * | netmask_arg, | ||
struct squid_radix_node_head * | head | ||
) |
Definition at line 664 of file radix.c.
References assert, head, NULL, squid_radix_mask::rm_mklist, squid_radix_mask::rm_refs, squid_radix_node::rn_b, squid_radix_node::rn_flags, squid_radix_node::rn_mklist, squid_radix_node::rn_p, RNF_ACTIVE, RNF_NORMAL, RNF_ROOT, squid_MKFree, squid_rn_addmask(), and squid_rn_search().
Referenced by destroyRadixNode(), and squid_rn_inithead().
◆ squid_rn_init()
void squid_rn_init | ( | void | ) |
Definition at line 883 of file radix.c.
References addmask_key, NULL, rn_ones, rn_zeros, squid_mask_rnhead, squid_max_keylen, squid_R_Malloc, and squid_rn_inithead().
Referenced by asnInit().
◆ squid_rn_inithead()
int squid_rn_inithead | ( | struct squid_radix_node_head ** | head, |
int | off | ||
) |
Definition at line 853 of file radix.c.
References head, squid_radix_node::rn_b, squid_radix_node::rn_flags, rn_ones, squid_radix_node::rn_p, rn_zeros, RNF_ACTIVE, RNF_ROOT, squid_radix_node_head::rnh_addaddr(), squid_radix_node_head::rnh_deladdr(), squid_radix_node_head::rnh_lookup(), squid_radix_node_head::rnh_matchaddr(), squid_radix_node_head::rnh_nodes, squid_radix_node_head::rnh_treetop, squid_radix_node_head::rnh_walktree(), squid_R_Malloc, squid_rn_addroute(), squid_rn_delete(), squid_rn_lookup(), squid_rn_match(), squid_rn_newpair(), and squid_rn_walktree().
Referenced by asnInit(), and squid_rn_init().
◆ squid_rn_insert()
struct squid_radix_node * squid_rn_insert | ( | void * | v_arg, |
struct squid_radix_node_head * | head, | ||
int * | dupentry, | ||
struct squid_radix_node | nodes[2] | ||
) |
Definition at line 357 of file radix.c.
References head, int, squid_radix_node::rn_b, squid_radix_node::rn_bmask, squid_radix_node::rn_p, squid_rn_newpair(), and squid_rn_search().
Referenced by squid_rn_addmask(), and squid_rn_addroute().
◆ squid_rn_lookup()
struct squid_radix_node * squid_rn_lookup | ( | void * | v_arg, |
void * | m_arg, | ||
struct squid_radix_node_head * | head | ||
) |
Definition at line 206 of file radix.c.
References head, NULL, squid_rn_addmask(), and squid_rn_match().
Referenced by asnAddNet(), and squid_rn_inithead().
◆ squid_rn_match()
struct squid_radix_node * squid_rn_match | ( | void * | v_arg, |
struct squid_radix_node_head * | head | ||
) |
Definition at line 244 of file radix.c.
References head, min, squid_radix_mask::rm_b, squid_radix_mask::rm_flags, squid_radix_mask::rm_mklist, squid_radix_node::rn_b, squid_radix_node::rn_bmask, squid_radix_node::rn_flags, squid_radix_node::rn_mklist, squid_radix_node::rn_p, rn_satsifies_leaf(), RNF_NORMAL, RNF_ROOT, and squid_rn_search_m().
Referenced by asnAddNet(), asnMatchIp(), squid_rn_inithead(), and squid_rn_lookup().
◆ squid_rn_newpair()
struct squid_radix_node * squid_rn_newpair | ( | void * | v, |
int | b, | ||
struct squid_radix_node | nodes[2] | ||
) |
Definition at line 343 of file radix.c.
References squid_radix_node::rn_b, squid_radix_node::rn_flags, squid_radix_node::rn_p, and RNF_ACTIVE.
Referenced by squid_rn_inithead(), and squid_rn_insert().
◆ squid_rn_refines()
int squid_rn_refines | ( | void * | m_arg, |
void * | n_arg | ||
) |
◆ squid_rn_search()
struct squid_radix_node * squid_rn_search | ( | void * | v_arg, |
struct squid_radix_node * | head | ||
) |
Definition at line 151 of file radix.c.
References head, squid_radix_node::rn_b, and squid_radix_node::rn_bmask.
Referenced by squid_rn_addmask(), squid_rn_delete(), and squid_rn_insert().
◆ squid_rn_search_m()
struct squid_radix_node * squid_rn_search_m | ( | void * | v_arg, |
struct squid_radix_node * | head, | ||
void * | m_arg | ||
) |
Definition at line 165 of file radix.c.
References head, squid_radix_node::rn_b, and squid_radix_node::rn_bmask.
Referenced by squid_rn_match().
◆ squid_rn_walktree()
int squid_rn_walktree | ( | struct squid_radix_node_head * | h, |
int(*)(struct squid_radix_node *, void *) | f, | ||
void * | w | ||
) |
Definition at line 817 of file radix.c.
References error(), squid_radix_node::rn_b, squid_radix_node::rn_flags, squid_radix_node::rn_p, RNF_ROOT, and squid_radix_node_head::rnh_treetop.
Referenced by asnFreeMemory(), asnStats(), and squid_rn_inithead().
Variable Documentation
◆ addmask_key
|
static |
Definition at line 87 of file radix.c.
Referenced by squid_rn_addmask(), and squid_rn_init().
◆ normal_chars
|
static |
Definition at line 88 of file radix.c.
Referenced by squid_rn_addmask().
◆ rn_ones
|
static |
Definition at line 89 of file radix.c.
Referenced by rn_satsifies_leaf(), squid_rn_addmask(), squid_rn_init(), and squid_rn_inithead().
◆ rn_zeros
|
static |
Definition at line 89 of file radix.c.
Referenced by squid_rn_init(), and squid_rn_inithead().
◆ squid_mask_rnhead
struct squid_radix_node_head* squid_mask_rnhead |
Definition at line 86 of file radix.c.
Referenced by squid_rn_addmask(), and squid_rn_init().
◆ squid_max_keylen
int squid_max_keylen |
Definition at line 84 of file radix.c.
Referenced by squid_rn_addmask(), and squid_rn_init().
◆ squid_rn_mkfreelist
struct squid_radix_mask* squid_rn_mkfreelist |