[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Mibble-users] How to load several mib files in one Loader
From: |
Lloyd Parkes |
Subject: |
Re: [Mibble-users] How to load several mib files in one Loader |
Date: |
Mon, 1 Oct 2012 11:13:32 +1300 |
On 28/09/2012, at 12:00 PM, diffuser78 <address@hidden> wrote:
> Mibble doc says that " Note that if a file contains several MIB modules, this
> method will only return the first one (although all are loaded). "
>
> Is there a way to load all the mibs in one Mib object returned by ifMib in
> the above code ?
That doesn't make a lot of sense. A Mib object represents a MIB and the methods
of a Mib object reflect that. If a Mib object represented more that one MIB,
then what would getRootSymbol() return?
I suspect that you need to make more use of the MibLoader and I'm fairly sure
you need to think more about the problem you are trying to solve. If I recall
correctly, the MibLoader caches the Mibs that it loads, so you can ask it for a
Mib more than once, and it won't load the MIB multiple times.
You might be wanting to search all of the MIBs that have been loaded for a
symbol. I do that by looping through an array of all the Mib objects I've
loaded, searching each of them in turn. I check the returned symbol to ensure
that it is either a scalar or table column because the find method will return
a best match, not necessarily an exact match.
Cheers,
Lloyd