version 1.3, 2011/08/29 12:00:57
|
version 1.4.8.2, 2012/05/23 14:06:08
|
Line 12 terms:
|
Line 12 terms:
|
All of the documentation and software included in the ELWIX and AITNET |
All of the documentation and software included in the ELWIX and AITNET |
Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org> |
Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org> |
|
|
Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 | Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 |
by Michael Pounov <misho@elwix.org>. All rights reserved. |
by Michael Pounov <misho@elwix.org>. All rights reserved. |
|
|
Redistribution and use in source and binary forms, with or without |
Redistribution and use in source and binary forms, with or without |
Line 182 static prefix_t *New_Prefix2(int family, void *dest, i
|
Line 182 static prefix_t *New_Prefix2(int family, void *dest, i
|
if (family == AF_INET6) { |
if (family == AF_INET6) { |
default_bitlen = 128; |
default_bitlen = 128; |
if (!prefix) { |
if (!prefix) { |
prefix = calloc(1, sizeof(prefix6_t)); | prefix = io_calloc(1, sizeof(prefix6_t)); |
dynamic_allocated++; |
dynamic_allocated++; |
} |
} |
memcpy(&prefix->add.sin6, dest, 16); |
memcpy(&prefix->add.sin6, dest, 16); |
Line 190 static prefix_t *New_Prefix2(int family, void *dest, i
|
Line 190 static prefix_t *New_Prefix2(int family, void *dest, i
|
#endif /* HAVE_IPV6 */ |
#endif /* HAVE_IPV6 */ |
if (family == AF_INET) { |
if (family == AF_INET) { |
if (!prefix) { |
if (!prefix) { |
prefix = calloc(1, sizeof(prefix4_t)); | prefix = io_calloc(1, sizeof(prefix4_t)); |
dynamic_allocated++; |
dynamic_allocated++; |
} |
} |
memcpy(&prefix->add.sin, dest, 4); |
memcpy(&prefix->add.sin, dest, 4); |
Line 313 inline patricia_tree_t *New_Patricia(int maxbits)
|
Line 313 inline patricia_tree_t *New_Patricia(int maxbits)
|
{ |
{ |
patricia_tree_t *patricia; |
patricia_tree_t *patricia; |
|
|
patricia = calloc(1, sizeof *patricia); | patricia = io_calloc(1, sizeof *patricia); |
|
|
patricia->maxbits = maxbits; |
patricia->maxbits = maxbits; |
patricia->head = NULL; |
patricia->head = NULL; |
Line 567 inline patricia_node_t *patricia_lookup(patricia_tree_
|
Line 567 inline patricia_node_t *patricia_lookup(patricia_tree_
|
assert(prefix->bitlen <= patricia->maxbits); |
assert(prefix->bitlen <= patricia->maxbits); |
|
|
if (!patricia->head) { |
if (!patricia->head) { |
node = calloc(1, sizeof *node); | node = io_calloc(1, sizeof *node); |
node->bit = prefix->bitlen; |
node->bit = prefix->bitlen; |
node->prefix = Ref_Prefix(prefix); |
node->prefix = Ref_Prefix(prefix); |
node->parent = NULL; |
node->parent = NULL; |
Line 677 inline patricia_node_t *patricia_lookup(patricia_tree_
|
Line 677 inline patricia_node_t *patricia_lookup(patricia_tree_
|
return node; |
return node; |
} |
} |
|
|
new_node = calloc(1, sizeof *new_node); | new_node = io_calloc(1, sizeof *new_node); |
new_node->bit = prefix->bitlen; |
new_node->bit = prefix->bitlen; |
new_node->prefix = Ref_Prefix (prefix); |
new_node->prefix = Ref_Prefix (prefix); |
new_node->parent = NULL; |
new_node->parent = NULL; |
Line 723 inline patricia_node_t *patricia_lookup(patricia_tree_
|
Line 723 inline patricia_node_t *patricia_lookup(patricia_tree_
|
prefix_toa(prefix), prefix->bitlen); |
prefix_toa(prefix), prefix->bitlen); |
#endif /* PATRICIA_DEBUG */ |
#endif /* PATRICIA_DEBUG */ |
} else { |
} else { |
glue = calloc(1, sizeof *glue); | glue = io_calloc(1, sizeof *glue); |
glue->bit = differ_bit; |
glue->bit = differ_bit; |
glue->prefix = NULL; |
glue->prefix = NULL; |
glue->parent = node->parent; |
glue->parent = node->parent; |