Distributed Name Service (DNS) Management Programming Manual

DNS Programming Example, C
46958 Tandem Computers Incorporated H–15
candidate.u_zssnum_null.zssnum = alias_dr.u_zssnum_null.zssnum;
candidate.ztypenum = alias_dr.ztypenum;
match = true;
}
if (match)
/*---------------------------------------------*/
/* This response is one that we're looking for */
/*---------------------------------------------*/
if (have_response)
{
/*--------------------------------------------------*/
/* We already have one that matches; see if this */
/* one's a duplicate (such as alias) of same name */
/* as object */
/*--------------------------------------------------*/
if (strncmp((char *) response
, (char *) &candidate
, sizeof(candidate)))
{
/*---------------------------------------------*/
/* This one is different; name is ambiguous */
/*---------------------------------------------*/
done = true;
*ambiguous = true;
}
}
else
{
/*---------------------------------------------*/
/* First response; save it in caller's area */
/*---------------------------------------------*/
*response = candidate;
have_response = true;
}
}
/*---------------------------*/
/* Get out of this data list */
/*---------------------------*/
if (status = SSGETTKN((short *) &resp_buf, ZSPI_TKN_ENDLIST))
return dns_return(spi_err, status);
}
/*------------------------------------------------------------*/
/* Be sure we didn't get an unexpected error looking for data */
/* list */
/*------------------------------------------------------------*/