SNMP Manager Programmer's Guide

Programming Examples
SNMP Manager Programmer’s Guide–134249
2-19
Managers Supporting UDP and IPC
if (err3)
{
fprintf(stdout, "Hostname is not defined on EXPAND Network.\n");
fprintf(stdout, "Using TCP/IP.\n");
return CK_REMOTE_IP;
}
if (sysnum1 == sysnum2) <--18
return CK_LOCAL_NAME;
else
return CK_REMOTE_IP_EXPAND;
}
}
} /* End check_host_name */
#pragma page
/***************************************************************************
NAME: SNMP_Close_
PURPOSE: Close a path to the SNMP agent based upon the
info in the SNMP_HOST_INT_T structure.
PARAMETERS: SNMP_HOST_INT_T * Location of host interface struct.
RETURNS: 0 - if no error. Else error number.
****************************************************************************/
short SNMP_Close_ (SNMP_HOST_INT_T *host_int) <--19
{
if (host_int->version != 1)
return HOST_INT_ERROR;
host_int->err_num = 0;
if(host_int->local_flag == REMOTE_HOSTNAME)
{
/* Remote Access using sockets */
FILE_CLOSE_(host_int->file_num); <--20
host_int->file_num = -1;
} else
Example 2-2. Contents of snmpfsc (page 6 of 19)