Re: in case of a table has not primitive types:agent/mibgroup/examples/data_set.c
"Alexander Bubnov" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
Hi! Thanks a lot, Mike! 2008/7/24 Mike Ayers <[email protected]>: > >> From: [email protected] >> [mailto:[email protected]] On >> Behalf Of Alexander Bubnov >> Sent: Wednesday, July 23, 2008 4:56 AM > >> I created more complex table: >> >> +--complexTable(3) >> | >> +--specialCase(1) >> | Index: i1 >> | >> +-- -RW- INTEGER i1(1) >> | >> +--struct(2) >> | Index: i2 >> | >> +-- -RW- INTEGER i2(1) >> +-- -RW- String field1(2) >> +-- -RW- String field1(3) >> >> Below table includes other table... my question is what interface >> should I use to work with aggregate types, not with primitive type. > > You cannot do this. Specifically, the SMI rules forbid putting anything but a primitive type in a table. However, you can have multiple indices: > > +--notComplexTable(3) > | > +--Entry(1) > | Index: i1, i2 > | > +--struct(2) > | > +-- -NA- INTEGER i1(1) > +-- -NA- INTEGER i2(1) > +-- -RW- String field1(2) > +-- -RW- String field1(3) > > Note that the access of the index is not-accessible, since it is returned as part of the OID anyway. > > It may be helpful to note that MIBs should not be constructed as if they were data structures, but rather as if they were database tables. It is still possible to represent arbitrary data models, but the techniques one uses are different. > > > HTH, > > Mike > -- /BR, Alexander ------------------------------------------------------------------------- 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