Re: Implementing tables with fewer source files
"Dave Shield" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
2008/9/3 Joshua Tolley <[email protected]>: > Admittedly, though, I'd hoped for code that *really was* smaller. It > seems that despite the fact that each table is structured uniquely, > each of the tables should share almost all the code. Most of the other table helpers would do precisely that. The MfD framework has a significantly different aim - it's designed to provide code specifically tailored to a particular table, and hide as much of the "standard" processing as possible. The table implementor can concentrate on a number of very tightly focused routines for individual column objects, without having to worry at all about how they might be used. But the standard processing code is effectively duplicated for each table independently. Most of the other mib2c table configs generate a single code file, containing both the column-specific code and a certain amount of standard processing code. But they tend to make greater use of shared table helpers, so there is more re-used code than in the MfD framework. Wes tends to recommend the iterator helper, I've a preference for the container-based 'tdata' approach. But there are a number of MIB modules implemented using a variety of table mechanisms. Have a play with the mib2c.*.conf files, and look at some of the existing modules, and see which you prefer. Dave ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users