mibble-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mibble-users] sorting OIDs


From: Matthew Walker
Subject: Re: [Mibble-users] sorting OIDs
Date: Tue, 28 Jan 2014 11:40:22 -0500
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

Great to hear..

Although the problem I'm having is OID sorting in general.. I use mibble to parse a MIB and the resulting points are stored in a DB.

Using that DB, I will occasionally add 'children' to the MIB resulting in new OIDs which I need to bring back to the user in order (numerically).

I was hoping that Mibble would have a utility that receives, say, an Array of OIDs and returns an Array with each OID sorted numerically. If Mibble doesn't have this - then my search continues and I may have to build that sorting algorithm myself. If I do, I'd be happy to contribute to the source.

Mysql addresses the sorting of IPV4 addresses with the INET_ATON function:

 INET_ATON('10.0.5.9') is evaluated as 10×2563 + 0×2562 + 5×256 + 9

which is fine with there are only 4 segments to employ this logic towards.. Obviously the problem with OIDs is that there can an unlimited number of segments (certainly more than 4) so this sort of logic would quickly create numbers that exceed any of Java's datatypes

-Matthew






On 1/28/2014 11:00 AM, Per Cederberg wrote:
Matthew,

It seems you encountered a bug (or misfeature). Now added to GitHub:
I'll try to push a fix up to 2.10.alpha2 in a few hours.

Cheers,

/Per


On Tue, Jan 28, 2014 at 3:15 PM, Matthew Walker <address@hidden> wrote:
Surely this comes up often and I apologize for not finding other refernces.. but I'm stumped here.

Does mibble contain a utility for the numeric sorting of SNMP ObjectIdentifiers, (OIDs)?

Current sorting (since OIDs are treated as Strings) results in inaccuracies like this:

| 1.3.6.1.2.1.33.1.9.1.0     |
| 1.3.6.1.2.1.33.1.9.10.0    |
| 1.3.6.1.2.1.33.1.9.2.0     |


Much thanks.

-Matthew

_______________________________________________
Mibble-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/mibble-users



_______________________________________________
Mibble-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/mibble-users


reply via email to

[Prev in Thread] Current Thread [Next in Thread]