Question

I'm looking at VMWare's MIB file and they have the following structure (obviously trimmed down):

vmwVmTable OBJECT-TYPE SYNTAX      
    SEQUENCE OF VmwVmEntry 
    ....

vmwVmEntry OBJECT-TYPE 
    SYNTAX VmwVmEntry 
    ....
VmwVmEntry ::= SEQUENCE { vmwVmIdx  Integer32, ... 

vmwVmIdx OBJECT-TYPE 
    SYNTAX Integer32 (0..65535) 
    MAX-ACCESS  not-accessible

So vmwVmIdx is the index into the table, but it's marked not-accessible. And sure enough, if you request it, nothing is returned. So how is the index to the table determined? I've seen apps that can display this table, but how?

Do all the applications just look at the last integer of the OID for each object that was retrieved and assume that is the index? And if that is the case, how does it square with my other somewhat related question?

Was it helpful?

Solution

After doing some research, it's considered best practice to make the index column non-accessible. So you really do take just the last bit of an OID and use that for the index.

Thus, when looking at entries in a table, you append table.entryName. Below that you will have the column names (and thus you have to have a MIB to know this, which you needed to know you were looking at a table anyway).

Once you have table.entryName.columnName, then see what entries you have below. Whatever you have after that for the OID of each retrieved value is the index.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top