If I run snmptranslate as follows:

snmptranslate -m MIBS/smi.my:MIBS/v2-smi.my:/MIBS/ENTERPRISE-1-STATS.my
.1.3.6.1.4.1.55555.2.4.2.0.1

...where 55555 is the enterprise Id and ENTERPRISE-1-STATS.my is a
proprietary MIB for this enterprise, then I get the output as:

ENTERPRISE-1-STATS-MIB:stat1

However if 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

I see that snmptranslate.c uses read_objid() to lookup the name from
the tree that is loaded.

What I'd like to do is to get an "Unknown OID" in the second case;
basically having read_objid() return a failure.

Is this possible? 

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.

thanks,
mrl





                
__________________________________ 
Discover Yahoo! 
Get on-the-go sports scores, stock quotes, news and more. Check it out! 
http://discover.yahoo.com/mobile.html


-------------------------------------------------------
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