logo       

Re: generating code for traps with mib2c: msg#00306

network.net-snmp.user

Subject: Re: generating code for traps with mib2c



> although I have copied the missing file
> to the /usr/local/share/snmp directory, the mib2c script is still
> not able to generate code for scalars and traps on a single file.

Correct.
The mib2c script is fairly single minded, and does one thing at a time.

> I have seen also that it is not possible to generate code for
> tables and scalars on a single file.

Also correct.
The mib2c script is fairly single minded, and does one thing at a time,
even if this is very similar to something that it's just said
(sorry, I mean "something that it's just done").


> In order to use mib2c, I will put tables, scalars and traps on
> different branches of the MIBs.

Well, they're inherently going to use different OIDs anyway,
so that would tend to be fairly sensible. But if they're all
mixed up together, you can still use mib2c on the "top level" OID.
The config script ignores anything it isn't expecting to handle.

You'll just have to run mib2c three times - once for each type
of object.

> Then I will generate the code for the MIB using several files,
> one for scalars, one for traps and one or more for tables.

Yup.
But of course, you can always merge those files together afterwards.
Remember, mib2c just generates a *template*. You can tweak that
code however you like afterwards - including pulling things into
one if you'd rather work that way.
(That's certainly what I'd tend to do, unless there were a
large number of scalar objects)

Dave



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@xxxxxxxxxxxxxxxxxxxxx
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise