* \param key_stream Data that has to be wrapped in a SCRadixPrefix instance to
* be processed for insertion/lookup/removal of a node by the
* radix tree
- * \param key_bitlen The bitlen of the the above stream. For example if the
+ * \param key_bitlen The bitlen of the above stream. For example if the
* stream holds the ipv4 address(4 bytes), bitlen would be 32
* \param user Pointer to the user data that has to be associated with
* this key
* \brief Creates a new Radix tree
*
* \param Free Function pointer supplied by the user to be used by the Radix
- * cleanup API to free the user suppplied data
+ * cleanup API to free the user supplied data
*
* \retval tree The newly created radix tree on success
*
* \brief Adds a key to the Radix tree. Used internally by the API.
*
* \param key_stream Data that has to added to the Radix tree
- * \param key_bitlen The bitlen of the the above stream. For example if the
+ * \param key_bitlen The bitlen of the above stream. For example if the
* stream is the string "abcd", the bitlen would be 32. If
* the stream is an IPV6 address bitlen would be 128
* \param tree Pointer to the Radix tree
node->parent = new_node;
/* stick our new_node into the tree. Create a node that holds the
* differing bit position and break the branch. Also handle the
- * tranfer of netmasks between node and inter_node(explained in more
+ * transfer of netmasks between node and inter_node(explained in more
* detail below) */
} else {
inter_node = SCRadixCreateNode();
* \brief Removes a key from the Radix tree
*
* \param key_stream Data that has to be removed from the Radix tree
- * \param key_bitlen The bitlen of the the above stream. For example if the
+ * \param key_bitlen The bitlen of the above stream. For example if the
* stream holds an IPV4 address(4 bytes), bitlen would be 32
* \param tree Pointer to the Radix tree from which the key has to be
* removed
* \brief Removes a key from the Radix tree
*
* \param key_stream Data that has to be removed from the Radix tree
- * \param key_bitlen The bitlen of the the above stream.
+ * \param key_bitlen The bitlen of the above stream.
* \param tree Pointer to the Radix tree from which the key has to be
* removed
*/
/* add a key that already exists in the tree */
SCRadixAddKeyIPV4((uint8_t *)&servaddr.sin_addr, tree, NULL);
- /* test for the existance of a key */
+ /* test for the existence of a key */
memset(&servaddr, 0, sizeof(servaddr));
if (inet_pton(AF_INET, "192.168.1.6", &servaddr.sin_addr) <= 0)
return 0;
result &= (SCRadixFindKeyIPV4ExactMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) == NULL);
- /* test for the existance of a key */
+ /* test for the existence of a key */
memset(&servaddr, 0, sizeof(servaddr));
if (inet_pton(AF_INET, "192.167.1.4", &servaddr.sin_addr) <= 0)
return 0;
return 0;
SCRadixAddKeyIPV6((uint8_t *)&servaddr.sin6_addr, tree, NULL);
- /* test for existance */
+ /* test for existence */
memset(&servaddr, 0, sizeof(servaddr));
if (inet_pton(AF_INET6, "1111:A21B:6221:BDEA:BBBA::DBAA:9861",
&servaddr.sin6_addr) <= 0)
return 0;
SCRadixRemoveKeyIPV6((uint8_t *)&servaddr.sin6_addr, tree);
- /* test for existance */
+ /* test for existence */
memset(&servaddr, 0, sizeof(servaddr));
if (inet_pton(AF_INET6, "2003:0BF1:5346:BDEA:7422:8713:9124:2315",
&servaddr.sin6_addr) <= 0)
return 0;
SCRadixRemoveKeyIPV6((uint8_t *)&servaddr.sin6_addr, tree);
- /* test for existance */
+ /* test for existence */
memset(&servaddr, 0, sizeof(servaddr));
if (inet_pton(AF_INET6, "2003:0BF1:5346:BDEA:7422:8713:9124:2315",
&servaddr.sin6_addr) <= 0)
return 0;
SCRadixAddKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, NULL, 16);
- /* test for the existance of a key */
+ /* test for the existence of a key */
memset(&servaddr, 0, sizeof(servaddr));
if (inet_pton(AF_INET, "192.168.1.6", &servaddr.sin_addr) <= 0)
return 0;
SCRadixPrintTree(tree);
- /* test for the existance of a key */
+ /* test for the existence of a key */
memset(&servaddr, 0, sizeof(servaddr));
if (inet_pton(AF_INET, "192.171.128.53", &servaddr.sin_addr) <= 0)
return 0;
return 0;
node = SCRadixAddKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, NULL, 0);
- /* test for the existance of a key */
+ /* test for the existence of a key */
memset(&servaddr, 0, sizeof(servaddr));
if (inet_pton(AF_INET, "192.171.128.53", &servaddr.sin_addr) <= 0)
return 0;
return 0;
SCRadixAddKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, NULL, 32);
- /* test for the existance of a key */
+ /* test for the existence of a key */
memset(&servaddr, 0, sizeof(servaddr));
if (inet_pton(AF_INET, "192.171.128.53", &servaddr.sin_addr) <= 0)
return 0;
PASS;
}
-
/**
* \test SCRadixTestIPV4NetblockInsertion15 insert a node searching on it.
- * Should always return true but the purposse of the test is to monitor
+ * Should always return true but the purpose of the test is to monitor
* the memory usage to detect memleaks (there was one on searching)
*/
static int SCRadixTestIPV4NetblockInsertion25(void)
return 0;
SCRadixAddKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, NULL, 16);
- /* test for the existance of a key */
+ /* test for the existence of a key */
memset(&servaddr, 0, sizeof(servaddr));
if (inet_pton(AF_INET, "192.168.128.53", &servaddr.sin_addr) <= 0)
return 0;
/**
* \test SCRadixTestIPV4NetblockInsertion26 insert a node searching on it.
- * Should always return true but the purposse of the test is to monitor
+ * Should always return true but the purpose of the test is to monitor
* the memory usage to detect memleaks (there was one on searching)
*/
static int SCRadixTestIPV4NetblockInsertion26(void)
node = SCRadixAddKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, str, 7);
FAIL_IF_NULL(node);
- /* test for the existance of a key */
- //result &= (SCRadixFindKeyIPV4BestMatch((uint8_t *)&servaddr.sin_addr, tree) != NULL);
+ /* test for the existence of a key */
+ // result &= (SCRadixFindKeyIPV4BestMatch((uint8_t *)&servaddr.sin_addr, tree) != NULL);
SCRadixReleaseRadixTree(tree);