eSNMP API Routines
esnmp_poll
esnmp_poll
Processes a pending message that was sent by the master agent.
Format
int esnmp_poll ( )
Description
This routine is called after the
select( )
call has indicated data is ready on
the eSNMP socket. (This socket was returned from the call to the
esnmp_init
routine.)
If a received message indicates a problem, an entry is made to the SNMP log file
and an error status is returned.
If the received message is a request for SNMP data, the object table is checked
and the appropriate method routines are called, as defined by the developer of the
subagent.
Return Values
ESNMP_LIB_OK
The
esnmp_poll
routine completed successfully.
ESNMP_LIB_BAD_REG
The master agent failed in a previous
registration attempt. See the log file.
ESNMP_LIB_DUPLICATE
A duplicate subagent identifier has already been
received by the master agent.
ESNMP_LIB_NO_
CONNECTION
The master agent’s
OPEN
request failed. Restart
the connection after a delay. See the log file.
ESNMP_LIB_CLOSE
A
CLOSE
message was received.
ESNMP_LIB_NOTOK
An eSNMP protocol error occurred and the
packet was discarded.
ESNMP_LIB_LOST_
CONNECTION
Communication with the master agent was lost.
Restart the connection.
5–14 eSNMP API Routines