Return to BSD News archive
Received: by minnie.vk1xwt.ampr.org with NNTP
id AA608 ; Sat, 06 Feb 93 01:01:22 EST
Newsgroups: comp.unix.bsd
Path: sserve!manuel.anu.edu.au!munnari.oz.au!spool.mu.edu!howland.reston.ans.net!zaphod.mps.ohio-state.edu!caen!hellgate.utah.edu!fcom.cc.utah.edu!cs.weber.edu!terry
From: terry@cs.weber.edu (A Wizard of Earth C)
Subject: Re: SYS_getdomainname error (using getdomainname patch)
Message-ID: <1993Feb4.172404.8791@fcom.cc.utah.edu>
Sender: news@fcom.cc.utah.edu
Organization: Weber State University (Ogden, UT)
References: <1993Jan29.174916.15369@fcom.cc.utah.edu> <1kbounINN1fh@hrd769.brooks.af.mil> <1993Jan31.194843.20328@uvm.edu>
Date: Thu, 4 Feb 93 17:24:04 GMT
Lines: 44
In article <1993Jan31.194843.20328@uvm.edu> wollman@sadye.emba.uvm.edu (Garrett Wollman) writes:
>One thing I don't understand in all this is, why should this even be a
>system call? (Maybe I should ask Sun, since it's their idea...) I
>can't see any reason whatsoever why this shouldn't be implemented as
>simple library functions that read and write a file (say,
>/etc/domainname, or even better /etc/resolv.conf when possible). I
>have always believed in the rule that ``if it can reasonably be
>implemented in the library, then it has no business in the kernel.''
I wondered about this too; I came up with two arguments:
1) A kernel interface is more rigidly defined; because of this,
it simplifies the large number of programs that need to
get domain name information (sendmail, netstat, etc.) by
giving a single interface which is atomic in operation
(one process in the system call will not allow it to be read
while it is being written). The fact that various implementations
keep their domainname in different files further supports the
approach, since it provides a measure of system indepedance
which my not otherwise be possible.
2) Historical reasons, including, but not limited to, the domain name
being set in rc.local and not living in a file at all. The file
versions of the domainname evolved afterwards. There is also
historical code which uses the call. This may be circumvented
in the case of a direct call, but not in the case of an
indirect call, such as syscall( SYS_getdomainname, buf, 32);.
If we define compatability at the system call level rather than the
library function or function stub level, it'sto our advantage to keep
the system call inteface (I know, sick).
Terry Lambert
terry@icarus.weber.edu
terry_lambert@novell.com
---
Any opinions in this posting are my own and not those of my present
or previous employers.
--
-------------------------------------------------------------------------------
"I have an 8 user poetic license" - me
Get the 386bsd FAQ from agate.berkeley.edu:/pub/386BSD/386bsd-0.1/unofficial
-------------------------------------------------------------------------------