Distributed Name Service (DNS) Management Programming Manual
DNS Programming Example, C
46958 Tandem Computers Incorporated H–21
 dns_strtomem(¶m.zssobj, ssobject, ZDNS_VAL_OBJLEN);
 dns_strtomem(¶m.zssmgr, ssmanager, ZDNS_VAL_MGRLEN);
 }
/*-----------------------------------*/
/* Put token into the request buffer */
/*-----------------------------------*/
if (status = SSPUT((short *) &req_buf
 , (short *) &zdns_map_alter_alias
 , (char *) ¶m))
 return dns_return(spi_err, status);
/*-------------------------*/
/* Start a TMF transaction */
/*-------------------------*/
if (status = BEGINTRANSACTION())
 return dns_return(tmf_err, status);
/*--------------------------------------*/
/* Send the request to the name manager */
/*--------------------------------------*/
result = dns_send(file_desc, &req_buf, &resp_buf, false);
if (result.err_class)
 {
 /*-------------------------------------------------------*/
 /* Error during send; abort the transaction and return */
 /*-------------------------------------------------------*/
 ABORTTRANSACTION();
 return result;
 }
/*----------------------------------*/
/* Get RETCODE from response buffer */
/*----------------------------------*/
if (status = SSGETTKN((short *) &resp_buf
 , ZSPI_TKN_RETCODE
 , (char *) &retcode))
 {
 /*-----------------------------------------------------------*/
 /* Error getting RETCODE; abort the transaction and return */
 /*-----------------------------------------------------------*/
 ABORTTRANSACTION();
 return dns_return(spi_err, status);
 }
if (retcode)
 {
 /*-----------------------------*/
 /* Name manager detected error */
 /*-----------------------------*/










