getAddrsForInterface

Returns IP addresses for the network interface.

  1. istring[] getAddrsForInterface(cstring interface_name, bool ipv6)
    getAddrsForInterface
    (,
    bool ipv6 = false
    )
  2. bool getAddrsForInterface(cstring interface_name, bool ipv6, bool delegate(cstring address, int getnameinfo_status) dg)

Parameters

interface_name cstring

Name of the interface (e.g. eth0)

ipv6 bool

true: fetch IPv6 addresses, false: IPv4

Return Value

Type: istring[]

IP addresses of the interface for the given family as strings, if they could be resolved, otherwise an empty array.

Meta