~andreserl/ubuntu/lucid/bind9/bind9-apport-533601

« back to all changes in this revision

Viewing changes to contrib/query-loc-0.4.0/ALGO

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones, LaMont Jones, Internet Software Consortium, Inc, localization folks
  • Date: 2008-08-02 14:20:20 UTC
  • mfrom: (1.2.1 upstream) (6.1.24 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080802142020-l1hon9jy8lbbjxmg
[LaMont Jones]

* default to using resolvconf if it is installed
* fix sonames and dependencies.  Closes: #149259, #492418
* Do not build-depend libcap2-dev on non-linux.  Closes: #493392
* drop unused query-loc manpage.  Closes: #492564
* lwresd: Deliver /etc/bind directory.  Closes: #490027
* fix query-source comment in default install

[Internet Software Consortium, Inc]

* 9.5.0-P2.  Closes: #492949

[localization folks]

* l10n: Spanish debconf translation.  Closes: #492425 (Ignacio Mondino)
* l10n: Swedish debconf templates.  Closes: #491369 (Martin Ågren)
* l10n: Japanese debconf translations.  Closes: #492048 (Hideki Yamane
  (Debian-JP))
* l10n: Finnish translation.  Closes: #490630 (Esko Arajärvi)
* l10n: Italian debconf translations.  Closes: #492587 (Alessandro Vietta)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Just for info, can be out of date.
 
2
 
 
3
 
 
4
RFC 1876, 5.2, specially 5.2.3
 
5
 
 
6
Important points:
 
7
 
 
8
- LOC RRs are always attached to a *name*.
 
9
- we can have two (or more) RRs for one address, one more specific than the other
 
10
 
 
11
main
 
12
 if (host is a name) 
 
13
        getLOCbyname
 
14
 else # host is an IP address   
 
15
        gethostbyaddr
 
16
        if (name) 
 
17
                getLOCbyname
 
18
                # If there is none, do not search. We assume the above was sufficient          # (But check 5.2.2)
 
19
        else
 
20
                getLOCbyaddress
 
21
 
 
22
getLOCbyname (host) 
 
23
        get LOC for host
 
24
        if (it exists)
 
25
                OK
 
26
        else
 
27
                get all A records of the name
 
28
                foreach A record
 
29
                        getLOCbyaddress
 
30
                        OK at the first one found 
 
31
                                # we assume they are consistent
 
32
                END
 
33
 
 
34
getLOCbyaddress (address)
 
35
        # May receive a mask. Otherwise, deduce it from the class
 
36
        makeNetAddress
 
37
        getLOCbynetwork
 
38
 
 
39
getLOCbynetwork
 
40
        get PTR and A for it
 
41
        if (exist)
 
42
                getLOCbyname
 
43
        ******* DIFFICULT : we have to manage a stack. See the code
 
44
                makeNetAddress (level--)
 
45
                getLOCbynetwork
 
46
        else
 
47
                END
 
48