2009/8/6 Michal Filka <michal.fi...@sitronics.com>:
> So, example which is located at
>    http://www.net-snmp.org/dev/agent/data__set_8c-example.html
> is good skeleton of required procedure?

Personally, I don't particularly like the way this particular helper
handles individual columns.   It's fine(ish) for tables that are purely
manipulated by the agent itself, but I find it cumbersome for anything
used "externally"  (be that importing data from elsewhere, or working
with the contents of the table).

My personal preference is to use the template structure generated
by "mib2c -c mib2c.tabledata.conf {table}"
   This defines a dedicated data structure for the contents of a row
of the table, but allows the agent to deal with all aspects of holding
the table as a collection of rows.

There are several examples of this in the agent source code.

But see the project FAQ, which has several entries discussing
the various table helpers.


> So, if I want to do a summary of the procedure, I have to:
> 1. Create the table model in the snmpd agent's memory
>     (I was thinking, if snmpd agent can do it automatically
>       according the MIB or if I have to do it manually)
> 2. Fill the table.

The "mib2c" tool will generate suitable template code,
typically including a data structure to hold the contents of a row.
You can tweak this data structure to match your requirement,
but would also need to make similar adjustments to the
code that processed the corresponding fields.

Try running
    mib2c -c mib2c.tabledata.conf {table}
or
    mib2c -S cache=1 -c mib2c.tabledata.conf {table}

and see whether the output is a suitable starting point for you.

Dave

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to