tfModifyCommunity

Jump to: navigation, search

Table of Contents >> SNMP Programmer's Reference


#include <trapi.h>


int tfModifyCommunity (
int which,
ttCharPtr targetPtr,
ttCharPtr sourcePtr
);


Function Description

This function lets the user modify a community string in the list of communities. The user must indicate which pool is being referenced, WRITE or READ, by setting the which parameter. The user much also specify the community to be modified, targetPtr and sourcePtr. If using trilingual the communities are handled in the community table, which is part of the SNMPv3 framework.

Note Note: In trilingual mode do not use this API, use tfModifyCommunityTableEntry() instead.


Parameters

  • which
    Community flag, either TM_READ_COMMUNITY_FLAG or TM_WRITE_COMMUNITY_FLAG.
  • targetPtr
    Input parameter, community string to be modified.
  • sourcePtr
    Input parameter, new community string.


Returns

  • TM_ENOERROR
    Success.
  • TM_ALLOCATION_ERROR
    Failure to allocate memory for the agent global variables.
  • TM_RECORD_LOCKED
    Failure, communities list is locked.
  • TM_RECORD_NOTFOUND
    Failure, target community is not found
  • TM_UNKNOWN_COMMUNITY_FLAG
    Failure, which value is not defined
  • TM_COMMUNITY_TOOLONG
    Failure, source is too long
  • TM_COMMUNITY_NOT_PRINTABLE
    Failure, source contains unprintable characters
  • TM_NOMORE_COMMUNITIES
    Failure, exceeded the max number of communities set by TM_MAX_COMMUNITY_LEN


Table of Contents >> SNMP Programmer's Reference