
Hi!
Jason> I'm evaluating the smidump tool provided with libsmi v0.2.16 on Jason> SunOS as part of subagent development using JAX. The problem Jason> involves the Java classes generated to represent SNMP traps (v1 Jason> or v2). If a trap has a VARIABLES (v1) or OBJECTS (v2) clause Jason> containing two or more variables from the same MIB group then Jason> the Java class that is generated to represent the trap does not Jason> compile. The reason is that the constructor for the generated Jason> trap class takes a parameter for each variable in the trap Jason> definition, and if the variables are from the same group then Jason> the result is a duplication of parameters in the constructor.
This has been reported by Teemu Koponen and fixed on 2001-06-11, which was after the last libsmi release. So, please fetch libsmi via anonymous CVS until we'll release 0.2.17. The generated will now look like this:
public LinkDown(IfEntry ifEntry_1, IfEntry ifEntry_2, IfEntry ifEntry_3) {
instead of
public LinkDown(IfEntry ifEntry, IfEntry ifEntry, IfEntry ifEntry) {
Jason> I haven't seen any restrictions in the RFCs preventing a trap Jason> from containing multiple variables from the same MIB group, so Jason> it seems to me that this is a bug in the generated JAX code. Jason> Am I right that this is a problem, and if so, will it be fixed Jason> anytime soon?
Sure, this is/was a problem. Note that the solution is *not* to make the code generator to put just one argument of each MIB group into the argument vector, because the MIB could relate to different instances of the same group. Unfortunately, this cannot be expressed formerly, so that the libsmi code generate has no chance to combine those arguments that refer to a common group instance.
-frank -- !! This message is brought to you via the `libsmi' mailing list. !! Please do not reply to this message to unsubscribe. To subscribe or !! unsubscribe, send a mail message to libsmi-request@ibr.cs.tu-bs.de. !! See http://www.ibr.cs.tu-bs.de/projects/libsmi/ for more information.