> this afternoon i�do sometest , i found that
> first, If u�want to sent v1 trap,u just need�to set trap=6
> and type=any num you want,
Which API call are you using?
send_easy_trap?
send_trap_vars?
something else?
Note that you still need a "trapsink" or "trap2sink" entry
in your snmpd.conf file.
> the work to recongnize the trap is the managment software 's job�
Yes.
> If u want to sent v2 trap ,set trap =-1and type=-1,
> and you can attach something you like
But the "something" you attach is a varbind list
and this *must* start with a 'snmpTrapOID.0' varbind.
But please note that how you specify the trap (send_easy_trap,
send_trap_vars, etc) does *NOT* affect whether it's a v1 or
a v2 trap that's actually sent.
This is determined by the snmpd.conf directive.
Please see the FAQ entry
Where are these traps sent to?
[I thought there was an ASCII diagram of this somewhere, but I
can't immediately spot it.]
> so we don't need to define trap in MIB
> (don't need to give a OID to a Trap),
No - you *DO* need to define a MIB entry for this trap.
That's what defines what values you supply when sending the trap,
and is also typically used by the management software that receives it.
Even if everything is hardcoded to use numeric OIDs, and doesn't
actually need to load the MIB file, it's important to have this,
even if only to act as a design document.
Dave
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders