* [9fans] dnsquery or search
@ 2008-09-18 8:18 yourfriendllc
2008-09-18 11:39 ` Yaroslav
0 siblings, 1 reply; 3+ messages in thread
From: yourfriendllc @ 2008-09-18 8:18 UTC (permalink / raw)
To: 9fans
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [9fans] dnsquery or search
2008-09-18 8:18 [9fans] dnsquery or search yourfriendllc
@ 2008-09-18 11:39 ` Yaroslav
0 siblings, 0 replies; 3+ messages in thread
From: Yaroslav @ 2008-09-18 11:39 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
See dnsdomain attribute in ndb(6).
Yarek.
2008/9/18 <yourfriendllc@gmail.com>:
> 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
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [9fans] dnsquery or search
@ 2008-09-18 11:36 erik quanstrom
0 siblings, 0 replies; 3+ messages in thread
From: erik quanstrom @ 2008-09-18 11:36 UTC (permalink / raw)
To: yourfriendllc, 9fans
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-09-18 11:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-18 8:18 [9fans] dnsquery or search yourfriendllc
2008-09-18 11:39 ` Yaroslav
2008-09-18 11:36 erik quanstrom
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).