Go to the documentation of this file.
26 #ifndef SURICATA_UTIL_RADIX4_TREE_H
27 #define SURICATA_UTIL_RADIX4_TREE_H
78 #define SC_RADIX4_TREE_INITIALIZER \
97 const SCRadix4Tree *,
const uint8_t *,
const uint8_t,
void **);
107 const SCRadix4Node *node,
void *user_data,
const uint8_t netmask,
void *data);
void SCRadix4RemoveKeyIPV4Netblock(SCRadix4Tree *, const SCRadix4Config *, const uint8_t *, uint8_t)
Removes an IPV4 address netblock key from the Radix4 tree.
Structure for the node in the radix tree.
void SCRadix4PrintNodeInfo(SCRadix4Node *, int, void(*PrintData)(void *))
struct SCRadix4Node_ * parent
void(* PrintData)(void *)
Structure that hold the user data and the netmask associated with it.
SCRadix4Node * SCRadix4TreeFindExactMatch(const SCRadix4Tree *, const uint8_t *, void **)
void SCRadix4PrintTree(SCRadix4Tree *, const SCRadix4Config *config)
SCRadix4Node * SCRadix4TreeFindBestMatch(const SCRadix4Tree *, const uint8_t *, void **)
struct RadixUserData * user_data
struct SCRadix4Config_ SCRadix4Config
void SCRadix4RemoveKeyIPV4(SCRadix4Tree *, const SCRadix4Config *, const uint8_t *)
Removes an IPV4 address key(not a netblock) from the Radix4 tree. Instead of using this function,...
struct SCRadix4Node_ SCRadix4Node
Structure for the node in the radix tree.
Structure for the radix tree.
SCRadix4Tree SCRadix4TreeInitialize(void)
bool SCRadix4CompareTrees(const SCRadix4Tree *t1, const SCRadix4Tree *t2, SCRadix4TreeCompareFunc Callback)
bool(* SCRadix4TreeCompareFunc)(const void *ud1, const void *ud2)
compare content of 2 user data entries
int SCRadix4ForEachNode(const SCRadix4Tree *tree, SCRadix4ForEachNodeFunc Callback, void *data)
bool SCRadix4AddKeyIPV4String(SCRadix4Tree *, const SCRadix4Config *, const char *, void *)
Adds a new IPV4/netblock to the Radix4 tree from a string.
void SCRadix4TreeRelease(SCRadix4Tree *, const SCRadix4Config *)
void SCRadix4RegisterTests(void)
SCRadix4Node * SCRadix4TreeFindBestMatch2(const SCRadix4Tree *, const uint8_t *, void **, uint8_t *)
SCRadix4Node * SCRadix4AddKeyIPV4(SCRadix4Tree *, const SCRadix4Config *, const uint8_t *, void *)
Adds a new IPV4 address to the Radix4 tree.
int(* SCRadix4ForEachNodeFunc)(const SCRadix4Node *node, void *user_data, const uint8_t netmask, void *data)
struct SCRadix4Node_ * right
struct SCRadix4Tree_ SCRadix4Tree
Structure for the radix tree.
SCRadix4Node * SCRadix4TreeFindNetblock(const SCRadix4Tree *, const uint8_t *, const uint8_t, void **)
struct SCRadix4Node_ * left
SCRadix4Node * SCRadix4AddKeyIPV4Netblock(SCRadix4Tree *, const SCRadix4Config *, const uint8_t *, uint8_t, void *)
Adds a new IPV4 netblock to the Radix4 tree.