示例#1
0
/**
 * 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);
}
示例#2
0
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);
}