Distributed Name Service (DNS) Management Programming Manual
DNS Programming Example, C
H–16 46958 Tandem Computers Incorporated
if (! (done | (status == ZSPI_ERR_MISTKN)))
return dns_return(spi_err, status);
if (! done)
/*-----------------------------------------------------------*/
/* We're not finished yet; see if there's a context token */
/*-----------------------------------------------------------*/
if (status = SSGETTKN((short *) &resp_buf
, ZSPI_TKN_CONTEXT
,
, 1))
{
if (status = ZSPI_ERR_MISTKN)
/*------------------------------------*/
/* No context token; we're finished */
/*------------------------------------*/
done = true;
else
/*--------------------------------------------*/
/* Unexpected error looking for context token */
/*--------------------------------------------*/
return dns_return(spi_err, status);
}
else
/*-------------------------------------------------------*/
/* Remember that we have a context token to move at next */
/* DNS_SEND */
/*-------------------------------------------------------*/
more = true;
}
if (! have_response)
/*------------------------------------------------------------*/
/* We didn't find a response of the type we were looking for */
/*------------------------------------------------------------*/
return dns_return(dns_err, ZDNS_ERR_NOTFOUND);
/*------------------------------*/
/* Return indication of success */
/*------------------------------*/
return dns_return(no_err, 0);
}
#pragma page "DNS_ADD_ALIAS"
/*==================================================================*/
/* Add a new alias to the DNS database */
/*==================================================================*/