summaryrefslogtreecommitdiff
path: root/resolv_wrapper.html
blob: a12d851a33995eaa8d4297a818931fbdd87bd6f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
    <!DOCTYPE html>
    <html lang="en"><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="">
        <meta name="author" content="">
        <link rel="shortcut icon" href="/favicon.png">

        <title>cwrap - resolv_wrapper</title>

        <!-- Bootstrap core CSS -->
        <link href="assets/css/bootstrap.min.css" rel="stylesheet">

        <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!--[if lt IE 9]>
          <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
          <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
        <![endif]-->
      <link href="assets/cwrap.css" type="text/css" rel="stylesheet"></head>

      <body>
        <div class="container subpage-header">
          <div class="">
            <a href="/">cwrap</a>
          </div>
        </div>

        <div class="container subpage">
            <h1>The resolv_wrapper library</h1>
            <!-- Example row of columns -->
            <div class="row">
                <div class="col-md-12">
                    <p>A wrapper for DNS name resolving or DNS faking.</p>

                    <br />

                    <p align="center">
                        <a class="btn btn-warning btn-lg" role="button" href="./download.html#resolv_wrapper"><span class="glyphicon glyphicon-random"></span> Clone with git</a> ยท
                        <a class="btn btn-danger btn-lg" role="button" href="https://bugzilla.samba.org/enter_bug.cgi?product=cwrap"><span class="glyphicon glyphicon-send"></span> Report a bug</a>
                    </p>

                    <br />

                    <p>resolv_wrapper makes it possible on most UNIX platforms
                    to contact your own DNS implementation in your test
                    environment. It requires socket_wrapper to be able to
                    contact the server.  Alternatively, the wrapper is able to
                    fake DNS queries and return valid responses to your
                    application.</p>

                    <h2>Features</h2>
                    <ul>
                        <li>Redirects name queries to the nameservers specified
                        in your <em>resolv.conf</em>.</li>
                        <li>Can fake DNS queries using a simple formatted DNS
                        hosts file.</li>
                    </ul>

                    <h2>Detailed descriptions</h2>

                    <p>If you want to use your own <em>resolv.conf</em> you
                    can set the environment variable
                    <code>RESOLV_WRAPPER_CONF</code> to point to a file you
                    created. The format of the file is defined in the manpage
                    <code>resolv.conf(5)</code></p>

                    <p>If you do not have a DNS server running but still want
                    to be able that your application or a third party library
                    can do DNS queries, we provide a simple way to do that. All
                    you have to do is to set the environment variable
                    <code>RESOLV_WRAPPER_HOSTS</code>.<br /> It must point to a
                    hosts-like text file that specifies fake records for custom
                    queries. The format of the file looks like this:</p>

<pre>
    TYPE    RECORD_NAME RECORD_VALUE
</pre>

                    <h3>For example:</h3>

<pre>
    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
    SOA     cwrap.org ns1.cwrap.org admin.cwrap.org 2014100457 3600 300 1814400
</pre>

    <p>
    The SRV record can optionally also include priority and weight:
    </p>
<pre>
    SRV _ldap._tcp.cwrap.org ldap.cwrap.org 389 1 5
</pre>
    <p>
    If unset, the priority defaults to 1 and weight defaults to 100.
    </p>

            </div> <!-- /col -->
        </div>

    </div>
    <div class="container footer-line">
      <footer>
      <div class="row footer">
        <div class="col-md-6">
          <h3>Contact</h3>
          <p><a href="https://lists.samba.org/mailman/listinfo/samba-technical" target="_blank">samba-technical@lists.samba.org</a></p>
        </div>

        <div class="col-md-3 col-md-offset-3">
          <h3>Credits</h3>
          <p>Jakub Hrozek<br />
          Andreas Schneider</p>
        </div>
      </div>
      </footer>
   </div> <!-- /container -->

   <!-- Bootstrap core JavaScript
        ================================================== -->
   <!-- Placed at the end of the document so the pages load faster -->
   <script src="assets/js/jquery-1.js"></script>
   <script src="assets/js/bootstrap.min.js"></script>
   <!-- Piwik -->
   <script type="text/javascript">
     var _paq = _paq || [];
     _paq.push(["trackPageView"]);
     _paq.push(["enableLinkTracking"]);

     (function() {
       var u=(("https:" == document.location.protocol) ? "https" : "http") + "://cia.cryptomilk.org/";
       _paq.push(["setTrackerUrl", u+"piwik.php"]);
       _paq.push(["setSiteId", "3"]);
       var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
       g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
     })();
   </script>
   <!-- End Piwik Code -->

</body></html>