Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.unix.wizards Subject: Re: touching devices through RFS Message-ID: <5505@brl-smoke.ARPA> Date: Fri, 9-Jan-87 14:24:49 EST Article-I.D.: brl-smok.5505 Posted: Fri Jan 9 14:24:49 1987 Date-Received: Mon, 12-Jan-87 21:52:55 EST References: <2086@brl-adm.ARPA> <1559@ulysses.homer.nj.att.com> <2733@hammer.TEK.COM> <1617@ulysses.homer.nj.att.com> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB)) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 33 In article <1617@ulysses.homer.nj.att.com> ekrell@ulysses.UUCP (Eduardo Krell) writes: >> If so, how does it know which of the values >>in the structure parameter need to be rearranged because of >>byte-ordering and structure alignment differences? > >RFS uses internally a canonical form to pass arguments back and forth between >the server and the client machines. The caller converts its arguments into this >canonical form and the callee converts this canonical form back into structures >or whatever types are needed, making it independent of any byte-ordering or >alignment requirements. First, thanks for providing helpful information. It's appreciated. Second, there would seem to still be a problem with ioctls, since the third argument to an ioctl is either an int or a struct pointer; the int is no problem but how in the world is the struct pointer dealt with? a) Is a remote copy-in/copy-out done? (e.g. for a struct termio in a TC[GS]ET* ioctl) b) What about the case when the kernel doesn't know about the internals of the particular structure used by the specific ioctl command code? (e.g., when accessing a remote device special file such as a frame buffer interface, when the local system was unaware of the possibility of the remote heterogeneous system supporting such a device) It seems to me that such data structures would have to be self- describing in the general case. Of course any that are universal (such as struct termio) could be mapped correctly on each end since each system knows their structure. P.S. This ioctl-over-network issue keeps coming up and getting in the way of standardizing ioctls in IEEE 1003 (POSIX).