1.2.1.19.35 TCPIP_SNMP_RecordIDValidation Function

C

bool TCPIP_SNMP_RecordIDValidation(
    uint8_t snmpVersion, 
    bool idPresent, 
    uint16_t varId, 
    uint8_t * oidValuePtr, 
    uint8_t oidLen
);

Description

This is a callback function called by SNMP module. SNMP user must implement this function as per SNMP version. One need to add the new SNMP MIB IDs here as per SNMP version (e.g., SYS_UP_TIME (250) is common for V1/V2/V3). ENGINE_ID - is the part of V3; therefore, place all of the SNMPv3 var IDs within the macro TCPIP_STACK_USE_SNMPV3_SERVER.

Preconditions

TCPIP_SNMP_Initialize() is already called.

Parameters

ParametersDescription
snmpVersionDifferent SNMP version.
idPresentTrue if SNMP record ID is present, else false.
varIdDynamic record ID values as per mib.h.
oidValuePtrOID value pointer.
oidLenNumber of OIDs present to be processed.

Returns

  • True - A record ID exists.

  • False - A record ID does not exist.

Remarks

This function is specific for record ID validation and this can also be used to restrict OID string.