bugMibble MIB Parser - Bugs: bug #13123, IntegerType.getAllSymbols() does...

 
 

bug #13123: IntegerType.getAllSymbols() does not return a list.

Submitted by:  None
Submitted on:  Thu 19 May 2005 03:23:54 PM UTC  
 
Severity: 5 - MajorItem Group: Software
Status: Wont FixPrivacy: Public
Assigned to: Per Cederberg <cederberg>Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 22 May 2005 04:07:20 PM UTC, comment #2:

Marking this bug Closed and Wont Fix, as Mibble works as designed in this case. The ElementType class will report whatever type definition was actually specified in the MIB file, not the type of the symbol with the same name as the element.

I've added the new bug #13151 to track the feature request for simplifying the Mibble API for retrieving child objects from a MibValueSymbol.

Per Cederberg <cederberg>
Project AdministratorIn charge of this item.
Sat 21 May 2005 08:04:45 PM UTC, comment #1:

I cannot reproduce this issue with the latest development version of Mibble (2.6.alpha1). I added some test code to print the symbols names and values from IntegerType.toString(). Using the MibblePrinter with this patch on the attached MIB test-final-mib.my gave the following results (for the pwVcOwner symbol):

... -- genFecSignaling = 3, other = 5, manual = 1, pwIdFecSignaling = 2, l2tpControlProtocol = 4

Note that the order of the symbols is mostly random, as the symbols are stored in a hash table within the IntegerType. The modified IntegerType.toString() looks like this:

public String toString() {
StringBuffer buffer = new StringBuffer();

buffer.append(super.toString());
if (constraint != null) {
buffer.append(" (");
buffer.append(constraint.toString());
buffer.append(")");
// TODO: start temporary test code
if (hasSymbols()) {
buffer.append(" -- ");
Iterator iter = symbols.values().iterator();
while (iter.hasNext()) {
MibValueSymbol sym = (MibValueSymbol) iter.next();
buffer.append(sym.getName());
buffer.append(" = ");
buffer.append(sym.getValue());
if (iter.hasNext()) {
buffer.append(", ");
}
}
}
// TODO: end temporary test code
}
return buffer.toString();
}

Can you please verify that this works also for you? (Recompile with this patch and then run the MibblePrinter application on the MIB.)

Per Cederberg <cederberg>
Project AdministratorIn charge of this item.
Thu 19 May 2005 03:23:54 PM UTC, original submission:

The following mib snippet (which is part of the definition of a table) does not return a list of string/values when queried with IntegerType.getAllSymbols()

pwVcOwner OBJECT-TYPE
SYNTAX INTEGER {
manual (1),
pwIdFecSignaling (2),
genFecSignaling (3),
l2tpControlProtocol (4),
other (5)
}
MAX-ACCESS read-create
STATUS current
DESCRIPTION
""
::= { pwVcEntry 3 }

If the object is defined indirectly (as a TEXTUAL-CONVENTION) it provides a list whether it is defined in the immediate mib file or an included file. However the order of the list is reversed.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #2978:  Mib-files.zip added by None (2KiB - application/zip - Sample mib to demonstrate the problem)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 5 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sun 22 May 2005 04:07:20 PM UTCcederbergStatusNone=>Wont Fix
  Assigned toNone=>cederberg
  Open/ClosedOpen=>Closed
Sat 21 May 2005 08:04:45 PM UTCcederbergCarbon-Copy-=>Added -unavailable-
Thu 19 May 2005 03:23:54 PM UTCNoneAttached File-=>Added Mib-files.zip, #2515

Back to the top


Powered by Savane 3.1-cleanup1