2009/6/4 kusuma.bm <kusuma...@globaledgesoft.com>:
> i would like to know the mib2c command format that has been used to
> generate the VACM MIBS that exposes API's like vacm_parse_group,
> vacm_parse_access and vacm_parse_view

The vacm_parse_xxx  routines are hand coded, and weren't generated
via mib2c.    They are really concerned with reading settings in from
the config file, and creating suitable entries in the internal tables,
rather than working with MIB variables as such.

The corresponding MIB-side processing  (in mibII/vacm_vars.c)
is basically carried over from the old UCD agent, and uses the
old-style v4 MIB API.   We wouldn't advise you to develop new code
in this style - it's much less efficient than the newer handler-based
approach, and there's much more coding involved - particularly for
non-integer indexed tables.

If you insist on working with this MIB interface, then mib2c.old-api.conf
would generate a vaguely sensible starting point.   But the output is
not particularly solid or complete, and you'll have a lot of manual
coding to get it to a useable state.



>                                                     i want to generate code
> for a mib snmpTargetAddrExtTable , and  i want it to be generated in the
> above format ie like parse functions.

The simplest way to do this would probably be to start from the
existing 'snmpTargetAddrEntry' code (under agent/mibgroup/target)

Just add another couple of fields to the targetAddrTable_struct data
structure, anothyer couple of branches to the cases statement in the
var_snmpTargetAddrEntry routine, and extend the parse_ and
store_snmpTargetAddrEntry routines to handle these extra fields.
   Then define a new "struct variable2' array to hold information about
the extension table, and register this within the init routine.

That's definitely going to be the easiest way to implement this table.

Dave

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
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