DNS

Helper functions for resolving DNS queries.

primitive val DNS

Constructors

create

new val create()
: DNS val^

Returns


Public Functions

apply

Gets all IPv4 and IPv6 addresses for a host and service.

fun box apply(
  auth: (AmbientAuth val | NetAuth val | DNSAuth val),
  host: String val,
  service: String val)
: Array[NetAddress val] iso^

Parameters

Returns


ip4

Gets all IPv4 addresses for a host and service.

fun box ip4(
  auth: (AmbientAuth val | NetAuth val | DNSAuth val),
  host: String val,
  service: String val)
: Array[NetAddress val] iso^

Parameters

Returns


ip6

Gets all IPv6 addresses for a host and service.

fun box ip6(
  auth: (AmbientAuth val | NetAuth val | DNSAuth val),
  host: String val,
  service: String val)
: Array[NetAddress val] iso^

Parameters

Returns


broadcast_ip4

Link-local IP4 broadcast address.

fun box broadcast_ip4(
  auth: (AmbientAuth val | NetAuth val | DNSAuth val),
  service: String val)
: Array[NetAddress val] iso^

Parameters

Returns


broadcast_ip6

Link-local IP6 broadcast address.

fun box broadcast_ip6(
  auth: (AmbientAuth val | NetAuth val | DNSAuth val),
  service: String val)
: Array[NetAddress val] iso^

Parameters

Returns


is_ip4

Returns true if the host is a literal IPv4 address.

fun box is_ip4(
  host: String val)
: Bool val

Parameters

Returns


is_ip6

Returns true if the host is a literal IPv6 address.

fun box is_ip6(
  host: String val)
: Bool val

Parameters

Returns


eq

fun box eq(
  that: DNS val)
: Bool val

Parameters

  • that: DNS val

Returns


ne

fun box ne(
  that: DNS val)
: Bool val

Parameters

  • that: DNS val

Returns


Private Functions

_resolve

Turns an addrinfo pointer into an array of addresses.

fun box _resolve(
  auth: (AmbientAuth val | NetAuth val | DNSAuth val),
  family: U32 val,
  host: String val,
  service: String val)
: Array[NetAddress val] iso^

Parameters

Returns