Distributed Name Service (DNS) Management Programming Manual

Overview of the INFO Commands
Using DNS in Programs: The DNS Commands
5–110 46958 Tandem Computers Incorporated
Overview of the INFO
Commands
ZDNS-CMD-INFO retrieves information from the DNS database and implements the
INFO and LIST commands in DNSCOM. ZDNS-CMD-INFO may be used with any
object type. The command requires DNS read authority, regardless of the object type.
The considerations specific to each object type are described in each of the succeeding
subsections.
ZDNS-CMD-INFO allows multiple responses to be returned in a single response
buffer. If additional responses are available, the response buffer also contains ZSPI-
TKN-CONTEXT. To obtain more responses, the user must resubmit the original
command and parameters, along with the ZSPI-TKN-CONTEXT token from the
previous response buffer.
The name manager validates the command and parameters against the context token;
if an error is found, the command is rejected with ZDNS-ERR-INV-CONTEXT.
Because the DNS database may be constantly changing, it is possible that no additional
information is available to return to a resubmitted command with ZSPI-TKN-
CONTEXT. In this case, the name manager replies with a response buffer containing
ZSPI-TKN-RETCODE with a value of ZDNS-ERR-NOMORE.
By default, each response buffer contains information about a single name. If the user
desires more than one response per buffer, the token ZSPI-TKN-MAXRESP should be
supplied as a parameter to the request. The values for this token are:
- 1 as many responses fit in the buffer
0 null value; the same as if ZSPI-TKN-MAXRESP were not supplied; defaults
to a single response
> 0 the maximum number of responses the requester is willing to accept
Where ZSPI-TKN-MAXRESP is supplied with a not zero value, the response
information about each name is enclosed in an SPI standard data list (ZSPI-TKN-
DATALIST and ZSPI-TKN-ENDLIST). Note that not supplying ZSPI-TKN-MAXRESP
differs from supplying that token with a value of 1; in the former case, the single name
response is not enclosed in a data list.
Where one or more responses are returned enclosed in a data list, each data list
contains the ZSPI-TKN-RETCODE token.
The context token (ZSPI-TKN-CONTEXT) is not enclosed in any list.
If ZSPI-TKN-MAXRESP is supplied with a not zero value and errors are detected in
the command and/or command parameters, the not zero ZSPI-TKN-RETCODE token
(and associated error list or lists) is enclosed in a data list.