Mihir Lala
2005-06-16 01:40:29 UTC
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
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