------------------ Original ------------------
From: "Alexander King"<new...@foxmail.com>;
Date: Tue, Jan 12, 2010 06:00 PM
To: "Dave Shield"<d.t.shi...@liverpool.ac.uk>;
Subject: Re: Define Trap mib file and generate Trap codes problem(v1,v2
testing prototype problems)
------------------ Original ------------------
From: "Dave Shield"<d.t.shi...@liverpool.ac.uk>;
Date: Tue, Jan 12, 2010 05:23 PM
To: "Alexander King"<new...@foxmail.com>;
Cc: "net-snmp-users"<net-snmp-users@lists.sourceforge.net>;
Subject: Re: Define Trap mib file and generate Trap codes problem(v1,v2 testing
prototype problems)
2010/1/12 Alexander King <new...@foxmail.com>:
> and more,i decide to test the v1 and v2 trap prototype,but I got two mib
> files use the same template(defined by myself too),UIT-TRAP-MIB.mib and
> UIT-NOTIFICATION-MIB.mib
OK - first thing. Forget about UIT-TRAP-MIB.
It's a bogus mixture of SMIv1 and SMIv2.
The Net-SNMP parser might make something of it,
because we bend over backwards to try and be helpful,
but anything with an ounce of self-respect will reject it
out of hand.
>>>>I am sorry, This is freaking me out these days.
SMIv1 is obsolete. SMIv2 can be used with any
version of SNMP (including SNMPv1) anyway.
Delete UIT-TRAP-MIB. It's not worth bothering with.
Second thing:
Management objects and notifications are different things,
and should be kept separate in the MIB. Have one tree
containing your scalars and tables, and a second tree
containing your notifications.
It's technically possible to mix notifications with scalar
objects, but it's not a good idea. It is *not* valid to have
notifications as children of a table.
Keep them separate - it's a lot simpler.
Your 'trapTesting' definition is the right way to go.
>>>>I had deleted the file.I will follow your advice do the next
>>>>steps.Dave,*YOU* are the light of the world. Whoever follows you will never
>>>>walk in darkness, but will have the light of life. :=)
Third thing:
Define the notifications using OIDs of the form
systemNumbertrap NOTIFICATION-TYPE
OBJECTS { systemNumber }
STATUS current
DESCRIPTION "This is just a demo"
::= { trapTesting 0 51898 }
i.e. with an intermediate '0' subidentifier.
This will help when working with SNMPv1 traps.
(In particular, when converting traps between
SNMPv1 and SNMPv2, and back again).
Fourth thing:
You forgot the semicolon at the end of the IMPORTS clause.
>>>>YES!Dave,I want to kiss you!
With this added, and using trapTesting as the root of the
notifications, then I get the full set of send_xxx routines
from mib2c.notify.conf.
Dave
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
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
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
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