Re: related tables design
"Dave Shield" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
On 10/01/2008, Xuan Pan <[email protected]> wrote: > If I have two tables, one of them references the other. ...How do I define > those two tables, DHCP settings table and DHCP client IP range table > in a MIB file... If the two tables have the same indexing style (e.g. both indexed by a single integer), then define one table in the normal manner: dhcpSettingsEntry OBJECT-TYPE : INDEX { dhcpSettingsIndex } : and then define the other table as AUGMENTing the first: dhcpIPRangeEntry OBJECT-TYPE : AUGMENTS { dhcpSettingsEntry } : If the second table has a more complex structure, then the indexing of this table would look like: dhcpIPRangeEntry OBJECT-TYPE : INDEX { dhcpSettingsIndex, dhcpIPRangeIndex } : where dhcpSettingsIndex is an object in the dhcpSettingsTable, not the dhcpIPRangeTable. There are examples of both of these styles in the HOST-RESOURCES-MIB See hrSWRunTable/hrSWRunPerfTable (AUGMENTS) and hrDeviceTable/hrPartitionTable (shared INDEX) > .... and the code. The surprising thing is that you don't actually need to worry about this when implementing the tables. As long as the underlying data for the two tables is consistent, you can implement the tables separately. The underlying data is sufficient to form the linkage. Dave ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ 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