Difference between revisions of "Template:FAQ:Coding 22"

From Net-SNMP Wiki
Jump to: navigation, search
 
(5.4 release synchronisation)
 
Line 1: Line 1:
 +
<!-- NB:
 +
  There is a mismatch between the template numbering
 +
  for this entry, and the FAQ entries that refer to it.
 +
  This follows a review of the entries in the
 +
  Coding section.
 +
-->
 
It doesn't matter which API call you use to specify the
 
It doesn't matter which API call you use to specify the
trap - <CODE>'send_easy_trap', 'send_v2trap'</CODE> or one of the other
+
trap - <CODE>'send_easy_trap()', 'send_v2trap()'</CODE> or one of the other
 
calls mentioned above.  Generating an SNMPv3 notification
 
calls mentioned above.  Generating an SNMPv3 notification
 
(rather than a community-based one) is controlled by the
 
(rather than a community-based one) is controlled by the

Latest revision as of 14:24, 29 December 2006

It doesn't matter which API call you use to specify the trap - 'send_easy_trap()', 'send_v2trap()' or one of the other calls mentioned above. Generating an SNMPv3 notification (rather than a community-based one) is controlled by the snmpd.conf file.

To send an SNMPv3 trap, this file should contain a 'snmpsess' directive, specifying the version, security level, user name and passphrases (if applicable), as well as the destination address. This is basically the same as the command line required for sending the trap manually, using 'snmptrap'.

Note that (unlike 'snmptrap') this directive does not read default settings from an 'snmp.conf' file, so these must be specified explicitly in the 'snmpsess' line.