Distributed Name Service (DNS) Management Programming Manual

DNS Programming Example, TAL
G–2 46958 Tandem Computers Incorporated
, dns^et^io = 3 !Low-order word is the file management
!error number from our WRITEREADX to
!the name manager.
, dns^et^open = 4 !Low-order word is the file management
!error number from our OPEN of the name
!manager.
, dns^et^tmf = 5 !Low-order word is error returned by one
!of the TMF procedures.
!
! If no error occurred, the following value is returned.
!
, dns^noerr = 0d
;
!
! DEFINES used by the procedures to construct their return value.
!
DEFINE
dns^dnserr(err) = $DBLL(dns^et^dns, err)#
, dns^spierr(err) = $DBLL(dns^et^spi, err)#
, dns^ioerr(err) = $DBLL(dns^et^io, err)#
, dns^openerr(err)= $DBLL(dns^et^open,err)#
, dns^tmferr(err) = $DBLL(dns^et^tmf, err)#
;
!
! Handy DEFINES.
!
LITERAL
false = 0
, true = -1
;
!
! DEFINES for determining the length of an SPI buffer.
!
DEFINE
!Length in Bytes
dns^usedlen(buf) = (buf.z^occurs + $OFFSET(buf.z^filler))#
!Length in Words
, dns^wordlen(buf) = ((dns^usedlen(buf) + 1) '>>' 1)#
;
!
! DNS SSID
!