diff options
author | Martin Nagy <mnagy@redhat.com> | 2009-02-11 20:37:59 +0100 |
---|---|---|
committer | Martin Nagy <mnagy@redhat.com> | 2009-02-11 20:37:59 +0100 |
commit | f50ae72ec3417cae55dd4e085991c01af9fdc5f1 (patch) | |
tree | 0e36c9a3320f6d068df93d3ff6d84b821d23db40 /contrib/query-loc-0.4.0/ALGO | |
download | bind_dynamic-start.tar.gz bind_dynamic-start.tar.xz bind_dynamic-start.zip |
Initial commitstart
Diffstat (limited to 'contrib/query-loc-0.4.0/ALGO')
-rw-r--r-- | contrib/query-loc-0.4.0/ALGO | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/contrib/query-loc-0.4.0/ALGO b/contrib/query-loc-0.4.0/ALGO new file mode 100644 index 0000000..4695dc1 --- /dev/null +++ b/contrib/query-loc-0.4.0/ALGO @@ -0,0 +1,48 @@ +Just for info, can be out of date. + + +RFC 1876, 5.2, specially 5.2.3 + +Important points: + +- LOC RRs are always attached to a *name*. +- we can have two (or more) RRs for one address, one more specific than the other + +main + if (host is a name) + getLOCbyname + else # host is an IP address + gethostbyaddr + if (name) + getLOCbyname + # If there is none, do not search. We assume the above was sufficient # (But check 5.2.2) + else + getLOCbyaddress + +getLOCbyname (host) + get LOC for host + if (it exists) + OK + else + get all A records of the name + foreach A record + getLOCbyaddress + OK at the first one found + # we assume they are consistent + END + +getLOCbyaddress (address) + # May receive a mask. Otherwise, deduce it from the class + makeNetAddress + getLOCbynetwork + +getLOCbynetwork + get PTR and A for it + if (exist) + getLOCbyname + ******* DIFFICULT : we have to manage a stack. See the code + makeNetAddress (level--) + getLOCbynetwork + else + END + |