MyWebUniversity.com Home Page
 



Darwin Mac OS X man pages main menu
SNMPTRAPAPI(3)                   Net-SNMP                   SNMPTRAPAPI(3)



NAME
       sendeasytrap,  sendtrapvars,  sendv2trap  -  send TRAPs or INFORMs
       from a Net-SNMP MIB module

SYNOPSIS
       ##include <>

       void sendeasytrap(int trap,, int specific);;

       void  sendtrapvars(int  trap,,  int  specific,,  struct   variablelist
       **vars);;

       void sendv2trap(struct variablelist **vars);;

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

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

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

       sendv2trap()  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 "sendtrap()" 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
                                               /
           sendeasytrap   [  Trap      ]   trap2sink
                             [ Generator  ]
           sendv2trap    /     [            ] ----- informsink
                                               
                                                     trapsess

       *Not*
            sendeasytrap  ------------------->  trapsink
            sendv2trap     ------------------->  trap2sink
            ????            ------------------->  informsink
            ????            ------------------->  trapsess

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

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



4.2 Berkeley Distribution         7 Mar 2002                  SNMPTRAPAPI(3)
Darwin Mac OS X man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™