Login  
Search All Forums
Dart Home | PowerSNMP for .NET | Custom Development Reply | PowerSNMP for .NET Topics | Forums   
AuthorForum: PowerSNMP for .NET
Topic: Mib Parsing problems
silius

From: ----, AL Spain
Posts: 11
Member Since: 06/05/06
posted June 20, 2006 10:29 AM

Hello again!
I am having some strange behaviour while parsing mibs.

This is the code snippet (the same as TreeViewer example provided by the library):

MibNodes mib = new MibNodes();

FileStream file;
file = new FileStream(openFileDialog.FileName, FileMode.Open, FileAccess.Read);
mib.Parse(file);
file.Close();

// If everything went well...
mib.GenerateNodes();

If I load a mib that imports some other data from a not loaded mib, GenerateNodes throws an exception.

But after doing this, if I load another mib that doesnt import any data from another mibs, I obtain the same exception as before (it looks like the previous mib is yet loaded but it is unable to generate the new nodes.

Can you help me with this matter?
Thanks!
Mike Baldwin (Admin)



From: Rome, NY USA
Posts: 114
Member Since: 04/11/00

Extra Support Options
Custom Application Development

posted June 20, 2006 12:40 PM

Hi,

The MibNodes object does not have a mechanism for removing parsed MIB files, so just start over with another new MibNodes object. Thanks for using PowerSNMP.
uwe@luenow.info
uwe@luenow.info

From: Lünow, Germany
Posts: 7
Member Since: 03/18/10
posted March 18, 2010 8:11 AM

It whould be nice if MibNodes instances were serialize able in order to create a copy of MibNodes object before parsing and use this copy if GenerateNodes() have failed. Just imagine having imported 100 Mibs including GenerateNodes(). All is well, it already took quite a while. Now you try to import another Mib and this one failes by GenerateNodes(). Before trying to import another, we have to create a new MibNodes object an import the 'good' 100 again.
K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted March 22, 2010 10:21 AM

Hi,
Thanks for the suggestion.
I have submitted a feature request (issue #5238) to add this functionality to a future version of the product.

For updates on the status of this issue, please contact Jamie Powell (jamie.powell@dart.com).

-ken
uwe@luenow.info
uwe@luenow.info

From: Lünow, Germany
Posts: 7
Member Since: 03/18/10
posted March 25, 2010 7:54 AM

Thank you. I recently ran into another problem while trying to import a MIB file:
---------------------------------------
Error Loading Mib: C:\MIBs\hp\bad\LaserJet-Series4050-MIB.mib : Unable to locate definition for Syntax real
-----------------------------------------
I have a couple of other Mibs with same problem. Is it possible to 'feed' MibNodes objects with information about unknown definitions? Do you need a sample MIB in order to reproduce the problem? Please let me know how I can solve problems like this.
K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted March 25, 2010 9:42 AM

Hi,
Yes, so I have complete information, please send the mib and its dependencies as a zip attachment to support@dart.com, referencing this thread.

Thanks,
-ken
uwe@luenow.info
uwe@luenow.info

From: Lünow, Germany
Posts: 7
Member Since: 03/18/10
posted March 25, 2010 12:06 PM

The email has been sent. Thanks for digging into it. Importing MIBs at runtime is a very importing feature for my application. I would not mind having unknown data types.
Uwe
Reply | PowerSNMP for .NET Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX