1.2.1.19.55 TCPIP_SNMPV3_EngineUserDataBaseGet Function

C

bool TCPIP_SNMPV3_EngineUserDataBaseGet(
    TCPIP_SNMPV3_USERDATABASECONFIG_TYPE userDataBaseType, 
    uint8_t len, 
    uint8_t userIndex, 
    void * val
);

Description

This function is used to set SNMPv3 Engine data base details using TCPIP_SNMPV3_USERDATABASECONFIG_TYPE enumeration.

Preconditions

TCPIP_SNMP_Initialize() is already called.

Parameters

ParametersDescription
userDataBaseTypeSNMPv3 data base configuration type.
lenNumber of bytes need to be read from data base.
userIndexSNMPv3 user index.
valVoid pointer to a any data type. Length parameter value is changed according to data type.

Returns

None.

Remarks

None.

Example

bool TCPIP_SNMP_VarbindGet(SNMP_ID var, SNMP_INDEX index, uint8_t* ref, SNMP_VAL* val)
{
    switch(var)
    {
        case USER_SECURITY_NAME:
            if(index < TCPIP_SNMPV3_USM_MAX_USER)
            {
                if(TCPIP_SNMPV3_EngineUserDataBaseGet(SNMPV3_USERNAME_CONFIG_TYPE,myRef,index,&val->byte) == false)
                {
                    *ref = SNMP_END_OF_VAR;
                }
                else
                {
                    myRef++;
                    *ref = myRef;
                }
                return true;
            }
            break;
    }
}