SNMP Manager Programmer's Guide

Programming Examples
SNMP Manager Programmer’s Guide–134249
2-148
SNMPHOST Source Code
{
fprintf(stdout, "Not enough memory for the main SNMP buffer.\n");
exit(0);
}
EBufferSetup(BFL_IS_DYNAMIC, &ebuff, buffp, need);
/* Obtain buffer space for the AUX packets */
if ((buffp = (char *)SNMP_memory_alloc(need)) == 0)
{
fprintf(stdout, "Not enough memory for the AUX SNMP buffer.\n");
exit(0);
}
EBufferSetup(BFL_IS_DYNAMIC, &ebuffAux, buffp, need);
/* The the host data into the device table */
numEntries = GetHostDevices (&host_int, ppTable, devcnt, community, <--58
retrycnt, requestid);
/* print the host data */
DisplayHostDevices (ppTable, numEntries, bBatchMode); <--59
EBufferClean(&ebuff); <--60
EBufferClean(&ebuffAux);
SNMP_Close_(&host_int);
return 0;
} /* main */
Example 2-18. Contents of snmphosc (page 23 of 23)