logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

RE: MIB loading and parsing question: msg#00261

Subject: RE: MIB loading and parsing question
First thanks for the fast reply.
My idea is to use net-snmp MIB loading code, and not to change it.

I will try to be more clear.
A configuration file of the mib browser should include just and only the mib
files to load.
I don't want to worry about the dependency between them.

If I initialize MIBDIRS to empty directory list the loading code will not
find modules from the import section,
only if they already been loaded before.

If I will set the MIBDIRS to all possible location (taken from the mib files
list), I will not know exactly which modules 
are loaded and in case mib file exist in multiple locations it will be hard
to control which mib file is loaded.
As you wrote it will load only my mib file list + the modules which they
depend on.

I will explain my request in example:
Let mib module1 from file1 is loaded and it is depend on module2 which
reside in file2. 
If file2 is in the file list module2 will be loaded first then module1
otherwise module1 will not be loaded.

This can not be done with the current implementation of MIB loading
mechanism (as far as I understand it).
If the search of the modules can be done also in the MIBFILES list (or just
in files which were not loaded yet from
MIBFILES list), and not just in MIBDIRS directory list it will solve my
problem.

I hope I was more clear now.
I will appreciate it that functinality could be integrated into net-snmp.

Regards,
Eli

-----Original Message-----
From: Dave Shield [mailto:D.T.Shield@xxxxxxxxxxxxx]
Sent: Monday, January 26, 2004 11:27 AM
To: Eli Hadad
Cc: net-snmp-coders@xxxxxxxxxxxxxxxxxxxxx
Subject: Re: MIB loading and parsing question 


> I need/want to manage a mib modules repository where I know which module
> reside in which file.

Just to be clear - are you using our MIB loading code, or are you
effectively replacing this?  (Or at least the top-level handling of it)


> I can initialize MIBFILES and MIBS environment variable, but If I don't
load
> them in a specific order to eliminate dependencies (which are unfulfilled)
> I don't get the complete tree.

That makes it sound as if you're replacing our top-level handling.  Yes?

'Cos the way our MIB parsing code works, when it reads in an IMPORT
statement, then it will break off parsing the current MIB file,
and load the one being IMPORTed from.
   So as long as all the relevant MIBs are available somewhere,
such dependencies are handled automatically.

> 
> I could initialize the MIBDIRS but this will reduce the flexibility to
> control exactly on which modules are loaded.

I'm not sure I understand this.
Setting MIBDIRS doesn't actually change what's loaded.
It just means that the library can find the things that it needs.

If you set MIBDIRS to be the full list of possible locations,
and MIBFILES/MIBS to the exact list of MIB modules that you want,
then the library will *only* load in those particular MIB modules,
plus any that they depend on.


> Am I missing something or this is limitation of the net-snmp package ?

I think you need to be a bit clearer about exactly what it is
that the current mechanism doesn't handle properly for you.

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


<Prev in Thread] Current Thread [Next in Thread>