Net-snmp-5.4.1: problem while coding acknowledgement for

This is a discussion on Net-snmp-5.4.1: problem while coding acknowledgement for within the SNMP Users forums, part of the Networking and Network Related category; Hello list, I am coding a manager with net-snmp-5.4.1 I have a problem to acknowledge an ...


Go Back   Usenet Forums > Networking and Network Related > SNMP Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-04-2008
Alain GUENRO
 
Posts: n/a
Default Net-snmp-5.4.1: problem while coding acknowledgement for

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
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/...net-snmp-users
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 03:19 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0