blob: d756066cace036368774065fa984b3db41c20836 [file] [log] [blame]
@open -@
mib2c has multiple configuration files depending on the type of
code you need to write. You must pick one depending on your need:
GENERATING CODE FOR SCALAR OBJECTS:
If you're writing code for some scalars, run:
mib2c -c mib2c.scalar.conf ${name}
If you want to magically "tie" integer variables to integer scalars,
use:
mib2c -c mib2c.int_watch.conf ${name}
GENERATING CODE FOR TABLES:
If your table data is kept somewhere else (e.g. it's in the
kernel and not in the memory of the agent itself) and you need to
"iterate" over it to find the right data for the SNMP row being
accessed. See the agent/mibgroup/mibII/vacm_context.c file for an
example:
mib2c -c mib2c.iterate.conf ${name}
If your table data is kept in the agent (i.e. it's not located in
an external source) and is purely data driven (i.e. you do not need
to perform any work when a set occurs). See the
agent/mibgroup/examples/data_set.c file for an example of such a table:
mib2c -c mib2c.create-dataset.conf ${name}
If your table data is kept in the agent (i.e. it's not located in
an external source), and you can keep your data sorted by the table
index but you do need to perform work when a set occurs:
mib2c -c mib2c.array-user.conf ${name}
GENERATING HEADER FILE DEFINITIONS
To generate just a header with a define for each column number in
your table:
mib2c -c mib2c.column_defines.conf ${name}
To generate just a header with a define for each enum for any
column containing enums:
mib2c -c mib2c.column_enums.conf ${name}
GENERATING CODE FOR THE 4.X LINE OF CODE (THE OLDER API)
mib2c -c mib2c.old-api.conf ${name}