tfSetColdStartTrap

Jump to: navigation, search

Table of Contents >> SNMP Programmer's Reference


#include <trapi.h>


int tfSetColdStartTrap (
ttConstCharPtr comNamePtr,
ttConstSockAddrStoragePtr trapDestPtr,
int flags
);


Function Description

This function lets the user configure the Cold start trap the agent will send. When the agent starts, it can send cold start traps to an SNMP manager to indicate it is up and running. This function must be called prior to starting the agent, since cold start traps are sent only at startup.


Parameters

  • comNamePtr
    The SNMP community name the trap will be sent to.
  • trapDestPtr
    The trap destination ip adress structure. The addr, ss_len, ss_family and ss_port fields of the sockaddr_storage structure must be correctly set.
  • flags
    Indicates which SNMP version to NOT use when sending the coldstart traps. This is a bitwise flags field and the valid values may be OR'ed together. The valid values are:
  • TM_SNMP_CLDSTRT_TRAP_NO_V1 - Do not send an SNMPv1 coldstart trap
  • TM_SNMP_CLDSTRT_TRAP_NO_V2C - Do not send an SNMPv2c coldstart trap
  • TM_SNMP_CLDSTRT_TRAP_NO_V3 - Do not send an SNMPv3 coldstart trap
  • TM_SNMP_CLDSTRT_TRAP_NONE - Do not send any coldstart traps


Returns

  • TM_ENOERROR
    Success.
  • TM_Community_TOOLONG
    comNamePtr is longer than TM_SNMP_MAX_COMMUNITY_LEN.
  • TM_ALLOCATION_ERROR
    Failure to allocate memory for the agent global variables.
  • TM_AGENT_RUNNING
    Failure, agent is already running.


Table of Contents >> SNMP Programmer's Reference