OIDLookup Function

Microchip TCP/IP Stack

Microchip TCP/IP Stack Help
OIDLookup Function
C
BYTE OIDLookup(
    PDU_INFO* pduDbPtr, 
    BYTE* oid, 
    BYTE oidLen, 
    OID_INFO* rec
);
Description

The MIB database is stored with the agent in binary mib format. This is the binary mib format: , , ...>]}, ChildNode variable bind name is a dotted string of oid. Every oid is a node in the MIB tree and have varied information. This routine on reception of the snmp request, will search for every oid in the var name. This routine will return information whether the requested var name is part of the MIB tree data structre of this agent or not.

Preconditions

Valid snmp request with valid OID format is received.

Parameters
Parameters 
Description 
pduDbPtr 
Pointer to received snmp pdu elements information 
oid 
Pointer to the string of OID to be searched 
oidLen 
Oid length 
rec 
Pointer to SNMP MIB variable object information 
Return Values
Return Values 
Description 
TRUE 
If the complete OID string is found in the mib 
FALSE 
If complete OID do not match. Also different erros returned are SNMP_END_OF_MIB_VIEW SNMP_NO_SUCH_NAME SNMP_NO_SUCH_OBJ SNMP_NO_SUCH_INSTANCE 
Remarks

This routine works for the MPFS2 mib storage format. It uses the MPFS2 APIs to read,search and collect information from the mib database.

Microchip TCP/IP Stack 5.42.08 - June 15, 2013
Copyright © 2012 Microchip Technology, Inc.  All rights reserved.