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

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

Definition at line 62 of file radix.h.

Referenced by squid_rn_addroute(), squid_rn_delete(), squid_rn_inithead(), and squid_rn_newpair().

## ◆ RNF_NORMAL

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

Definition at line 60 of file radix.h.

Referenced by rn_new_radix_mask(), squid_rn_addmask(), squid_rn_addroute(), squid_rn_delete(), and squid_rn_match().

## ◆ RNF_ROOT

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

Definition at line 61 of file radix.h.

Referenced by destroyRadixNode(), squid_rn_delete(), squid_rn_inithead(), squid_rn_match(), and squid_rn_walktree().

## Function Documentation

## ◆ squid_rn_addmask()

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

int | , | ||

int | |||

) |

Definition at line 437 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_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 543 of file radix.c.

References 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_radix_node_head::rnh_treetop, 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 696 of file radix.c.

References assert, NULL, p, 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_radix_node_head::rnh_treetop, 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 941 of file radix.c.

References addmask_key, NULL, rn_ones, rn_zeros, 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 911 of file radix.c.

References 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 372 of file radix.c.

References int, log(), p, squid_radix_node::rn_b, squid_radix_node::rn_bmask, squid_radix_node::rn_p, squid_radix_node_head::rnh_treetop, 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 squid_radix_node_head::rnh_treetop, 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 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, squid_radix_node_head::rnh_treetop, 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 351 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 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 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 875 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().