On Thu, 7 Jun 2007 07:30:03 -0700 (PDT) Need wrote: NH> 1) I updated my code a bit but for some reason the Table2_row_prep() routine is never called when I perform a "snmpwalk" of Table2. Any ideas why "Table2_row_prep()" is not being called at all (see the steps a-e below)?
Nope. Try running the agent with -DocS,verbose:ocS,internal:ocS and then do a snmpgetnext ocStbHostAnalogVideoTable. NH> b) I updated Table2 "_ocStbHostAnalogVideoTable_container_init()" routine with the following code only, which I believe should tell Table2 to use the same cache as Table1(ocStbHostAVInterfaceTable): right. I assume you don't get an error message about finding the cache, right? NH> d) When I start the SNMP agent the following flow is displayed. Does this seem correct so far? NH> NH> ENTER ocStbHostAnalogVideoTable_init_data() NH> EXIT ocStbHostAnalogVideoTable_init_data() NH> ENTER _ocStbHostAnalogVideoTable_container_init() NH> EXIT _ocStbHostAnalogVideoTable_container_init() NH> ENTER ocStbHostAVInterfaceTable_init_data() NH> EXIT ocStbHostAVInterfaceTable_init_data() NH> ENTER ocStbHostAVInterfaceTable_container_init() NH> EXIT ocStbHostAVInterfaceTable_container_init() NH> ENTER ocStbHostAVInterfaceTable_container_load() NH> EXIT ocStbHostAVInterfaceTable_container_load() Actually, I think you need to muck around a bit to make sure that ocStbHostAVInterfaceTable is initialized first, or it would have created the cache for the analog video table. NH> 2) In regards to "me" stating I will rebuild Table1 when the container_load() routine is called, "you" stated "You don't 'have' to start from scratch, but it's probably the easiest way". NH> NH> If I wanted to start from scratch and repopulate Table1, then I need to make sure to use the same index values for each row as I used before. In order to do this, I would assume I would need to store each index value by calling the "se_add_pair_to_slist" routine. Basically, I would need to link a unique text string to each of the index values being stored so when it comes time to repopulate the container (allocate new rows from scratch) then I can search for the unique text string (using the "se_find_value_in_slist" call) to find which index value was related previously then I can simply use that same index value for the regeneration of the container Table .... correct? right, though you could use some other method besides slists if you wanted. NH> Now, it would be nice if I did not have to regenerate the container used for Table1 everytime the container_load() routine was called, however, I am not sure how to do this? I thought Table1's container was freed(released) once the cache has expired and a new snmp request is received, so regenerating the container was necessary, but I guess I am wrong. How can a Table container be maintained and not be required to rebuild itself when the container_load() routine is called? If this will take a lot of effort to explain, then perhaps we should wait to have this discussion in the future, after my basic stuff is working. Although if this is an easy concept, then please explain. Check out the container load function(s) for ifTable. NH> 3) You indicate that the "Table2_row_prep()" routine will be called for each row in Table1. This is fine, since I can check whether the current row actually relates to Table2 easily by checking the "type" value defined in "Table1". If the row is not related to Table2, then you indicate I should return MFD_SKIP. Yes, this seems straightforward, however (and you probably know I would be asking this), what changes must I make to the table interface code of each of the secondary tables in order for them to handle the new MFD_SKIP return value? Actually by "interface code" do you mean the "xxxxx_interface.c" files need to be updated, or NH> are you referring to some other code file which would need to be updated? xxx_interface.c is the place. NH> Based on the "ifTable" tutorial, I assumed MFD_SKIP was used in data "GET" routines in which the data was not existing in the table, however, I guess using this value can be used for other things as well. So far, that's what it has been used for. But this is a reasonable use of it as well, I think. NH> 4) One extra question for you: Let's get back to this one after things are working. Keep in mind, the more questions you ask in a single message, to more likely I am to take longer to respond. I only have so many hours in the day! ------------------------------------------------------------------------- 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