> I am working with RH9, Net-SNMP 5.1.2, and the 802.11 MIB.  I notice
> that the output of mib2c is different, depending on use of the UCD
> versus NET formats.

Yes - this is the difference between the old (v4) and new (v5) MIB APIs.

>             Specifically, UCD generates names and OID's that
> are not generated for NET.

We've already discussed this back in July
(see the thread "Issues with the mib2c")

The v4 mib2c (and the old-api v5 config) generate a single template
for the whole of the specified subtree, leaving most of the details
up to the programmer.
  The various main v5 mib2c configs each generate a more specialised
template, ignoring any MIB objects that aren't relevant to that
particular config.   So the scalar config will *only* generate code
for scalar objects, and will ignore any tables.  Similarly, the
various table configs will ignore any scalar objects.   And both
of them ignore notifications.




> Now, in the c code file produced by mib2c for the UCD format,

Is this using the v4 version of the mib2c script, or the v5 mib2c
with the 'old-api' config?


> we see that dot11ResourceTypeIDName is described in the variable
> 
> struct variable4 ieee802dot11_variables[] = {
> 
> {DOT11RESOURCETYPEIDNAME, ASN_OCTET_STR, RONLY, var_ieee802dot11, 1, {1}},
> 
> ...
> 
> }

That looks like an 'old-api' config problem.
Please note that this config is something of a hack, and is *NOT*
suitable for serious use.   If you're using a v5 release, then we
strongly, strongly, strongly recommend that you use the v5 MIB API.

  If you prefer to use the v4 style, then you'll be *much* better off
installing the v4 mib2c script, and using that instead.   The output
will be fine for use with the v5 agent - it's just the mib2c script
that struggles.



> Now, if I instead compile the MIB for the NET format, the variable does
> not get generated, at all.

Which mib2c config file did you use?
Saying "the NET format" is not sufficient - there are a dozen or more
different v5 mib2c config files, and which one you use will affect the
code that's produced.


>                         Why should the output of mib2c be different,
> based on a change in the selection of format, for the same input MIB?

Because that's the whole point of the config file - to define the
structure of the output.   If the output was the same every time,
there'd be little point in having different configs in the first place! :-)

Dave



-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
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

Reply via email to