On Tue, 23 Nov 2004 11:57:05 +0000 Dave wrote: DS> Dave> The second place where this code failed to compile was in the DS> Dave> 'myTable_cache_load' routine. This seems to refer to various local DS> Dave> variables that weren't actually declared for some (but not all) of DS> the Dave> column object fields. DS> DS> Try DS> mib2c -c mib2c.mfd.conf NET-SNMP-EXAMPLES-MIB::netSnmpIETFWGTable DS> DS> and then look at 'netSnmpIETFGWTable_data_access.c' DS> Immediately following the end of the Example Code block (lines 264/5 in DS> my version), there's mention of 'nsIETFName' (which *is* declared in this DS> routine), followed by nsIETFWGChair1 (lines 298-307) and nsIETFWGChair2 DS> (lines 326-335) which aren't.
Ah, ok. Variables are declared for indexes, since you are likely to need temporary storage to create the index before creating the rowreq context. The other two are assigning data to the data context, and thus should be real values. Until recently, those variable names were of the form TODO_FIND_nsIETFWGChair2, which made it pretty obvious what was needed. BTW, you might want to use a test table with multiple types in it. If you had, you would have found another bug - integer vars would have been different that the indexes and the octet strings - undeclared and unreferenced. DS> Dave> I'm probably rather confused over what is meant to be ready-to-go DS> Dave> code, and what is template code that I need to change. DS> Robert> Oh bother. I thought I had done pretty well with the comments. DS> DS> Actually, the problem I'm finding is that there's almost too *much* DS> description (some very localised, some more general), and it's difficult DS> to get a clear overview. I'm sure it will all fall into place once I've DS> a better idea of how it all fits together, but at the moment I feel like DS> I'm drowning in caterpillers :-) Hopefully the cmd line I send to generated the ordered todo list will help a little, at least in terms of where to go first. I'm a little disappointed (but not too surprised) that the README files didn't help. Suggestions welcomed! DS> Minor point - that last section seems to have hardwired references to DS> 'ipAddressIfIndex' rather than xxxColumn. It's fairly clear what you DS> mean, but.... Oops.. fixed. DS> Is there any way to get hold of the container at a later DS> stage - e.g. in the 'initialize_table_myTable' or 'init_myTable' routines DS> (where this has tended to be handled with the other helpers) ? No. Maybe it should be added as a parameter to one of them... DS> Or is that what you mean by: DS> DS> Robert> 2) put a function in myTable_interface.c to return the container DS> Robert> from myTable_if_ctx.container. This could be called from data_init. Yes, that's what 2 was. I'd rather not expose the internals any more than I have to. Maybe I should add insert/find/delete utility routines. That would allow containers to be replaces with something else without requiring the user code to change... hmmmm... -- Robert Story; NET-SNMP Junkie Support: <http://www.net-snmp.org/> <irc://irc.freenode.net/#net-snmp> Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-coders> You are lost in a twisty maze of little standards, all different. ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ Net-snmp-coders mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
