~ubuntu-branches/ubuntu/trusty/zonecheck/trusty-proposed

« back to all changes in this revision

Viewing changes to lib/nresolv/compatibility.rb

  • Committer: Bazaar Package Importer
  • Author(s): Stephane Bortzmeyer
  • Date: 2004-03-10 14:08:05 UTC
  • Revision ID: james.westby@ubuntu.com-20040310140805-ij55fso1e23bk8ye
Tags: upstream-2.0.3
ImportĀ upstreamĀ versionĀ 2.0.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# $Id: compatibility.rb,v 1.2 2003/03/31 14:11:13 sdalu Exp $
 
2
 
 
3
 
4
# AUTHOR   : Stephane D'Alu <sdalu@nic.fr>
 
5
# CREATED  : 2002/07/19 07:28:13
 
6
#
 
7
# COPYRIGHT: AFNIC (c) 2003
 
8
# CONTACT  : 
 
9
# LICENSE  : RUBY
 
10
#
 
11
# $Revision: 1.2 $ 
 
12
# $Date: 2003/03/31 14:11:13 $
 
13
#
 
14
# INSPIRED BY:
 
15
#   - the ruby file: resolv.rb 
 
16
#
 
17
# CONTRIBUTORS: (see also CREDITS file)
 
18
#
 
19
#
 
20
 
 
21
class NResolv
 
22
    class DNS
 
23
        def initialize(config="/etc/resolv.conf")
 
24
            cfg         = Config::from_resolv(config)
 
25
            @client     = Client::STD::new(cfg)
 
26
        end
 
27
 
 
28
        def close
 
29
            @client.close
 
30
        end
 
31
 
 
32
        def getaddress(name)
 
33
            @client.getaddress(name)
 
34
        end
 
35
 
 
36
        def getaddresses(name)
 
37
            @client.getaddresses(name)
 
38
        end
 
39
 
 
40
        def getname(address)
 
41
            @client.getname(address)
 
42
        end
 
43
 
 
44
        def getnames(address)
 
45
            @client.getnames(address)
 
46
        end
 
47
    end
 
48
end