tfSnmpV3SetTrapOptions

Jump to: navigation, search

Table of Contents >> SNMP Programmer's Reference


#include <trapi.h>


int tfSnmpV3SetTrapOptions (
int optionName,
const char TM_FAR * optionValuePtr,
int optionLength
);


Function Description

This function allows the user to set various parameters for Treck to use when sending SNMPv3 traps.

Currently the supported options are:

  • TM_SNMPV3_TRAP_USERNAME
  • TM_SNMPV3_TRAP_FLAGS

Valid flags are:

  • TM_SNMPV3_TRAPF_NOAUTH_NOPRIV
  • TM_SNMPV3_TRAPF_AUTH_PREFERRED
  • TM_SNMPV3_TRAPF_AUTH_REQUIRED
  • TM_SNMPV3_TRAPF_PRIV_PREFERRED
  • TM_SNMPV3_TRAPF_PRIV_REQUIRED

(NOTE: Privacy implies authentication)

If the username is set to "", this API will set the name to TM_SNMPV3_DEFAULT_TRAP_USERNAME. If the username is present in the USM user table, then those credentials (auth and privacy settings) will be used when sending the SNMPv3 trap.


Parameters

  • optionName
    The value corresponding to the option.
  • optionValuePtr
    The pointer to the option value).
  • optionLength
    Length of the option, cannot exceed TM_SNMP_MSG_USERNAME_LEN.


Returns

  • TM_ENOERROR
    No error.
  • TM_EINVAL
    Failure, invalid option or value.


Table of Contents >> SNMP Programmer's Reference