MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rn_search

Function rn_search

freebsd/net/radix.c:144–157  ·  view source on GitHub ↗

* Search a node in the tree matching the key. */

Source from the content-addressed store, hash-verified

142 * Search a node in the tree matching the key.
143 */
144static struct radix_node *
145rn_search(void *v_arg, struct radix_node *head)
146{
147 struct radix_node *x;
148 caddr_t v;
149
150 for (x = head, v = v_arg; x->rn_bit >= 0;) {
151 if (x->rn_bmask & v[x->rn_offset])
152 x = x->rn_right;
153 else
154 x = x->rn_left;
155 }
156 return (x);
157}
158
159/*
160 * Same as above, but with an additional mask.

Callers 3

rn_insertFunction · 0.85
rn_addmaskFunction · 0.85
rn_deleteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected