* This was then yanked out of the ratbox/devel/src tree and stuffed into
* libratbox and had function names changed, but otherwise not really altered.
*
* This was then yanked out of the ratbox/devel/src tree and stuffed into
* libratbox and had function names changed, but otherwise not really altered.
*
* Dave Plonka <plonka@doit.wisc.edu>
*
* This product includes software developed by the University of Michigan,
* Dave Plonka <plonka@doit.wisc.edu>
*
* This product includes software developed by the University of Michigan,
#define PREFIX_HEAP_COUNT 1024
#define NODE_HEAP_COUNT 1024
#define PATRICIA_HEAP_COUNT 128
#define PREFIX_HEAP_COUNT 1024
#define NODE_HEAP_COUNT 1024
#define PATRICIA_HEAP_COUNT 128
-prefix_toa2x(rb_prefix_t * prefix, char *buf, int buf_len, int with_len)
+prefix_toa2x(rb_prefix_t *prefix, char *buf, int buf_len, int with_len)
return (buf);
}
inet_ntop(prefix->family, &prefix->add.sin, buf, buf_len);
return (buf);
}
inet_ntop(prefix->family, &prefix->add.sin, buf, buf_len);
{
return (prefix_toa2x(prefix, buff, buf_len, 0));
}
{
return (prefix_toa2x(prefix, buff, buf_len, 0));
}
-New_Prefix2(int family, void *dest, int bitlen, rb_prefix_t * prefix)
+New_Prefix2(int family, void *dest, int bitlen, rb_prefix_t *prefix)
fprintf(stderr, "patricia_search_best: stop at %s/%d\n",
prefix_toa(node->prefix), node->prefix->bitlen);
else
fprintf(stderr, "patricia_search_best: stop at %s/%d\n",
prefix_toa(node->prefix), node->prefix->bitlen);
else
{
rb_patricia_node_t *node, *new_node, *parent, *glue;
uint8_t *addr, *test_addr;
{
rb_patricia_node_t *node, *new_node, *parent, *glue;
uint8_t *addr, *test_addr;
"patricia_lookup: take right %s/%d\n",
prefix_toa(node->prefix), node->prefix->bitlen);
else
"patricia_lookup: take right %s/%d\n",
prefix_toa(node->prefix), node->prefix->bitlen);
else
"patricia_lookup: take left %s/%d\n",
prefix_toa(node->prefix), node->prefix->bitlen);
else
"patricia_lookup: take left %s/%d\n",
prefix_toa(node->prefix), node->prefix->bitlen);
else
fprintf(stderr, "patricia_lookup: up to %s/%d\n",
prefix_toa(node->prefix), node->prefix->bitlen);
else
fprintf(stderr, "patricia_lookup: up to %s/%d\n",
prefix_toa(node->prefix), node->prefix->bitlen);
else
if((prefix = New_Prefix(family, ipptr, len)) != NULL)
{
node = rb_patricia_search_best(tree, prefix);
if((prefix = New_Prefix(family, ipptr, len)) != NULL)
{
node = rb_patricia_search_best(tree, prefix);
if((prefix = New_Prefix(family, ipptr, len)) != NULL)
{
node = rb_patricia_search_exact(tree, prefix);
if((prefix = New_Prefix(family, ipptr, len)) != NULL)
{
node = rb_patricia_search_exact(tree, prefix);