a9e4ec536a04042cef1955509f67f2518a444d44
[resolv_wrapper.git] / doc / resolv_wrapper.1.txt
1 resolv_wrapper(1)
2 =================
3
4 NAME
5 ----
6
7 resolv_wrapper - A wrapper for dns name resolving or dns faking.
8
9 SYNOPSIS
10 --------
11
12 LD_PRELOAD=libresolv_wrapper.so RESOLV_WRAPPER_CONF="/path/to/resolv.conf" *./myapplication*
13
14 DESCRIPTION
15 -----------
16
17 resolv_wrapper makes it possible on most UNIX platforms to contact your own DNS
18 implmentation in your test environment. It requires socket_wrapper to be able
19 to contact it.
20 If it doesn't work on a special platform the wrapper is able to fake DNS queries
21 and return valid responses to your application.
22
23 - Redirects name queries to the nameservers specified in your resolv.conf
24 - Can fake DNS queries using a simple formatted DNS hosts file.
25
26 ENVIRONMENT VARIABLES
27 ---------------------
28
29 *RESOLV_WRAPPER_CONF*::
30
31 This is used to specify the resolv.conf to use. The format of the resolv.conf
32 file is defined in the manpage 'resolv.conf(5)'. Currently only the *namserver*
33 directive is supported.
34
35 *RESOLV_WRAPPER_HOSTS*::
36
37 This environment variable is used for faking DNS queries. It must point to a
38 hosts-like text file that specifies fake records for custom queries. The
39 format of the file looks like this:
40
41     TYPE    RECORD_NAME RECORD_VALUE
42
43 For example:
44
45     A       dc.cwrap.org 127.0.0.10
46     AAAA    dc.cwrap.org fd00::5357:5f0a
47     CNAME   kerberos.cwrap.org dc.cwrap.org
48     SRV     _kerberos._tcp.cwrap.org kerberos.cwrap.org 88
49
50 *RESOLV_WRAPPER_DEBUGLEVEL*::
51
52 If you need to see what is going on in resolv_wrapper itself or try to find a
53 bug, you can enable logging support in resolv_wrapper if you built it with
54 debug symbols.
55
56 - 0 = ERROR
57 - 1 = WARNING
58 - 2 = DEBUG
59 - 3 = TRACE
60
61 EXAMPLE
62 -------
63
64   $ LD_PRELOAD=libresolv_wrapper.so RESOLV_WRAPPER_CONF="./resolv.conf" dig test.example.site