void ipset_iterator_advance(struct ipset_iterator *iterator) { /* If we're already at the end of the iterator, don't do anything. */ if (CORK_UNLIKELY(iterator->finished)) { return; } /* Otherwise, advance the expanded assignment iterator to the next * assignment, and then drill down into it. */ DEBUG("Advancing set iterator"); ipset_expanded_assignment_advance(iterator->assignment_iterator); process_expanded_assignment(iterator); }
/** * Expand the current assignment as IPv4 addresses. */ static void expand_ipv6(struct ipset_iterator *iterator) { unsigned int last_bit; if (iterator->summarize) { last_bit = find_last_non_either_bit (iterator->bdd_iterator->assignment, IPV6_BIT_SIZE); DEBUG("Last non-either bit is %u", last_bit); } else { last_bit = IPV6_BIT_SIZE; } iterator->assignment_iterator = ipset_assignment_expand (iterator->bdd_iterator->assignment, last_bit + 1); iterator->cidr_prefix = last_bit; process_expanded_assignment(iterator); }
static void expand_ipv6(ipset_iterator_t *iterator) { guint last_bit; if (iterator->summarize) { last_bit = find_last_non_either_bit (iterator->bdd_iterator->assignment, IPV6_BIT_SIZE); g_d_debug("Last non-either bit is %u", last_bit); } else { last_bit = IPV6_BIT_SIZE; } iterator->assignment_iterator = ipset_assignment_expand (iterator->bdd_iterator->assignment, last_bit + 1); iterator->netmask = last_bit; process_expanded_assignment(iterator); }