2010/1/6 Lv, Bo (EXT-Other - CN/Hangzhou) <[email protected]>:
>    the trap message sent from agent seems are the encoded message,
Yes

> I have to decode the message in my application for the trap information

Correct.
Use 'snmp_read()' to do this


> it seems I need to implement the snmptrapd logic agian

If you are writing a trap receiver then yes, you will effectively
need to duplicate the functionality of snmptrapd.

You might find it easier to let snmptrapd receive the trap,
parse it, and pass the information off to your application.


> the application need get the trap
> information(trap name, trap value ) from the agent.

What do you mean by "trap value"?

A notification will typically include an OID (to identify which
trap it is), and optionally, one or more varbinds (name/value pairs).
But there is no single value associated with the trap itself.

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-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to