Template:FAQ:Coding 22

From Net-SNMP Wiki
Revision as of 14:24, 29 December 2006 by Dts12 (Talk | contribs) (5.4 release synchronisation)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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.