On Tue, Jan 16, 2018 at 8:57 AM, Fulko Hew <fulko....@gmail.com> wrote:

>
>
> On Mon, Jan 15, 2018 at 11:56 PM, Bart Van Assche <bvanass...@acm.org>
> wrote:
>
>> On 01/15/18 20:22, Fulko Hew wrote:
>>
>>> b) I've always considered David Perkins' book 'Understanding SNMP MIBs'
>>> as a good reference on how to interpret the specs.
>>>
>>> For TRAPS it says: The optional VARIABLES clause of the TRAP-TYPE
>>> construct
>>> is used to specify one or more scalar or columnar objects that describe
>>> the event."
>>>
>>
>> Sorry but what I remember from David Perkins' book is different. I think
>> he mentioned that it is allowed to send additional varbinds.
>
>
>
> It may be there but I didn't see it during my quick review last night.
> ​
>
> Regarding TRAPs, a quote from section 2.1.2 of RFC 1215 (
>> https://tools.ietf.org/html/rfc1215):
>>
>>    The VARIABLES clause, which need not be present, defines the ordered
>>    sequence of MIB objects which are contained within every instance of
>>    the trap type.  Each variable is placed, in order, inside the
>>    variable-bindings field of the SNMP Trap-PDU.  Note that at the
>>    option of the agent, additional variables may follow in the
>>    variable-bindings field.
>>
>> I don't think that it could have been stated more clearly than in the
>> last sentence of the above paragraph ...
>>
>
> ​OK, you win.​ It it there. I stand corrected, it is allowed.
> My sincerest apologies.
>
> Still, personally (and despite that its allowed by spec), _I_ would never
> do it,
> and will still never 'recommended' to anyone to send undocumented stuff.
>

On the other hand, most users don't accept that the "S" in SNMP was meant
for simple agents, and insist on simple managers, and want to know things
like "what was the name of the interface that just went down?".  I think
that you will find that there are many devices that send additional
varbinds in traps.  RFC2578 expands a little on RFC1215:

   Note that an agent is allowed, at its own discretion, to append as
   many additional objects as it considers useful to the end of the
   notification (i.e., after the objects defined by the OBJECTS clause).

So, given that it's been permitted since 1991, reinforced to be true in
1999, and is commonly done, I *do* recommend that you add objects to your
notifications (within reason) if you believe it would be helpful to the
receiver.

  Bill
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to