[comp.dcom.lans] NFS - heterogeneity of

karen@comp.vuw.ac.nz (Karen Turner) (01/18/88)

I am working on a file server for a heterogeneous network that will allow
the sharing of files between different types of machines (by appropriately
transforming the files).  A simple case of this is text files.  I was
wondering how NFS handles this.

With PC/NFS how does the client on the PC handle mappings to and from CR/LF
(otherwise how can you read UNIX text files from the PC?).  If mappings are
done how are text and binary files distinguished?  What would happen if a
binary file from the PC, that had a LF in it, was moved to a file system
mounted from a sun and then moved back again?

NFS is designed for a non-homogeneous network, how does it handle mappings
from a server that does not use text files that have lines delimited by
LFs.

Thanks
  Karen
-- 
'So long and thanks for all the fish'                     - Douglas Adams

UUCP: ...!uunet!vuwcomp!karen
Domain(ish):  karen@comp.vuw.ac.nz

sxn%ingersoll@Sun.COM (Stephen X. Nahm) (01/23/88)

In article <13212@comp.vuw.ac.nz> karen@comp.vuw.ac.nz (Karen Turner) writes:
>With PC/NFS how does the client on the PC handle mappings to and from CR/LF
>(otherwise how can you read UNIX text files from the PC?).

On PC-NFS, a utility is provided to translate text files back and
forth between MS-DOS style (CR/LF) and UNIX style (LF).
No translation is done on during any data transfers (read/write).

Thus, if a text file is created by PC-NFS on a UNIX machine, it will have
the CR/LF style.  If a UNIX user wants to use this file, the
translation utility would be used first to convert it to UNIX style.
Similarly, if the MS-DOS user wants to look at a UNIX text file, he
or she will use a DOS version of the same utility on the file.

NFS assumes that there are smart clients and "dumb" servers.  Never
expect the server to do anything fancy like this for you.  However,
if your client is clever enough to distinguish text files from binary
files (through some feat of magic), there's certainly nothing wrong
with training it to do the translation on the fly.  But it probably
won't be easy to get right in the general case.
--
Steve Nahm                              sxn@sun.COM or sun!sxn