Lines Matching refs:trap_msg
175 struct snmp_msg_trap trap_msg; in snmp_send_trap() local
183 trap_msg.snmp_version = 0; in snmp_send_trap()
188 if (snmp_get_local_ip_for_dst(snmp_traps_handle, &td->dip, &trap_msg.sip)) { in snmp_send_trap()
190 trap_msg.enterprise = snmp_get_device_enterprise_oid(); in snmp_send_trap()
192 trap_msg.enterprise = eoid; in snmp_send_trap()
195 trap_msg.gen_trap = generic_trap; in snmp_send_trap()
197 trap_msg.spc_trap = specific_trap; in snmp_send_trap()
199 trap_msg.spc_trap = 0; in snmp_send_trap()
202 MIB2_COPY_SYSUPTIME_TO(&trap_msg.ts); in snmp_send_trap()
205 tot_len = snmp_trap_varbind_sum(&trap_msg, varbinds); in snmp_send_trap()
206 tot_len = snmp_trap_header_sum(&trap_msg, tot_len); in snmp_send_trap()
215 snmp_trap_header_enc(&trap_msg, &pbuf_stream); in snmp_send_trap()
216 snmp_trap_varbind_enc(&trap_msg, &pbuf_stream, varbinds); in snmp_send_trap()