so i was hoping to use snmptrap to send snmp v3 traps because it is
simple and already written.  However I have some NMS systems that are
pretty stringent about checking EngineBoots and EngineTime even for
traps (I'm not using Inform).  So far the nms always reports "message
received outside time window" .  Checking the snmp packets with tshark I
can see that both EngineBoots and EngineTime are always zero.

Looking at the snmptrap code it looks like by default it should be
setting Boots to 1 and Time to "uptime" IF you don't pass specific
values via -V on the command line.  Throwing in some printfs I can see
that the session struct is in fact populated with these values.

I got lost following snmp_add and snmp_pdu_create but from what I can
tell the session attributes for Boots and Time are never actually used
to set the same in the raw pdu and thus all we get are zeros.

Was curious if someone who knew the code better could confirm this is a
bug and not some obvious miss on my part.   Given how snmptrap is
written I don't think it is supposed to get any data from a running
agent (I'm trying to avoid running one) or from the persistent snmp conf
files that other methods like agentx etc would use.

I also skimmed through the mail archives and found what looked like
similar questions in the past but without anyone addressing why setting
the Boot and Time attributes via -V for snmptrap should not work.

-denis
-- 
__________________________
Denis Alan Hainsworth     
denis.hainswo...@gmail.com


_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to