logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: Traps and the trap sink structs: msg#00412

Subject: Re: Traps and the trap sink structs
        [ Sorry for the delayed response ]

> I've been looking over trap code and noticed that when a trap is sent, its
> is sent to the destination of every valid trap sink for that trap type.

It's actually more general than that.
When a MIB module calls one of the trap API routines, it will be sent to
*every* valid trap sink, being translated between v1 & v2 as appropriate.

 
> My research of the RFCs shows that selecting the destination of the Trap
> is implementation specific (according to RFC1157).  

That's probably true as far as the SNMPv1 specification are concerned.
Later versions introduced the SNMP-NOTIFICATION-MIB which includes two
tables concerned with focusing trap destinations more precisely.

The Net-SNMP agent includes the framework for these tables, though I'm
not sure how complete these implementations are.

 
> I was wondering if there is merit in adding a community name parameter to
> the send_enterprise_trap_vars() function?  The new behavior would be such
> that if the community parameter wasn't NULL the code would only send to the
> trapsinks with that community name.

Hmmm...
It's an idea, I suppose.

It's something of a change in design for the agent, which has tended to
try and separate MIB modules from the main configuration of the agent.
And using the community string for this wouldn't cope with SNMPv3 very
cleanly.
   It would probably more flexible to look at an API that specified an
snmpNotifyFilterProfileName instead.

  The other complicating factor would be how this would work in an
AgentX subagent.   At the moment, traps sent from a subagent are passed
to the master agent, and the master decides where to send them.  It's
a while since I looked at the AgentX protocol specification, and I can't
recall whether it includes any way to pass an snmpNotifyFilterProfileName.


Dave




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf


<Prev in Thread] Current Thread [Next in Thread>