Go to the documentation of this file.
24 #ifndef SURICATA_UTIL_RADIX_TREE_H
25 #define SURICATA_UTIL_RADIX_TREE_H
27 #define SC_RADIX_BITTEST(x, y) ((x) & (y))
SCRadixUserData * user_data
void SCRadixRemoveKeyIPV4(uint8_t *, SCRadixTree *)
Removes an IPV4 address key(not a netblock) from the Radix tree. Instead of using this function,...
void SCRadixRemoveKeyIPV6(uint8_t *, SCRadixTree *)
Removes an IPV6 address key(not a netblock) from the Radix tree. Instead of using this function,...
bool SCRadixAddKeyIPV4String(const char *, SCRadixTree *, void *)
Adds a new IPV4/netblock to the Radix tree from a string.
void SCRadixRemoveKeyIPV4Netblock(uint8_t *, SCRadixTree *, uint8_t)
Removes an IPV4 address netblock key from the Radix tree.
struct SCRadixUserData_ SCRadixUserData
Structure that hold the user data and the netmask associated with it.
SCRadixNode * SCRadixAddKeyIPV6(uint8_t *, SCRadixTree *, void *)
Adds a new IPV6 address to the Radix tree.
SCRadixNode * SCRadixFindKeyIPV4ExactMatch(uint8_t *, SCRadixTree *, void **)
Checks if an IPV4 address is present in the tree.
Structure for the prefix/key in the radix tree.
Structure for the radix tree.
struct SCRadixTree_ SCRadixTree
Structure for the radix tree.
SCRadixNode * SCRadixAddKeyIPV4Netblock(uint8_t *, SCRadixTree *, void *, uint8_t)
Adds a new IPV4 netblock to the Radix tree.
struct SCRadixUserData_ * next
struct SCRadixNode_ * right
SCRadixNode * SCRadixFindKeyIPV6ExactMatch(uint8_t *, SCRadixTree *, void **)
Checks if an IPV6 address is present in the tree.
struct SCRadixPrefix_ SCRadixPrefix
Structure for the prefix/key in the radix tree.
void SCRadixReleaseRadixTree(SCRadixTree *)
Frees a Radix tree and all its nodes.
SCRadixNode * SCRadixAddKeyIPV6Netblock(uint8_t *, SCRadixTree *, void *, uint8_t)
Adds a new IPV6 netblock to the Radix tree.
void SCRadixPrintTree(SCRadixTree *)
Prints the Radix Tree. While printing the radix tree we use the following format.
Structure that hold the user data and the netmask associated with it.
SCRadixNode * SCRadixFindKeyIPV4Netblock(uint8_t *, SCRadixTree *, uint8_t, void **)
Checks if an IPV4 Netblock address is present in the tree.
SCRadixNode * SCRadixFindKeyIPV6Netblock(uint8_t *, SCRadixTree *, uint8_t, void **)
Checks if an IPV6 Netblock address is present in the tree.
SCRadixNode * SCRadixFindKeyIPV6BestMatch(uint8_t *, SCRadixTree *, void **)
Checks if an IPV6 address is present in the tree under a netblock.
void(* PrintData)(void *)
void SCRadixPrintNodeInfo(SCRadixNode *, int, void(*PrintData)(void *))
Prints the node information from a Radix tree.
SCRadixTree * SCRadixCreateRadixTree(void(*Free)(void *), void(*PrintData)(void *))
Creates a new Radix tree.
Structure for the node in the radix tree.
void SCRadixRegisterTests(void)
struct SCRadixNode_ SCRadixNode
Structure for the node in the radix tree.
struct SCRadixNode_ * parent
SCRadixNode * SCRadixFindKeyIPV4BestMatch(uint8_t *, SCRadixTree *, void **)
Checks if an IPV4 address is present in the tree under a netblock.
void SCRadixRemoveKeyIPV6Netblock(uint8_t *, SCRadixTree *, uint8_t)
Removes an IPV6 netblock address key from the Radix tree.
bool SCRadixAddKeyIPV6String(const char *, SCRadixTree *, void *)
Adds a new IPV6/netblock to the Radix tree from a string.
struct SCRadixNode_ * left
SCRadixNode * SCRadixAddKeyIPV4(uint8_t *, SCRadixTree *, void *)
Adds a new IPV4 address to the Radix tree.