21 Internet protocol [internet]

21.16 Class ip::resolver_base [internet.resolver.base]

namespace std {
namespace experimental {
namespace net {
inline namespace v1 {
namespace ip {

  class resolver_base
  {
  public:
    using flags = T1;
    static const flags passive;
    static const flags canonical_name;
    static const flags numeric_host;
    static const flags numeric_service;
    static const flags v4_mapped;
    static const flags all_matching;
    static const flags address_configured;

  protected:
    resolver_base();
    ~resolver_base();
  };

} // namespace ip
} // inline namespace v1
} // namespace net
} // namespace experimental
} // namespace std

resolver_base defines a bitmask type, flags, with the bitmask elements shown in Table [tab:internet.resolver.base.requirements].

Table 37 — Resolver flags
Constant namePOSIX macroDefinition or notes
passive AI_PASSIVE Returned endpoints are intended for use as locally bound socket endpoints.
canonical_name AI_CANONNAME Determine the canonical name of the host specified in the query.
numeric_host AI_NUMERICHOST Host name should be treated as a numeric string defining an IPv4 or IPv6 address and no host name resolution should be attempted.
numeric_service AI_NUMERICSERV Service name should be treated as a numeric string defining a port number and no service name resolution should be attempted.
v4_mapped AI_V4MAPPED If the protocol is specified as an IPv6 protocol, return IPv4-mapped IPv6 addresses on finding no IPv6 addresses.
all_matching AI_ALL If used with v4_mapped, return all matching IPv6 and IPv4 addresses.
address_configured AI_ADDRCONFIG 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.