--- Dave Shield <[EMAIL PROTECTED]> wrote:
> On Thu, 2005-06-16 at 04:38, Mihir Lala wrote:
> > I run the same command with an enterprise ID such as 666666,
> > then the output is as:
> > 
> > SNMPv2-SMI::enterprise.66666.2.4.2.0.1
> 
> 
> > What I'd like to do is to get an "Unknown OID" in the second case;
> > basically having read_objid() return a failure.
> 
> 
> How would you define a failure?
> For example, consider:
> 
>     $ snmptranslate .1.3.6.1.2.1.1
>     SNMPv2-MIB::system
>     $ snmptranslate .1.3.6.1.2.1.1.0
>     SNMPv2-MIB::system.0
>     $ snmptranslate .1.3.6.1.2.1.1.1
>     SNMPv2-MIB::system.1
>     $ snmptranslate .1.3.6.1.2.1.1.0.1.2.3
>     SNMPv2-MIB::system.0.1.2.3
> 
> The last three are "partial" translations, in that they still
> include trailing numeric subidentifiers.  But they are also
> "full" translations, because these trailing values are the
> instance subidentifiers (though only one is actually valid)
> 
> Would you classify these are failures or not?

It would be more like a prefix (or subtree) match. If there is a "full"
translation to of an OID that s given then it's a success else a
failure. 

In your example,  a translate for .1.3.6.1.2.1.1 would return a success

but  .1.3.6.1.2.1.1.0 or any of the others would be a failure.


> > I am trying to write a trap receiver application, that can filter
> traps
> > (drop them) if they are coming from an enterprise (or MIB) that is
> not
> > loaded into this application.
> 
> Surely the existing snmptrapd can do that - by supplying a suitable
> default trap handler entry?

Yes, I could have a handler, but the idea was to leverage the tree that
is already built using the MIB files and not having to configure OIDs. 

On receiving a trap, the application would simply lookup the tree for
the "snmp_trap_oid" (second varbind in the v2c/v3 notifications) and
either process or drop the trap based on the the lookup return value. 

In this way the only traps that get acknowledged are the ones whose MIB
files are loaded into the snmptrapd application.

thanks,
mrl


                
____________________________________________________ 
Yahoo! Sports 
Rekindle the Rivalries. Sign up for Fantasy Football 
http://football.fantasysports.yahoo.com


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to