Hello list,
I am coding a manager with net-snmp-5.4.1
I have a problem to acknowledge an Inform-Request.
Here is the code in my session callback (taken from function
snmp_input() in snmptrapd_handlers.c):
-----------------------------------------------------
switch (pdu->command)
{
case SNMP_MSG_TRAP:
case SNMP_MSG_TRAP2:
...
break;
case SNMP_MSG_INFORM:
{
netsnmp_pdu *ackPdu = snmp_clone_pdu(pdu);
ackPdu->command = SNMP_MSG_RESPONSE;
ackPdu->errstat = 0;
ackPdu->errindex = 0;
int res = snmp_send(session, ackPdu);
if ( res == 0 )
{
// ERROR
int cliberr;
int snmperr;
char *errstr;
snmp_error(session, &cliberr, &snmperr, &errstr);
...
free(errstr);
snmp_free_pdu(ackPdu);
}
else
{
...
}
}
break;
...
}
-------------------------------------------------------
My manager receives correctly Inform-Request sent by snmpinform or any
other tool.
But function snmp_send() returns 0, with both cliberr and snmperr set to
0, and the Inform-Request sender does not receive any acknowledgement.
Did I make a mistake ?
How can I find the reason of snmp_send() error ?
Regards,
Alain GUENRO
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users