Jump to main content

##

# TCPIP_SNMP_IsValidCommunity Function

## C

    uint8_t TCPIP_SNMP_IsValidCommunity(
        uint8_t* community
    );

## Description

This function validates the community name for the MIB access to SNMP manager. The SNMP community name received in the request PDU is validated for read and write community names. The agent gives an access to the mib variables only if the community matches with the predefined values. This routine also sets a global flag to send trap if authentication failure occurs.

## Preconditions

TCPIP_SNMP_Initialize() is called.

## Parameters

Parameters | Description
--- | ---
community | Pointer to community string as sent by SNMP manager.

## Returns

- This function returns the community validation result as READ_COMMUNITY or WRITE_COMMUNITY or INVALID_COMMUNITY.

## Remarks

This is a callback function called by module. User application must implement this function and verify that community matches with predefined value. This validation occurs for each SNMP manager request.