.TH SNMP_TRAP_API 3 "9 Dec 1999" .UC 5 .SH NAME snmp_trap_api \- sending a trap or notification from a UCD-SNMP MIB module .SH SYNOPSIS #include agent_trap.h .PP void send_easy_trap ( int trap, int specific ); .PP void send_trap_vars ( int trap, int specific, struct variable_list *vars ); .PP void send_v2trap ( struct variable_list *vars ); .PP .SH DESCRIPTION These three routines may be used to send traps from a MIB module within the UCD SNMP agent. .PP .I Send_easy_trap 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. .PP .I Send_trap_vars is similar, but appends the supplied list of variable bindings to the traps that are sent. .PP .I Send_v2trap uses the supplied list to form an SNMPv2 trap, which is sent to SNMPv2-capable sinks on the configured list. Sinks that can only handle SNMPv1 traps are skipped. .SH 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 programmer. .SH "SEE ALSO" snmpd.conf(5), snmptrapd(8)