From: erik quanstrom <quanstro@quanstro.net>
To: yourfriendllc@gmail.com, 9fans@9fans.net
Subject: Re: [9fans] dnsquery or search
Date: Thu, 18 Sep 2008 07:36:01 -0400 [thread overview]
Message-ID: <5fcb828f9e1cd8fcd9fe5ac0d69983df@quanstro.net> (raw)
> I see that ndb/dnsquery returns correct information on my system, but
> I noticed that there is not a default domainname, like on linux, in /
> etc/resolv.conf we set the "search domainname" ... is there a similar
> setting in plan9
plan 9 dns tries to look up unrooted (no ".") names in the local databases.
first success wins.
here's the algorithm from /sys/src/cmd/ndb/dnresolve.c
/*
* hack for systems that don't have resolve search
* lists. Just look up the simple name in the database.
*/
if(!rooted && strchr(name, '.') == nil){
rp = nil;
drp = domainlist(class);
for(nrp = drp; rp == nil && nrp != nil; nrp = nrp->next){
snprint(nname, sizeof nname, "%s.%s", name,
nrp->ptr->name);
rp = dnresolve(nname, class, type, req, cn, depth+1,
recurse, rooted, status);
rrfreelist(rrremneg(&rp));
}
if(drp != nil)
rrfreelist(drp);
procsetname(procname);
free(procname);
return rp;
}
- erik
next reply other threads:[~2008-09-18 11:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-18 11:36 erik quanstrom [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-09-18 8:18 yourfriendllc
2008-09-18 11:39 ` Yaroslav
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5fcb828f9e1cd8fcd9fe5ac0d69983df@quanstro.net \
--to=quanstro@quanstro.net \
--cc=9fans@9fans.net \
--cc=yourfriendllc@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).