Distributed Name Service (DNS) Management Programming Manual
DNS Programming Example, C
H–8 46958 Tandem Computers Incorporated
/*-------------------------------*/
/* Initialize INFO ALIAS request */
/*-------------------------------*/
if (status = SSINIT((short *) &request_buf
 , ZDNS_VAL_BUFLEN
 , (short *) &dns_ssid
 , ZSPI_VAL_CMDHDR
 , ZDNS_CMD_INFO
 , ZDNS_OBJ_ALIAS
 , -1
 , true))
 return dns_return(spi_err, status);
/*-----------------------------------------------*/
/* Put INFO DNSOBJ token into the request buffer */
/*-----------------------------------------------*/
if (status = SSPUT((short *) &request_buf
 , (short *) &zdns_map_info_dnsobj_p
 , (char *) ¶m))
 return dns_return(spi_err, status);
while (! done)
 {
 /*----------------------------------------------*/
 /* Send INFO ALIAS request to the name manager */
 /*----------------------------------------------*/
 result = dns_send(file_desc, &request_buf, &response_buf, more);
 if (result.err_class)
 /*------------------------*/
 /* Error sending request */
 /*------------------------*/
 return result;
 /*------------------------*/
 /* Examine each data list */
 /*------------------------*/
 while (! (status = SSGETTKN((short *) &response_buf
 , ZSPI_TKN_DATALIST)))
 {
 /*---------------------------------------*/
 /* Retrieve RETCODE from response buffer */
 /*---------------------------------------*/
 if (status = SSGETTKN((short *) &response_buf
 , ZSPI_TKN_RETCODE
 , (char *) &retcode))
 return dns_return(spi_err, status);
 if (retcode == ZDNS_ERR_NOMORE)










