SNMP Manager Programmer's Guide
Sending and Receiving Packets
SNMP Manager Programmer’s Guide–134249
7-3
Sending Packets
Sending Packets
The function SNMP_Write_Read_(), defined in snmpfsc, performs packet encoding, 
sending, receipt, and decoding. This function uses several local variables for these 
purposes: 
short SNMP_Write_Read_ (SNMP_HOST_INT_T *host_int,
 SNMP_PKT_T *spkt,
 SNMP_PKT_T **rpkt,
 EBUFFER_T *ebuffp,
 unsigned short debug_flag)
{
 short err = 0;
 long err2 = 0;
 long IO_tag = 1;
 unsigned char *IOC_buffp; /* IO complete buffer pointer 
*/
 EBUFFER_T myEBuff; /* A modified version of ebuffp 
*/
 /* that points past the 
*/
 /* sockaddr_in field 
*/
 short read_cnt;
 short send_cnt;
 short status;
 short temp_file_num;
 short written_cnt;
err The return code from the call to the tdm_SNMP_Encode_Packet() 
encoding function.
IO_tag A tag returned by AWAITIOX() calls following read and write 
operations.
IOC_buffp The buffer pointer returned by AWAITIOX() calls following read 
and write operations.
myEBuff A copy of the passed buffer descriptors for the encoded-packet 
buffer.
read_cnt The number returned by the AWAITIOX() call following the read 
operation indicating how many bytes were transferred; used by the 
decoding function, SNMP_Decode_Packet_WER().
send_cnt The number of bytes to send from the encoded-packet buffer; used 
by the WRITEX() call.
status The return code for the WRITEX() and READEX() calls.
temp_file_num The file number returned by AWAITIOX() after write and read 
operations.
written_cnt The number of bytes written; returned by WRITEX() and the 
AWAITIOX() following it.










