lookup.tcl revision 3c0454fe259ed70a752d49b86a46026fb4f0c733
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews# Copyright (C) 2000 Internet Software Consortium.
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews#
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews# Permission to use, copy, modify, and distribute this software for any
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# purpose with or without fee is hereby granted, provided that the above
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# copyright notice and this permission notice appear in all copies.
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews#
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews# THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews# DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews# INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews# $Id: lookup.tcl,v 1.5 2000/11/18 01:35:05 gson Exp $
953189d30eb801f6f040ab6e3d3c6a6c30add952Tinderbox User
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews#
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews# Sample lookup procedure for tcldb
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews#
ca0ee90361c55442bf51fb1a5a680e39e49e5570Evan Hunt
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrewsproc lookup {zone name} {
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews global dbargs
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews switch -- $name {
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews @ { return [list \
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews {SOA 86400 "ns1.isp.nil. hostmaster.isp.nil. \
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews 0 3600 1800 1814400 3600"} \
9570ddcd41e2b0a0e124f0fa50653f73dfc1ef46Evan Hunt {NS 86400 "ns1.isp.nil."} \
9570ddcd41e2b0a0e124f0fa50653f73dfc1ef46Evan Hunt {NS 86400 "ns2.isp.nil."} \
953189d30eb801f6f040ab6e3d3c6a6c30add952Tinderbox User {MX 86400 "10 mail.isp.nil."} ] }
953189d30eb801f6f040ab6e3d3c6a6c30add952Tinderbox User www { return [list [list A 3600 $dbargs($zone)] ] }
953189d30eb801f6f040ab6e3d3c6a6c30add952Tinderbox User }
9570ddcd41e2b0a0e124f0fa50653f73dfc1ef46Evan Hunt return NXDOMAIN
9570ddcd41e2b0a0e124f0fa50653f73dfc1ef46Evan Hunt}
9570ddcd41e2b0a0e124f0fa50653f73dfc1ef46Evan Hunt