> I'd like to send an SNMP trap from my application,
> with multiple parameters along with it.
>
> Does the MIB standards support this?
Yes.
> If the MIB standards support this, does net-snmp support this?
Yes.
> For exmaple, if I design a trap in my MIB for detecting large file sizes.
> I need to send the following parameters along with the trap.
> a. Name of the file
> b. Size of the file
>
> Now how can I integrate these parameters into my MIB,
> Do I need to use a SEQUENCE{} in my MIB for grouping the two parameters?
I suggest that you get hold of a good book on MIB design.
The standard work is "Understanding SNMP MIBs".
This is invaluable if you're going to do anything more than cobble
something together from existing MIBs, and hope that it's correct.
But what you actually need is an "OBJECTS" clause.
See the definitions of IF-MIB::linkUp and IF-MIB::linkDown
for an example.
> and how do I use
> 'snmptrap' with these parameters from my application.
You can give "snmptrap" a list of name/type/value triplets in exactly
the same way as for "snmpset". These will be added to the varbind list
when the trap is sent.
For doing this programmatically, the best starting point is probably
to use
"mib2c -c mib2c.notify.conf myNotification"
which will construct a suitable routine for generating that trap.
You can then use this as a template for your own application.
Dave
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_idG21&alloc_id040&op=click
_______________________________________________
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