[dns-operations] dnscap -s
dagon at cc.gatech.edu
Mon Jul 23 00:43:01 UTC 2007
On Sun, Jul 22, 2007 at 05:29:24PM +0000, Paul Vixie wrote:
> so there's something terribly gutshot in your
> /usr/include/arpa/nameser.h file and i'd love to see what centos 4.4
> has come up with that breaks this otherwise portable code which
> tries to use an otherwise portable, and common, interface.
Most linux distros drop the const qualifier from their NS_GET32 macro
in (gnu libc) nameser.h. So you can redefine the macro (see the patch
below.) But if one does this, another linux-specific error is
undefined reference to `__ns_initparse'
It turns out libresolv.so on libc6 does not export the four needed
symbols: ns_initparse, ns_parserr, ns_sprintrr, fp_nquery. But these
symbols are in libresolv.a:
linux$ nm -a /usr/lib/libresolv.a \
| egrep "ns_initparse|ns_parserr|ns_sprintrr|fp_nquery"
There's some indication that these needed symbols are not exported on
(Here's the same link: http://tinyurl.com/3bxuqk )
The attached patch shows one way to work around this by:
1) The dnscap.c file is modified (after the include of #include
<arpa/nameser.h>) to essentially:
#define NSGET32 ....etc.
... define NS_GET32 with the const qualifier
2) Add a note to the makefile to uncomment the line:
to build on linux.
3) Adds some notes to the README.linux about how to build all of
this with debian-derived distro dpkg (which is also fun to say).
David Dagon /"\ "When cryptography
dagon at cc.gatech.edu \ / ASCII RIBBON CAMPAIGN is outlawed, bayl
Ph.D. Student X AGAINST HTML MAIL bhgynjf jvyy unir
Georgia Inst. of Tech. / \ cevinpl."
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3300 bytes
Desc: not available
More information about the dns-operations