On Wed, 30 May 2007 13:07:28 -0700 (PDT) Need wrote: NH> 1) Table1 has the "ocStbHostAVInterfaceIndex" field which I believe represents the row index in the table. Actually. I believe this index field is used as the row index value generated within NetSNMP by doing the following: NH> NH> a) calling the "se_find_value_in_slist()" routine (from within the "container_load" procedure) to obtain a unique index NH> NH> b) calling the "ocStbHostAVInterfaceTable_allocate_rowreq_ctx" routine to allocate new storage row space NH> NH> c) storing the "ocStbHostAVInterfaceIndex" value into the row by calling the following: NH> NH> ocStbHostAVInterfaceTable_indexes_set(rowreq_ctx, ocStbHostAVInterfaceIndex) NH> NH> Is my interpretation correct? Am I using the "ocStbHostAVInterfaceIndex" index field as the row number correctly?
looks reasonable to me. NH> 2) You will notice Table2 does not have a specific "index" field defined, however the MIB file indicates Table2 is related to the "ocStbHostAVInterfaceIndex" field (which is defined from Table1). I have recently learned from this forum (thanks David) this means Table2 is simply an extension of Table1 and that Table1 is considered to be a sparse table. The MIB file states that when Table1's "ocStbHostAVInterfaceType" value indicates "1394", then Table2 data will exist, otherwise Table2 data will not exist. Actually, that terminology isn't quite correct. I don't think either table is sparse, but there is a sparse relationship between the tables. (See Davi Perkin's paper on inter-table indexing: http://www.simpleweb.org/bibliography/articles/general/per9804.pdf) NH> I am not sure how to populate Table2 data within the MfD framework. Since Table2 does not have a specific "index" field defined, then I am not sure how to generate rows for Table2 to store the data correctly. I responded to this in another of your threads, before I saw this thread... See my response there.. NH> I am also pretty sure I can not expand the data_context structure definition of Table1 to include the data fields defined in Table2, since this is not how the MIB file defined the Tables ...... they are defined to be separate tables. It's just code, you can do whatever you want! In fact, this is what the ifTable/ifXTable code does... the ifTable structures have been expanded to include the data for ifXTable entries. however, those tables have a 1-1 relationship, not a sparse relationship. But if you don't mind wasting the space in each row with all the fields for each table that augments table 1, you can simply put all the field definitions in table 1's data structure. If the fields are mutually exclusive, you could probably even use a union to reduce wasted space in the data context. Alternatively, you could just have the row indexes populated during the load, and use the row_prep function to fetch the row data as needed. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders