Re: How to handle the netSnmpEnterprise entry?

Thomas Eliasson <[email protected]>
Newsgroups gmane.network.net-snmp.user
Organization Westermo R&D
Message-ID <1254898584.7974.49.camel@wrd-c021>
Thanks for the swift reply!

Is it impossible to use the public API to send a clean SNMP v2 trap?

When calling the function send_v2trap for a generic trap (like linkDown,
1.3.6.1.6.3.1.1.5.3) I get an netSnmpEnterprise binding.
According to the docs:
"Uses the supplied list of variable bindings to form an SNMPv2 trap,
which is sent to SNMPv2-capable sinks on the configured list."
To me this means it should not add 'netSnmpEnterprise' binding since I'm
creating a v2 trap (and according to the last 'Yes' answer I got below).

On the other hand the function docs also states:
"This function eventually calls send_enterprise_trap_vars. If the trap
type is not set to SNMP_TRAP_ENTERPRISESPECIFIC the enterprise and
enterprise_length paramater is set to the pre defined NETSNMP_SYSTEM_MIB
oid and length respectively. If the trap type is set to
SNMP_TRAP_ENTERPRISESPECIFIC the enterprise and enterprise_length
parameters are set to the pre-defined NETSNMP_NOTIFICATION_MIB oid and
length respectively."
To me this means that there is no way to create a trap without the
'netSnmpEnterprise' binding using this function.

Also, should generic traps (like linkDown, 1.3.6.1.6.3.1.1.5.3) and
enterprise specific traps be handled differently?
In v2 I thought they should be handled in a more uniform manner.

I feel quite confused. Can anyone shed som light on this?


Thanks!
/Thomas

On Mon, 2009-10-05 at 14:23 +0100, Dave Shield wrote:
> 2009/10/5 Thomas Eliasson <[email protected]>:
> > I can't find any specification supporting the statement:
> > "snmp_v2trap tries to add all the important parts of a message that are
> > required before it goes out, hence the reason it needs to add the
> > enterprise.  It's required by the SNMPv2c protocol!"
> >
> > Where do I find this information?
> 
> See RFC 3584.
> In particular - section 3.1 covers mapping from SNMPv1 traps
> to SNMPv2 notifications.   (Which is the context where
> snmpTrapEnterprise is used).
> 
> 
> 
> > Also I cannot find information on what value to set.
> > According to the RFC 3418:
> > "The authoritative identification of the enterprise
> > associated with the trap currently being sent.  When an
> > SNMP proxy agent is mapping an RFC1157 Trap-PDU
> > into a SNMPv2-Trap-PDU, this variable occurs as the
> > last varbind."
> > This does tell me much. Is it supposed to contain the OID "...private.enterprises.X"?
> > Should the value ONLY be set if an RFC1157 to SNMPv2 mapping is done?
> 
> Yes.
> 
> Dave
> ----------------------------
> This E-mail is Virus scanned 
> ----------------------------



------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.