
Hello,
I'm evaluating the smidump tool provided with libsmi v0.2.16 on SunOS as part of subagent development using JAX. The problem involves the Java classes generated to represent SNMP traps (v1 or v2). If a trap has a VARIABLES (v1) or OBJECTS (v2) clause containing two or more variables from the same MIB group then the Java class that is generated to represent the trap does not compile. The reason is that the constructor for the generated trap class takes a parameter for each variable in the trap definition, and if the variables are from the same group then the result is a duplication of parameters in the constructor.
For example, if the OBJECTS clause of the pingNoResponse notification in the TUBS-IBR-PING-MIB example MIB is changed from { pingRtt, pingTimeout } to { pingAvgRtt, pingTimeout } so that both variables in the clause are from the pingStatistics group, then when the generated PingNoResponse.java source file is compiled the following error occurs: PingNoResponse.java:28: pingStatistics is already defined in PingNoResponse(PingStatistics,PingStatistics) public PingNoResponse(PingStatistics pingStatistics, PingStatistics pingStatistics) {
^
I haven't seen any restrictions in the RFCs preventing a trap from containing multiple variables from the same MIB group, so it seems to me that this is a bug in the generated JAX code. Am I right that this is a problem, and if so, will it be fixed anytime soon?
Thanks, Jason
-- !! 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.