Distributed Name Service (DNS) Management Programming Manual
DNS Programming Example, TAL
G–12 46958 Tandem Computers Incorporated
!
! This procedure resolves a single name or a name of the
! form <dnsname> ON <node>.
!
! In the case where only a single name is passed (DEFNODE = spaces),
! AMBIGUOUS will be set to TRUE if more than one name in the database
! matches the NAME/MASK combination.
!
! Where MASK indicates that the name could be SSOBJECT or SSMANAGER,
! the procedure will also interpret NAME as an alias and resolve to
! the alias's referent.
!
INT(32) PROC dns^lookup(fno, name, defnode, response, mask, ambiguous);
INT fno; !i - Name manager file number.
!
STRING .EXT name; !i - Name to look up.
!
STRING .EXT defnode; !i - Definition node (if = spaces
! all nodes/subsystems/ssmanagers).
!
INT(32) mask; !i - Mask of DNSTYPE(s) to look for.
!
INT .EXT response(zdns^ddl^info^name^br^def);
!o - Information about the name is
! returned here.
INT .EXT ambiguous;
BEGIN
INT(32) result := dns^noerr; !Value to be 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 have found a name matching
!the input parameters.
, done := false !True, when we're finished.
, status !Value returned by SPI procedures.
, retcode !RETCODE returned by name manager.
, more := false !True, if last response contained the
!ZSPI^TKN^CONTEXT token.
, match !Temporary.
;