Hello,
I have questions/issues related to v3 session reuse; any help would be very
much appreciated. Our project uses NetSnmp APIs to implement a SNMP manager. We
have used snmp v2; now try to enhance the code to support v3. Currently we are
using net-snmp-5.6.1.1.
1. When need to stop reuse an opened v3 session?
I can re-use the same session (with authPriv) to talk to an agent as far as the
agent isn't restarted. But once the agent was restarted, my next snmp query
would fail with error code = -24. I guess the failure is due to the v3 data
associated with the session failed on authentication (boot count and time
tick). Is that expected behavior? or I didn't setup my session properly? Is it
necessary to create a new session or have an efficient way to get around?
1. Failed to reuse session for trap handing
Similarly like question 1, my trap receiver (c program) could no longer read
trap from an agent once the agent was restarted. How can I get around this
problem? I used the code from snmptrapd_add_session() to open the session.
1. Why can't a session for engine ID probe be reused?
By referencing snmpv3_engineID_probe, I created a session for engineId probe. I
was able to use the session to discover an agent's engine ID. But if I reuse
the session to do engindID probe again for the same agent the process would
fail due to sptr is null in following code
int status = snmp_sess_synch_response(ss, pdu, &response);
struct snmp_session* sptr = snmp_sess_session(ss);
Does that mean I can't reuse a session for engineID probe, even the agent isn't
restarted?
I'm thinking to use engineID-probe to find out if a timeout error is due to
agent death or password mismatch. This is also related to my next question.
1. How to interpreter SNMPERR_TIMEOUT error for different scenarios?
I noticed that our snmp manager would get Timeout error in following cases; we
would like to know how to distinguish each of them in c code
a) agent died
b) agent was restarted
c) private password mismatch
Thank you very much for your help in advance,
Xiangyang
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders