Commit 740af672 authored by Andreas Gustafsson's avatar Andreas Gustafsson
Browse files

commented

parent 36b953d0
......@@ -13,18 +13,35 @@
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
# $Id: lookup.tcl,v 1.5 2000/11/18 01:35:05 gson Exp $
# $Id: lookup.tcl,v 1.6 2000/12/10 07:46:35 gson Exp $
#
# Sample lookup procedure for tcldb
#
# This lookup procedure defines zones with identical SOA, NS, and MX
# records at the apex and a single A record that varies from zone to
# zone at the name "www".
#
# Something like this could be used by a web hosting company to serve
# a number of domains without needing to create a separate master file
# for each domain. Instead, all per-zone data (in this case, a single
# IP address) specified in the named.conf file like this:
#
# zone "a.com." { type master; database "tcl 10.0.0.42"; };
# zone "b.com." { type master; database "tcl 10.0.0.99"; };
#
# Since the tcldb driver doesn't support zone transfers, there should
# be at least two identically configured master servers. In the
# example below, they are assumed to be called ns1.isp.nil and
# ns2.isp.nil.
#
proc lookup {zone name} {
global dbargs
switch -- $name {
@ { return [list \
{SOA 86400 "ns1.isp.nil. hostmaster.isp.nil. \
0 3600 1800 1814400 3600"} \
1 3600 1800 1814400 3600"} \
{NS 86400 "ns1.isp.nil."} \
{NS 86400 "ns2.isp.nil."} \
{MX 86400 "10 mail.isp.nil."} ] }
......
......@@ -13,18 +13,35 @@
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
# $Id: lookup.tcl,v 1.5 2000/11/18 01:35:05 gson Exp $
# $Id: lookup.tcl,v 1.6 2000/12/10 07:46:35 gson Exp $
#
# Sample lookup procedure for tcldb
#
# This lookup procedure defines zones with identical SOA, NS, and MX
# records at the apex and a single A record that varies from zone to
# zone at the name "www".
#
# Something like this could be used by a web hosting company to serve
# a number of domains without needing to create a separate master file
# for each domain. Instead, all per-zone data (in this case, a single
# IP address) specified in the named.conf file like this:
#
# zone "a.com." { type master; database "tcl 10.0.0.42"; };
# zone "b.com." { type master; database "tcl 10.0.0.99"; };
#
# Since the tcldb driver doesn't support zone transfers, there should
# be at least two identically configured master servers. In the
# example below, they are assumed to be called ns1.isp.nil and
# ns2.isp.nil.
#
proc lookup {zone name} {
global dbargs
switch -- $name {
@ { return [list \
{SOA 86400 "ns1.isp.nil. hostmaster.isp.nil. \
0 3600 1800 1814400 3600"} \
1 3600 1800 1814400 3600"} \
{NS 86400 "ns1.isp.nil."} \
{NS 86400 "ns2.isp.nil."} \
{MX 86400 "10 mail.isp.nil."} ] }
......
......@@ -15,7 +15,14 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: tcldb.c,v 1.5 2000/11/20 18:24:41 gson Exp $ */
/* $Id: tcldb.c,v 1.6 2000/12/10 07:47:43 gson Exp $ */
/*
* A simple database driver that calls a Tcl procedure to define
* the contents of the DNS namespace. The procedure is loaded
* from the file lookup.tcl; look at the comments there for
* more information.
*/
#include <config.h>
......@@ -38,11 +45,6 @@
#include <tcldb.h>
/*
* A simple database driver that calls Tcl procedures to define
* the contents of the DNS namespace.
*/
#define CHECK(op) \
do { result = (op); \
if (result != ISC_R_SUCCESS) return (result); \
......
......@@ -15,7 +15,14 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: tcldb.c,v 1.5 2000/11/20 18:24:41 gson Exp $ */
/* $Id: tcldb.c,v 1.6 2000/12/10 07:47:43 gson Exp $ */
/*
* A simple database driver that calls a Tcl procedure to define
* the contents of the DNS namespace. The procedure is loaded
* from the file lookup.tcl; look at the comments there for
* more information.
*/
#include <config.h>
......@@ -38,11 +45,6 @@
#include <tcldb.h>
/*
* A simple database driver that calls Tcl procedures to define
* the contents of the DNS namespace.
*/
#define CHECK(op) \
do { result = (op); \
if (result != ISC_R_SUCCESS) return (result); \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment