On Wed, 2005-12-14 at 10:31 -0800, Ramji Chandramouli wrote: > On a related topic, when this TRAP-TYPE MIB object is sent in a trap, > is the manager (or agent) expected to perform validation that the > variable bindings in the trap conform to the MIB definition ?
The agent (or other notification generator) is expected to send a trap that conforms to the MIB definition - yes. That's the point of having standards :-) It's up to the receiving application as to whether it checks the incoming notification against the MIB definition or not. To a great extent, that probably depends on what the notification receiver is going to do with the trap. > I ask this because I'm noticing that I can send and receive (using > net-snmp) any variable bindings in the trap even though the VARIABLES > clause in the MIB does not include those MIB objects. Firstly, the notification can legitimately include additional varbinds, over and above the list that appears in the MIB definition. These *must* be included first (and appear in the order specified), but the agent is allowed to append any other information that might be useful. Secondly, the Net-SNMP suite is primarily an SNMP toolkit. It tend to work in a fairly liberal manner, and accepts as much as possible - rather than necessarily insisting on the strict letter of the specs. In general, I'd expect that all the code we ship will *generate* correct output, but we don't try to restrict people from stretching things slightly if they need to. Certainly, snmptrapd doesn't try to do any varbind validation. After all, it's not strictly necessary that the MIB file will be available at all. The default behaviour is to log whatever arrives, regardless of whether this is what *should* have arrived. If you need to apply more strict validation, then you're at liberty to do so. Dave ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ 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
