Hello Joan, I have used that function to create the var, but the issue is the function send_v2trap() has only 1 argument, so it must be OID, while the function send_enterprise_trap_vars() has 2 arguments, so I can use the 1st for OID and the 2nd for its value Dear Joan,
I got it. So it adds to append to the var as long as we want ;-) Thanks so so much for your very geat help, Joan Best Regards, Duy-Ky ----- Original Message ----- From: "Joan Landry" <[EMAIL PROTECTED]> To: "Duy-Ky Nguyen" <[EMAIL PROTECTED]>; <[email protected]> Sent: Thursday, September 25, 2008 4:35 AM Subject: RE: Generating SNMP Trap from example notification I think you need to use: snmp_varlist_add_variables(...) To add each variable prior to calling send_v2_trap(var_list) -----Original Message----- From: Duy-Ky Nguyen [mailto:[EMAIL PROTECTED] Sent: Thursday, September 25, 2008 1:24 AM To: [email protected] Subject: Generating SNMP Trap from example notification Hello, I'm able to get SNMP traps by compiling snmp with option --with-mib-modules=examples/notification. It appears to me the function "send_v2trap()" sends out the trap with OID only I looked into others examples and found another function "send_enterprise_trap_vars()" appears to send valus along with OID However I'm not able to get the trap My questions are (1) Is it possible to use the function "send_v2trap()" to send out traps with both OID and its value ? (2) If not, what function should I use to replace the function "send_v2trap()" in the example notification.c to send out both OID and value ? (2) If not, how to get the function "send_enterprise_trap_vars()" to work properly ? Thanks so much for your help, Duy Kyng ------------------------------------------------------------------------ - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ 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 ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ 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
