Lines Matching defs:current

662 	uint16_t current = trie->root;
669 uint16_t parent = current;
673 current = child;
676 current_end = TRIE_NODE(trie, current).start + TRIE_NODE(trie, current).length;
678 for (node_idx = TRIE_NODE(trie, current).start;
686 if (node_idx < (TRIE_NODE(trie, current).start + TRIE_NODE(trie, current).length)) {
688 * We did not reach the end of the current node's string.
689 * We need to split the current node into two:
692 * 2. The current node modified to point to the remainder
693 * of the current node's string.
702 * Prefix points to the portion of the current nodes's string that has matched
705 TRIE_NODE(trie, prefix).start = TRIE_NODE(trie, current).start;
706 TRIE_NODE(trie, prefix).length = (node_idx - TRIE_NODE(trie, current).start);
709 * Prefix has the current node as the child corresponding to the first byte
717 TRIE_CHILD(trie, prefix, TRIE_BYTE(trie, node_idx)) = current;
723 TRIE_NODE(trie, current).start = node_idx;
724 TRIE_NODE(trie, current).length -= TRIE_NODE(trie, prefix).length;
727 current = prefix;
733 * If the current node has children, iterate to the child corresponding
736 if (TRIE_NODE(trie, current).child_map != NULL_TRIE_IDX) {
737 child = TRIE_CHILD(trie, current, TRIE_BYTE(trie, string_idx));
757 /* Set the new leaf as the child of the current node */
758 if (TRIE_NODE(trie, current).child_map == NULL_TRIE_IDX) {
759 TRIE_NODE(trie, current).child_map = trie_child_map_alloc(trie);
760 if (TRIE_NODE(trie, current).child_map == NULL_TRIE_IDX) {
765 TRIE_CHILD(trie, current, TRIE_BYTE(trie, TRIE_NODE(trie, leaf).start)) = leaf;
766 current = leaf;
769 return current;
775 uint16_t current = trie->root;
778 while (current != NULL_TRIE_IDX) {
780 uint16_t node_end = TRIE_NODE(trie, current).start + TRIE_NODE(trie, current).length;
783 for (node_idx = TRIE_NODE(trie, current).start;
789 return current; /* Got an exact match */
790 } else if (TRIE_NODE(trie, current).child_map != NULL_TRIE_IDX) {
791 next = TRIE_CHILD(trie, current, string_bytes[string_idx]);
794 current = next;
1758 /* Re-set the current trie */
2661 /* Dis-associate the flow divert control block from its current socket */