Distributed Name Service (DNS) Management Programming Manual
DNS Programming Example, TAL
G–8 46958 Tandem Computers Incorporated
 !
 INT fno; !i - Name manager file number.
 !
 STRING .EXT name; !i - Alias.
 !
 STRING .EXT defnode; !i - Definition node; if = spaces, look
 ! for name on any node.
 !o - Basic INFO ALIAS response.
 INT .EXT basic^response(zdns^ddl^info^alias^br^def);
 !
 !o - Detailed INFO ALIAS response.
 INT .EXT detailed^response(zdns^ddl^info^alias^dr^def);
 !
 !o - Set to true, if procedure returns
 ! DNS^NOERR but more than one alias
 ! matched NAME.
 INT .EXT ambiguous;
BEGIN
INT(32) result := dns^noerr; !Value returned by the procedure.
INT
 error^type = result !High-order word of result.
 , error = result + 1 !Low-order word of result.
 , maxresp := -1 !Value of ZSPI^TKN^MAXRESP.
 , have^response := false !True if we've found an alias.
 , done := false !True if we're finished.
 , status !Status returned by SPI procedures.
 , retcode !RETCODE returned by name manager.
 , more := false !True, if last response contained
 !ZSPI^TKN^CONTEXT token.
 ;
STRUCT .EXT req^buf(zdns^ddl^msg^buffer^def); !Request buffer
STRUCT .EXT resp^buf(zdns^ddl^msg^buffer^def); !Response buffer
STRUCT !INFO ALIAS parameter
 .param(zdns^ddl^info^dnsobj^p^def)
 ;
INT
 !INFO ALIAS parameter map.
 param^map[0:zdns^map^info^dnsobj^p^wln - 1] = 'P' := zdns^map^info^dnsobj^p
 !INFO ALIAS basic response map.
, br^map[0:zdns^map^info^alias^br^wln - 1] = 'P' := zdns^map^info^alias^br










