ado@elsie.UUCP (Arthur David Olson) (03/04/85)
Why, in 4.2bsd, is "gethostid" a system call, rather than a function that reads information from a file and returns what's read (possibly reformatted)? If you know, tap that 'r' key (carefully avoiding the 'f' key!) and send me mail letting me know why. Thanks. -- UNIX is an AT&T Bell Laboratories trademark. -- UUCP: ..decvax!seismo!elsie!ado ARPA: elsie!ado@seismo.ARPA DEC, VAX and Elsie are Digital Equipment and Borden trademarks
ado@elsie.UUCP (Arthur David Olson) (03/12/85)
Thanks to everyone who replied to my question about why 4.2bsd's "gethostid" is a system call, rather than a function that reads information from a file. From what I gather, the implementation of networking in 4.2bsd requires that the kernel know what the host ID is. Berkeley folks created a "sethostid" system call to allow a privileged program to pass the ID to the kernel. And with "sethostid" came "gethostid". Another way of doing things would have been to implement a special device (named, for example, "/dev/hostid") to which the ID could have been written and from which the ID could have been read. This would have avoided the addition of exotic system calls. -- UNIX is an AT&T Bell Laboratories trademark. -- UUCP: ..decvax!seismo!elsie!ado ARPA: elsie!ado@seismo.ARPA DEC, VAX and Elsie are Digital Equipment and Borden trademarks