This manual page is for Mac OS X version 10.6

If you are running a different version of Mac OS X, view the documentation locally:

  • In Terminal, using the man(1) command

Reading manual pages

Manual pages are intended as a quick reference for people who already understand a technology.

  • For more information about the manual page format, see the manual page for manpages(5).

  • For more information about this technology, look for other documentation in the Apple Reference Library.

  • For general information about writing shell scripts, read Shell Scripting Primer.



SNMP_TRAP_API(3)                                  Net-SNMP                                  SNMP_TRAP_API(3)



NAME
       send_easy_trap, send_trap_vars, send_v2trap - send TRAPs or INFORMs from a Net-SNMP MIB module

SYNOPSIS
       #include <net-snmp/agent/agent_trap.h>

       void send_easy_trap(int trap, int specific);

       void send_trap_vars(int trap, int specific, struct variable_list *vars);

       void send_v2trap(struct variable_list *vars);

DESCRIPTION
       These three routines may be used to send traps from a MIB module within the Net-SNMP agent (including
       an AgentX subagent).

       send_easy_trap() sends an SNMPv1 trap (or the SNMPv2 equivalent) to the list of configured trap  des-tinations destinations
       tinations (or "sinks"), using the provided values for the generic trap type, and specific trap value.

       send_trap_vars() is similar, but appends the supplied list of variable bindings to the traps that are
       sent.

       send_v2trap()  uses  the  supplied list of variable bindings to form an SNMPv2 trap, which is sent to
       SNMPv2-capable sinks on the configured list.  An equivalent INFORM is sent to the configuredq list of
       inform sinks.  Sinks that can only handle SNMPv1 traps are skipped.

       The  various  "send_trap()"  calls  allow you to specify traps in different formats.  And the various
       "trapsink" directives allow you to specify destinations to  receive  different  formats.   But  *all*
       traps are sent to *all* destinations, regardless of how they were specified.
       I.e. it's
                                                ___  trapsink
                                               /
           send_easy_trap ___  [  Trap      ] ____  trap2sink
                           ___  [ Generator  ]
           send_v2trap    /     [            ] ----- informsink
                                               ____
                                                     trapsess

       *Not*
            send_easy_trap  ------------------->  trapsink
            send_v2trap     ------------------->  trap2sink
            ????            ------------------->  informsink
            ????            ------------------->  trapsess

WARNINGS
       These  routines  are used to send the traps immediately they are called.  Invoking them at the appro-priate appropriate
       priate time is left to the MIB module programmer.

SEE ALSO
       snmpd.conf(5), snmptrapd(8)



4.2 Berkeley Distribution                        7 Mar 2002                                 SNMP_TRAP_API(3)

Reporting Problems

The way to report a problem with this manual page depends on the type of problem:

Content errors
Report errors in the content of this documentation with the feedback links below.
Bug reports
Report bugs in the functionality of the described tool or API through Bug Reporter.
Formatting problems
Report formatting mistakes in the online version of these pages with the feedback links below.