Go to the source code of this file.

## Classes | |

struct | squid_radix_node |

struct | squid_radix_mask |

struct | squid_radix_node_head |

## Macros | |

#define | RNF_NORMAL 1 /* leaf contains normal route */ |

#define | RNF_ROOT 2 /* leaf is root leaf for tree */ |

#define | RNF_ACTIVE 4 /* This node is alive (for rtfree) */ |

#define | rn_key rn_u.rn_leaf.rn_Key |

#define | rn_mask rn_u.rn_leaf.rn_Mask |

## Macro Definition Documentation

## ◆ rn_key

## ◆ rn_mask

## ◆ RNF_ACTIVE

## ◆ RNF_NORMAL

## ◆ RNF_ROOT

## Function Documentation

## ◆ squid_rn_addmask()

SQUIDCEXTERN struct squid_radix_node* squid_rn_addmask | ( | void * | , |

int | , | ||

int | |||

) |

Definition at line 414 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()

SQUIDCEXTERN struct squid_radix_node* squid_rn_addroute | ( | void * | , |

void * | , | ||

struct squid_radix_node_head * | , | ||

struct squid_radix_node | [2] | ||

) |

Definition at line 520 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()

SQUIDCEXTERN struct squid_radix_node* squid_rn_delete | ( | void * | , |

void * | , | ||

struct squid_radix_node_head * | |||

) |

Definition at line 665 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()

SQUIDCEXTERN void squid_rn_init | ( | void | ) |

Definition at line 884 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()

SQUIDCEXTERN int squid_rn_inithead | ( | struct squid_radix_node_head ** | , |

int | |||

) |

Definition at line 854 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()

SQUIDCEXTERN struct squid_radix_node* squid_rn_insert | ( | void * | , |

struct squid_radix_node_head * | , | ||

int * | , | ||

struct squid_radix_node | [2] | ||

) |

Definition at line 358 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()

SQUIDCEXTERN struct squid_radix_node* squid_rn_lookup | ( | void * | , |

void * | , | ||

struct squid_radix_node_head * | |||

) |

Definition at line 207 of file radix.c.

References head, squid_rn_addmask(), and squid_rn_match().

Referenced by asnAddNet(), and squid_rn_inithead().

## ◆ squid_rn_match()

SQUIDCEXTERN struct squid_radix_node* squid_rn_match | ( | void * | , |

struct squid_radix_node_head * | |||

) |

Definition at line 245 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()

SQUIDCEXTERN struct squid_radix_node* squid_rn_newpair | ( | void * | , |

int | , | ||

struct squid_radix_node | [2] | ||

) |

Definition at line 344 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()

SQUIDCEXTERN int squid_rn_refines | ( | void * | , |

void * | |||

) |

## ◆ squid_rn_search()

SQUIDCEXTERN struct squid_radix_node* squid_rn_search | ( | void * | , |

struct squid_radix_node * | |||

) |

Definition at line 152 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()

SQUIDCEXTERN struct squid_radix_node* squid_rn_search_m | ( | void * | , |

struct squid_radix_node * | , | ||

void * | |||

) |

Definition at line 166 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()

SQUIDCEXTERN int squid_rn_walktree | ( | struct squid_radix_node_head * | , |

int(*)(struct squid_radix_node *, void *) | , | ||

void * | |||

) |

Definition at line 818 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().