Loading...
Searching...
No Matches
Network Address Information Constants

## Variables

const | Qore::AI_ADDRCONFIG = AI_ADDRCONFIG
| if this bit is set, addresses of each family are returned only if they are configured on the system
const | Qore::AI_ALL = AI_ALL
| If this bit is set along with AI_V4MAPPED then all matching IPv6 and IPv4 addresses are returned.
const | Qore::AI_CANONNAME = AI_CANONNAME
| If this bit is set, then getaddrinfo() will return the canonical name of the hostname in the `"canonname"` key of the first element returned.
const | Qore::AI_NUMERICHOST = AI_NUMERICHOST
| If this bit is set, then the host is assumed to be an address and no hostname lookup will be preformed.
const | Qore::AI_NUMERICSERV = AI_NUMERICSERV
| If this bit is set, then the service is assumed to be a numeric port string, and no service lookup will be performed. More...
const | Qore::AI_PASSIVE = AI_PASSIVE
| If this bit is set, then the returned information should be usable for a call to Socket::bind() More...
const | Qore::AI_V4MAPPED = AI_V4MAPPED
| If this bit is set, getaddrinfo() will return IPv4-mapped IPv6 addresses on finding no matching IPv6 addresses/. More...

## Detailed Description

These are the possible network address information constants for the getaddrinfo() function; if any of these constants are not defined on the current platform, they will be assigned to 0 in Qore

## Variable Documentation

## AI_NUMERICSERV

const Qore::AI_NUMERICSERV = AI_NUMERICSERV

If this bit is set, then the service is assumed to be a numeric port string, and no service lookup will be performed.

If the AI_NUMERICSERV bit is set, then any service name string supplied will be treated as a numeric port string. Otherwise, a `QOREADDRINFO-GETINFO-ERROR` exception will be thrown due to the `EAI_NONAME` error raised internally. This bit prevents any type of name resolution service (for example, NIS+) from being invoked (this constant is operating system dependent; it is not available on all operating systems; for example, it is not available on Solaris 8).

## AI_PASSIVE

const Qore::AI_PASSIVE = AI_PASSIVE

If this bit is set, then the returned information should be usable for a call to Socket::bind()

In this case, if the hostname is not given, then the return value will be usable for binding on all addresses for the given family.

If the AI_PASSIVE bit is not set, the returned socket address structure will be ready for use in a call to Socket::connect().

The IP address portion of the socket address structure will be set to the loopback address if hostname is NOTHING and AI_PASSIVE is not set.

## AI_V4MAPPED

const Qore::AI_V4MAPPED = AI_V4MAPPED

If this bit is set, getaddrinfo() will return IPv4-mapped IPv6 addresses on finding no matching IPv6 addresses/.

The AI_V4MAPPED flag is ignored unless family is AF_INET6