For the latest stable version, please use Emilua API 0.10!

ip.address_info_flag

This module contains flag constants useful to name resolvers.

The following example demonstrates how you can use these flags in other modules:

ip.tcp.get_address_info(
    'www.example.com',
    'http',
    ip.address_info_flag.address_configured
)
ip.tcp.get_address_info(
    'www.example.com',
    80,
    bit.bor(
        ip.address_info_flag.all_matching,
        ip.address_info_flag.v4_mapped
    )
)

address_configured

Only return IPv4 addresses if a non-loopback IPv4 address is configured for the system. Only return IPv6 addresses if a non-loopback IPv6 address is configured for the system.

all_matching

If used with v4_mapped, return all matching IPv6 and IPv4 addresses.

canonical_name

Determine the canonical name of the host specified in the query.

passive

Indicate that returned endpoint is intended for use as a locally bound socket endpoint.

v4_mapped

If the query protocol family is specified as IPv6, return IPv4-mapped IPv6 addresses on finding no IPv6 addresses.