Extracted from Pike v7.8 release 866 at 2016-11-06.
pike.ida.liu.se
[Top]
Protocols
Protocols.DNS
Protocols.DNS.client

Method Protocols.DNS.client()->getsrvbyname()


Method getsrvbyname

array getsrvbyname(string service, string protocol, string|void name)

Description

Queries the service record (RFC 2782) from the default or given DNS server. The result is an array of arrays with the following six elements for each record. The array is sorted according to the priority of each record.

Each element of the array returned represents a service record. Each service record contains the following:

Returns

An array with the requested information about the specified service.

Array
int priority

Priority

int weight

Weight in event of multiple records with same priority.

int port

port number

string target

target dns name