8 resolv_wrapper - A wrapper for dns name resolving or dns faking.
13 LD_PRELOAD=libresolv_wrapper.so RESOLV_WRAPPER_CONF="/path/to/resolv.conf" *./myapplication*
18 resolv_wrapper makes it possible on most UNIX platforms to contact your own DNS
19 implmentation in your test environment. It requires socket_wrapper to be able
21 If it doesn't work on a special platform the wrapper is able to fake DNS queries
22 and return valid responses to your application.
24 - Redirects name queries to the nameservers specified in your resolv.conf
25 - Can fake DNS queries using a simple formatted DNS hosts file.
30 *RESOLV_WRAPPER_CONF*::
32 This is used to specify the resolv.conf to use. The format of the resolv.conf
33 file is defined in the manpage 'resolv.conf(5)'. Currently only the *namserver*
34 directive is supported.
36 *RESOLV_WRAPPER_HOSTS*::
38 This environment variable is used for faking DNS queries. It must point to a
39 hosts-like text file that specifies fake records for custom queries. The
40 format of the file looks like this:
42 TYPE RECORD_NAME RECORD_VALUE
46 A dc.cwrap.org 127.0.0.10
47 AAAA dc.cwrap.org fd00::5357:5f0a
48 CNAME kerberos.cwrap.org dc.cwrap.org
49 SRV _kerberos._tcp.cwrap.org kerberos.cwrap.org 88
51 *RESOLV_WRAPPER_DEBUGLEVEL*::
53 If you need to see what is going on in resolv_wrapper itself or try to find a
54 bug, you can enable logging support in resolv_wrapper if you built it with
65 The following command would trick 'kinit(1)' into using DNS servers from "./resolv.conf"
66 for Kerberos service resolution:
68 $ LD_PRELOAD=libresolv_wrapper.so RESOLV_WRAPPER_CONF="./resolv.conf" kinit user@EXAMPLE.COM