[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Mibble-users] problem load mib files
From: |
Yumei Zhang |
Subject: |
Re: [Mibble-users] problem load mib files |
Date: |
Mon, 02 Feb 2004 08:51:49 -0800 |
Hi,
I renamed "IPITEK-SMI_MIB" to "IPITEK-SMI.mib", but I still get the same error
(couldn't find imported MIB: IPITEK-SMI FROM IPITEK-SMI;)
when I try to load the second mib file.
What else should I do?
Thanks and Regards.
Yumei
>>> address@hidden 01/31/04 06:00AM >>>
Hi Yumei,
On Fri, 2004-01-30 at 19:51, Yumei Zhang wrote:
> Hi,
>
> I am using Mibble 2.2 on Windows 2000. I have following questions:
>
> 1. I am trying to load multiple mib files. I first load IPITEK-SMI_MIB
> which is passed. But the second one I get the following error in console:
>
> Error: in IpitekHBR110trap.mib: line 18:
> couldn't fine imported MIB: IPITEK-SMI
> FROM IPITEK-SMI;
>
> all files are in the same directory with class file.
> The IPITEK-SMI mib name is same as the file name.
> I try to set the parent directory for mib files, it still doesn't work.
>
> How do I load sereval mib files together?
Normally it should be no problem doing this, as long as the files
are named *exactly* as the MIB they represent. I.e. in your case
the SMI mib should be named "IPITEK-SMI.mib" or similar (the
extension is ignored). In your case the file name uses an "_"
instead of a dot (".") which is why Mibble can't find it.
Anyway, in a future version this will be fixed by allowing you
to preload files with any name and having Mibble correctly
identify them.
> 2. For the successful loaded IPITEK-SMI mib, I get all symbols.
> I am trying to cast each individual symbol to MibValueSymbol object,
> I get InvalidClassCastException. I can cast it to MibSymbol object.
> But that is not what I want. Do I need to implement my own MibType,
> MibValue, constants, etc. class? If so, which class I should
> extends?
Ok, maybe the documentation needs some improvement here. The
thing is simply that a MIB contains *two* types of symbols --
MibTypeSymbol and MibValueSymbol. In order to get only the
value symbols, you must filter the symbols returned from the
Mib class with instanceof:
if (sym instanceof MibValueSymbol) {
... do something nice ...
}
Hope this helps!
Cheers,
/Per
PS. Don't worry if I'm a bit slow responding to mails the upcoming
couple of weeks. I've just moved to Madrid (Spain, Europe) and
haven't got a decent internet connection yet... :-(
_______________________________________________
Mibble-users mailing list
address@hidden
http://mail.nongnu.org/mailman/listinfo/mibble-users
- Re: [Mibble-users] problem load mib files,
Yumei Zhang <=