version 1.1.1.1, 2013/01/17 10:05:35
|
version 1.6, 2025/08/21 15:43:00
|
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, 2012, 2013 | Copyright 2004 - 2024 |
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 102 typedef struct _patricia_tree_t {
|
Line 102 typedef struct _patricia_tree_t {
|
int num_active_node; /* for debug purpose */ |
int num_active_node; /* for debug purpose */ |
} patricia_tree_t; |
} patricia_tree_t; |
|
|
|
#ifdef __cplusplus |
|
extern "C" { |
|
#endif |
|
|
inline patricia_tree_t *New_Patricia(int maxbits); | patricia_tree_t *New_Patricia(int maxbits); |
inline void Destroy_Patricia(patricia_tree_t *patricia, void_fn_t func); | void Destroy_Patricia(patricia_tree_t *patricia, void_fn_t func); |
inline void Clear_Patricia(patricia_tree_t *patricia, void_fn_t func); | void Clear_Patricia(patricia_tree_t *patricia, void_fn_t func); |
inline prefix_t *Ref_Prefix(prefix_t *prefix); | prefix_t *Ref_Prefix(prefix_t *prefix); |
inline void Deref_Prefix(prefix_t * prefix); | void Deref_Prefix(prefix_t * prefix); |
|
|
inline patricia_node_t *patricia_lookup(patricia_tree_t *patricia, prefix_t *prefix); | patricia_node_t *patricia_lookup(patricia_tree_t *patricia, prefix_t *prefix); |
inline void patricia_remove(patricia_tree_t *patricia, patricia_node_t *node); | void patricia_remove(patricia_tree_t *patricia, patricia_node_t *node); |
inline void patricia_process(patricia_tree_t *patricia, void_fn_t func); | void patricia_process(patricia_tree_t *patricia, void_fn_t func); |
|
|
inline patricia_node_t *patricia_search_exact(patricia_tree_t *patricia, prefix_t *prefix); | patricia_node_t *patricia_search_exact(patricia_tree_t *patricia, prefix_t *prefix); |
inline patricia_node_t *patricia_search_best(patricia_tree_t *patricia, prefix_t *prefix); | patricia_node_t *patricia_search_best(patricia_tree_t *patricia, prefix_t *prefix); |
inline patricia_node_t *patricia_search_best2(patricia_tree_t *patricia, prefix_t *prefix, int inclusive); | patricia_node_t *patricia_search_best2(patricia_tree_t *patricia, prefix_t *prefix, int inclusive); |
|
|
/* { from demo.c */ |
/* { from demo.c */ |
inline char *prefix_toa(prefix_t *prefix); | char *prefix_toa(prefix_t *prefix); |
inline prefix_t *ascii2prefix(int family, char *string); | prefix_t *ascii2prefix(int family, char *string); |
|
|
#define addroute make_and_lookup |
#define addroute make_and_lookup |
inline patricia_node_t *make_and_lookup(patricia_tree_t *tree, char *string); | patricia_node_t *make_and_lookup(patricia_tree_t *tree, char *string); |
#define delroute lookup_then_remove |
#define delroute lookup_then_remove |
inline void lookup_then_remove(patricia_tree_t *tree, char *string); | void lookup_then_remove(patricia_tree_t *tree, char *string); |
inline patricia_node_t *try_search_exact(patricia_tree_t *tree, char *string); | patricia_node_t *try_search_exact(patricia_tree_t *tree, char *string); |
inline patricia_node_t *try_search_best(patricia_tree_t *tree, char *string); | patricia_node_t *try_search_best(patricia_tree_t *tree, char *string); |
/* } */ |
/* } */ |
|
|
/* { from defs.h */ |
/* { from defs.h */ |
Line 184 do { \
|
Line 187 do { \
|
} \ |
} \ |
} \ |
} \ |
} while (0) |
} while (0) |
|
|
|
#ifdef __cplusplus |
|
} |
|
#endif |
|
|
#endif /* __APATRICIA_H */ |
#endif /* __APATRICIA_H */ |