I'm the CPAN owner of Net::Patricia (perl-Net-Patricia.rpm) and it currently supports IPv4 and IPv6.
Both are done with specialized data structures.
I'm looking for something that handles a more generic binary data blob... so that I could have arbitrary searches.
For instance, in Perl, I could seed the tree with:
$key = join('.', reverse(split(/./, $domain))); $keylen = length($key) * 8;
and then do rDNS tree searches for hostnames.
One could similarly imagine converting phone numbers into BCD and doing E.164 searches in such a tree.
Net::Patricia currently uses a modified version of libpatricia from the MERIT Radius or SNMP code (forget which)... but it only handles IPv6 and IPv4 as I said.
Ideally it would be an external library that I could just link to.
Anyone have a pointer?
Thanks,
-Philip
Well, there's the cprops library, but I'd need to make a package out of that first....
http://cprops.sourceforge.net/
Seems like this might be generically useful (i.e. not just for radix tries but the other search types).
Not sure if the threading support is needed or not... plus it might mean that it package only works on Linux (and not Win32, which Perl requires be supported).
On 10/31/10 2:14 PM, Philip Prindeville wrote:
I'm the CPAN owner of Net::Patricia (perl-Net-Patricia.rpm) and it currently supports IPv4 and IPv6.
Both are done with specialized data structures.
I'm looking for something that handles a more generic binary data blob... so that I could have arbitrary searches.
For instance, in Perl, I could seed the tree with:
$key = join('.', reverse(split(/./, $domain))); $keylen = length($key) * 8;
and then do rDNS tree searches for hostnames.
One could similarly imagine converting phone numbers into BCD and doing E.164 searches in such a tree.
Net::Patricia currently uses a modified version of libpatricia from the MERIT Radius or SNMP code (forget which)... but it only handles IPv6 and IPv4 as I said.
Ideally it would be an external library that I could just link to.
Anyone have a pointer?
Thanks,
-Philip
Philip Prindeville wrote:
Not sure if the threading support is needed or not... plus it might mean that it package only works on Linux (and not Win32, which Perl requires be supported).
From the site: threads and synchronization: cprops provides a pthread-like api. On unix platforms these calls are mapped directly to pthread functions. On windows the win32 api is used to emulate pthread-like behavior.
Kevin Kofler
On 11/16/10 9:02 PM, Kevin Kofler wrote:
Philip Prindeville wrote:
Not sure if the threading support is needed or not... plus it might mean that it package only works on Linux (and not Win32, which Perl requires be supported). From the site: threads and synchronization: cprops provides a pthread-like api. On unix platforms these calls are mapped directly to pthread functions. On windows the win32 api is used to emulate pthread-like behavior.
Kevin Kofler
Problem is that the trie support in libcprops is string (dictionary) oriented and doesn't handle arbitrary bitstrings.
devel@lists.stg.fedoraproject.org