Dave> Yup, it's your nightmare scenario - I'm finally looking
Dave> seriously at the MfD helper :-)
Robert> Aaaaaaauuuuuuugggggghhhhhhh! Why does everyone want to poke
Robert> at it and find bugs now that we're frozen!?!?
Well, I did suggest a longer development freeze, but was shot down
in flames. I'm just following the general trends :-)
Dave> routines 'myTable_undo_setup' and 'myTable_undo_cleanup',
Dave> which are not defined anywhere in the generated template code.
Robert> This has already been reported, and fixed in cvs.
Fine. I'll pick that up later.
Dave> The second place where this code failed to compile was in the
Dave> 'myTable_cache_load' routine. This seems to refer to various local
Dave> variables that weren't actually declared for some (but not all) of the
Dave> column object fields.
Robert> Hmm.. that's not good. Can you send me your test MIB?
Try
mib2c -c mib2c.mfd.conf NET-SNMP-EXAMPLES-MIB::netSnmpIETFWGTable
and then look at 'netSnmpIETFGWTable_data_access.c'
Immediately following the end of the Example Code block (lines 264/5 in
my version), there's mention of 'nsIETFName' (which *is* declared in this
routine), followed by nsIETFWGChair1 (lines 298-307) and nsIETFWGChair2
(lines 326-335) which aren't.
Dave> I'm probably rather confused over what is meant to be ready-to-go
Dave> code, and what is template code that I need to change.
Robert> Oh bother. I thought I had done pretty well with the comments.
Actually, the problem I'm finding is that there's almost too *much*
description (some very localised, some more general), and it's difficult
to get a clear overview. I'm sure it will all fall into place once I've
a better idea of how it all fits together, but at the moment I feel like
I'm drowning in caterpillers :-)
That's actually why I've repeatedly putting off looking at this helper.
Every time I started, I kept feeling overwhelmed!
Robert> Maybe not would be a good time to link in the tutorial to the
Robert> main tutorial page. Take a gander at it and see if it helps [and]
Robert> check out the Function Flow section of myTable-README-myTable.txt.
Thanks - will do.
Minor point - that last section seems to have hardwired references to
'ipAddressIfIndex' rather than xxxColumn. It's fairly clear what you
mean, but....
Robert> check out the Function Flow section of myTable-README-myTable.txt.
Dave> Are there any examples of how to
Dave> set up the initial contents of an MfD-based table?
Robert> 1) in myTable_container_init, create your container instead of
Robert> letting the interface code do it for you.
OK - that would let me insert stuff within the 'myTable_container_init'
routine. Is there any way to get hold of the container at a later
stage - e.g. in the 'initialize_table_myTable' or 'init_myTable' routines
(where this has tended to be handled with the other helpers) ?
Or is that what you mean by:
Robert> 2) put a function in myTable_interface.c to return the container
Robert> from myTable_if_ctx.container. This could be called from data_init.
Dave
-------------------------------------------------------
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