RE: How the SNMP read(differentiate) the different indexes in the OID ?

Dheeraj Gautam <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
>> How the SNMP read(differentiate) the different indexes in the OID ?
In this particular case 3 of them of are of fixed length, so SNMP specs tell how to interpret the indexes. Ip address is in dotted format, so there will be 3 dots for ip. In case variable length( e.g name), it needs to prepended with number of characters in the index. E.g
Index 1: name1 (varaiable length)
Index2:  new-name2 (varaiable length)

Now the index for any ROW for the table will be
5.ASCII(n).ASCII(a).ASCII(m).ASCII(e).ASCII(1).9. ASCII(n).ASCII(e).ASCII(w).ASCII(-).ASCII(n).ASCII(a).ASCII(m).ASCII(e).ASCII(2)

5 here is length of "name1" and 9 is length of "new-name2"

For fixed length string or IP Addresses, lndeth doesn't have to pre-pended


>> How net-snmp code find out this object having  4 indexes ?
To use net-snmp code needs to know the MIB, then only net-snmp can handle the request else it will respond back with "Unkown OID". Somebody has to compile MIB and fill the needed places to net-snmp to accept a OID


Is there any net-snmp function available(Or similar which I can modify and use) which will separate out the different Indexes
>> I am not sure of a function. I believe the generated code will have access to all the indexes. I believe it will be good if you try to compile a MIB, see the data-structures generated. On generation of code, there is structure generated for indexes also. Look for GENERATED_TABLE_mib_index.

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.