I just installed fastresolve 2.8 under FreeBSD, and altho
dns-terror is writing out the db files properly (or appears to), none of
the perl utilities appear to be able to read them in ...
hub# file ip2host.db
ip2host.db: Berkeley DB (Btree, version 8, native byte-order)
hub# file /usr/local/bin/dns-terror
/usr/local/bin/dns-terror: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), dynamically linked (uses shared libs), not stripped
hub# ldd !$
ldd /usr/local/bin/dns-terror
/usr/local/bin/dns-terror:
libadns.so.1 => /usr/local/lib/libadns.so.1 (0x4806b000)
libz.so.2 => /usr/lib/libz.so.2 (0x4807b000)
libdb3.so => /usr/local/lib/libdb3.so (0x48088000)
libdb_cxx3.so => /usr/local/lib/libdb_cxx3.so (0x480f2000)
libstdc++.so.3 => /usr/lib/libstdc++.so.3 (0x4816b000)
libm.so.2 => /usr/lib/libm.so.2 (0x481b1000)
libc.so.4 => /usr/lib/libc.so.4 (0x481cd000)
hub#
yet:
hub# !get
getdominfo -i ip2host.db
Can't tie to ip2host.db: Inappropriate file type or format
hub#
since getdominfo is a perl script, I'm suspecting DB_File is where the
problem is, but, without recompiling perl, I'm wonderin gif maybe there is
some other way around this?
Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scr...@hub.org secondary: scrappy@{freebsd|postgresql}.org
To Unsubscribe: send mail to majo...@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
It is kind of odd that perl doesn't come with this ability.
> You do need to have a perl DB_File module linked against the
> same version of Berkeley DB that the C program dns-terror
> is using. At our site, by default DB_File is linked against
> DB 2.x, but we wanted to access old DB 1.x files from perl
> also. So we made a DB1_File module by copying the sources
> to DB_File and renaming the files and doing a search and
> replace. And of course we compile and link it against the
> desired version of DB. You could do the same to make a DB3_File
> module.
>
> It is kind of odd that perl doesn't come with this ability.
Hadn't thought of that, but with your suggestions, just tried it, and am
getting the same results after makign sure that convert-ip-db to use
DB3_File ... but I'm guessing that might have to do with header files, as
when i make it load the proper includes, the DB_File won't even build, as
its missing defines ...
but, it turns out there is a BerkeleyDB perl interface ... what is the
chances of moving fastresolve over to that?
NAME
BerkeleyDB - Perl extension for Berkeley DB version 2 or 3
I just tried a simple search and replace in convert-ip-db, and it results
in:
thelab# convert-ip-db
Can't locate auto/BerkeleyDB/TIEHASH.al in @INC (@INC contains: /usr/libdata/perl/5.6.0/mach /usr/libdata/perl/5.6.0 /usr/local/lib/perl5/site_perl/5.6.0/mach /usr/local/lib/perl5/site_perl/5.6.0 /usr/local/lib/perl5/site_perl/5.6.0 .) at /usr/local/bin/convert-ip-db line 48
so it obviously doesn't work "out of the box" ...
Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scr...@hub.org secondary: scrappy@{freebsd|postgresql}.org
To Unsubscribe: send mail to majo...@FreeBSD.org
search-n-replace DB_File with BerkeleyDB
and change the tie function to:
tie(%input, "BerkeleyDB::Btree", -Filename => $dbfile)
|| die "$0: Can't read $dbfile: $!\n";
and she works ...