/* Send a trap under a context */ void send_trap_vars_with_context(int trap, int specific, netsnmp_variable_list *vars, const char *context) { if (trap == SNMP_TRAP_ENTERPRISESPECIFIC) netsnmp_send_traps(trap, specific, objid_enterprisetrap, OID_LENGTH(objid_enterprisetrap), vars, context, 0); else netsnmp_send_traps(trap, specific, trap_version_id, OID_LENGTH(trap_version_id), vars, context, 0); }
void send_enterprise_trap_vars(int trap, int specific, oid * enterprise, int enterprise_length, netsnmp_variable_list * vars) { netsnmp_send_traps(trap, specific, enterprise, enterprise_length, vars, NULL, 0); return; }
/** * Similar to send_v2trap(), with the added ability to specify a context. If * the last parameter is NULL, then this call is equivalent to send_v2trap(). * * @param vars is used to supply the list of variable bindings for the trap. * * @param context is used to specify the context of the trap. * * @return void * * @see send_v2trap */ void send_v3trap(netsnmp_variable_list *vars, const char *context) { netsnmp_send_traps(-1, -1, trap_version_id, OID_LENGTH(trap_version_id), vars, context, 0); }