DNSGETSRV

Synopsis

DNSGETSRV [/?] [/SERVERIP address] [/SERVER name] [/SERVICE name] [/WELLKNOWNPORT port] [/CLIENTIP address] [/CLIENTPORT port] [/IP6[+|-]] [/IMPLICIT[+|-]] [/SRV_SUPERDOMAINS[+|-]] [/SRV_SELF[+|-]] [/FETCHGLUE[+|-]] [/IP6ADDR[+|-]] [/B[+|-]] service transport domain

Description

The DNSGETSRV command obtains the priorities, weights, ports, and IP addresses of the service servers for the domain domain. It prints the priority/weight/port/address tuples, one per line, to its standard output.

DNSGETSRV performs the standard server lookup procedure that would be performed by the a service client utility looking for the service service over transport protocol transport, printing the results of the server lookup rather than contacting the servers for actual service. It derives the well-known port number from the service and transport names, looking them up in the %ETC%\HOSTS file.

Lookups are performed by contacting a proxy DNS server. DNSGETSRV uses the same DNS client library as applications (and the other service client utilities in the Internet Utilities) use, and so the proxy DNS server contacted is by default the same proxy DNS server as all applications use.

Although DNSGETSRV can thus be reconfigured to talk to other DNS servers and to bind the client ends of its sockets to specific IP addresses and port numbers using the DNS client library's ordinary configuration environment variables, for convenience the /SERVERIP, /WELLKNOWNPORT, /SERVER, /SERVICE, /CLIENTIP, and /CLIENTPORT command-line options can also be used to do the same thing, overriding the configuration environment variables.

If all priority/weight/port/address tuples are obtained successfully, DNSGETSRV exits with a zero code. Otherwise it exits with a non-zero code.

Command-specific options

/B
Use a brief display format, without the priority/weight/port.

The Internet Utilities are © Copyright Jonathan de Boyne Pollard. "Moral" rights are asserted.