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]>
Hello, all!

I am playing about with data_set.c example. It shows how to work with
tables by next structure:

+--mytable(1)
   |
   +--Entry(1)
      |  Index: index
      |
      +-- ---- String    index(1)
      |        Size: 1..32
      +-- CR-- String    name1(2)
      +-- CR-- String    name2(3)

as you can see here are three fields, one index and other
informational fields. They have primitive types, OCTET STRING. In
order to set row in that table I should use netsnmp_set_row_column()
fundtion, for example:

netsnmp_set_row_column(row, 2, ASN_OCTET_STR, "Linux", strlen("Linux"));
where third parameter is primitive type, next value of this type and its length.

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.

Thanks in advance.

-- 
/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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.