doc: Add section for dns faking to manpage.
authorAndreas Schneider <asn@samba.org>
Sun, 12 Oct 2014 18:04:11 +0000 (20:04 +0200)
committerMichael Adam <obnox@samba.org>
Tue, 21 Oct 2014 11:39:39 +0000 (13:39 +0200)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
doc/resolv_wrapper.1
doc/resolv_wrapper.1.txt

index 911f4b46824d88620d7da115db6e7d328be98aeb..5482b3ddca3be99371c71f3f5587914e76e3c847 100644 (file)
 .\" * MAIN CONTENT STARTS HERE *
 .\" -----------------------------------------------------------------
 .SH "NAME"
-resolv_wrapper \- A wrapper for the dns resolving with our own resolv\&.conf\&.
+resolv_wrapper \- A wrapper for dns name resolving or dns faking\&.
 .SH "SYNOPSIS"
 .sp
 LD_PRELOAD=libresolv_wrapper\&.so RESOLV_WRAPPER_CONF="/path/to/resolv\&.conf" \fB\&./myapplication\fR
 .SH "DESCRIPTION"
 .sp
-resolv_wrapper makes it possible on most UNIX platforms to contact your own DNS implmentation in your test environment\&. It requires socket_wrapper to be able to contact it\&.
+resolv_wrapper makes it possible on most UNIX platforms to contact your own DNS implmentation in your test environment\&. It requires socket_wrapper to be able to contact it\&. If it doesn\(cqt work on a special platform the wrapper is able to fake DNS queries and return valid responses to your application\&.
 .sp
 .RS 4
 .ie n \{\
@@ -46,6 +46,17 @@ resolv_wrapper makes it possible on most UNIX platforms to contact your own DNS
 .\}
 Redirects name queries to the nameservers specified in your resolv\&.conf
 .RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Can fake DNS queries using a simple formatted DNS hosts file\&.
+.RE
 .SH "ENVIRONMENT VARIABLES"
 .PP
 \fBRESOLV_WRAPPER_CONF\fR
@@ -56,6 +67,36 @@ This is used to specify the resolv\&.conf to use\&. The format of the resolv\&.c
 directive is supported\&.
 .RE
 .PP
+\fBRESOLV_WRAPPER_HOSTS\fR
+.RS 4
+This environment variable is used for faking DNS queries\&. It must point to a hosts\-like text file that specifies fake records for custom queries\&. The format of the file looks like this:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+TYPE    RECORD_NAME RECORD_VALUE
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.sp
+For example:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+A       dc\&.cwrap\&.org 127\&.0\&.0\&.10
+AAAA    dc\&.cwrap\&.org fd00::5357:5f0a
+CNAME   kerberos\&.cwrap\&.org dc\&.cwrap\&.org
+SRV     _kerberos\&._tcp\&.cwrap\&.org kerberos\&.cwrap\&.org 88
+.fi
+.if n \{\
+.RE
+.\}
+.PP
 \fBRESOLV_WRAPPER_DEBUGLEVEL\fR
 .RS 4
 If you need to see what is going on in resolv_wrapper itself or try to find a bug, you can enable logging support in resolv_wrapper if you built it with debug symbols\&.
index c04c7c8e36d9b60ee4e1d667bb9a370464e1e5f1..a9e4ec536a04042cef1955509f67f2518a444d44 100644 (file)
@@ -4,7 +4,7 @@ resolv_wrapper(1)
 NAME
 ----
 
-resolv_wrapper - A wrapper for the dns resolving with our own resolv.conf.
+resolv_wrapper - A wrapper for dns name resolving or dns faking.
 
 SYNOPSIS
 --------
@@ -17,8 +17,11 @@ DESCRIPTION
 resolv_wrapper makes it possible on most UNIX platforms to contact your own DNS
 implmentation in your test environment. It requires socket_wrapper to be able
 to contact it.
+If it doesn't work on a special platform the wrapper is able to fake DNS queries
+and return valid responses to your application.
 
 - Redirects name queries to the nameservers specified in your resolv.conf
+- Can fake DNS queries using a simple formatted DNS hosts file.
 
 ENVIRONMENT VARIABLES
 ---------------------
@@ -29,6 +32,21 @@ This is used to specify the resolv.conf to use. The format of the resolv.conf
 file is defined in the manpage 'resolv.conf(5)'. Currently only the *namserver*
 directive is supported.
 
+*RESOLV_WRAPPER_HOSTS*::
+
+This environment variable is used for faking DNS queries. It must point to a
+hosts-like text file that specifies fake records for custom queries. The
+format of the file looks like this:
+
+    TYPE    RECORD_NAME RECORD_VALUE
+
+For example:
+
+    A       dc.cwrap.org 127.0.0.10
+    AAAA    dc.cwrap.org fd00::5357:5f0a
+    CNAME   kerberos.cwrap.org dc.cwrap.org
+    SRV     _kerberos._tcp.cwrap.org kerberos.cwrap.org 88
+
 *RESOLV_WRAPPER_DEBUGLEVEL*::
 
 If you need to see what is going on in resolv_wrapper itself or try to find a
@@ -40,15 +58,6 @@ debug symbols.
 - 2 = DEBUG
 - 3 = TRACE
 
-*RESOLV_WRAPPER_HOSTS*::
-
-This environment variable is used for DNS faking. It must point to a
-hosts-like text file that specifies fake records for custom queries. The
-format of the file is:
-TYPE   RECORD_NAME RECORD_VALUE
-For example:
-A      www.cwrap.org   127.0.0.10
-
 EXAMPLE
 -------