Chapter 1, Developing network-based applications
NFS

NFS

NFS is a distributed file system for heterogeneous networks. With NFS, a user sees a single local directory hierarchy, even though many, if not most, of the files and directories in that hierarchy are located on other computers on the network. Applications that make Remote Procedure Calls (RPCs) use NFS to communicate with the remote processes that execute those calls.

The components of the SCO OpenServer Development System that support the development of RPC-based applications include:

RPC
The Remote Procedure Call API allows remote procedures to be invoked as if they were local subroutines. Using RPC, a process running on one machine can call a procedure that is executed by another process running on a different machine on the network.

XDR
The eXternal Data Representation API provides a system-independent and machine-independent format for data representation. Such a format allows data to be transmitted anywhere in a heterogeneous network.

RPCGEN
This tool generates C language code to implement the specific RPC semantics of the remote procedure calls in an application program.


Table 1-5 Network System Services library routines for NFS (NS)

     -------------------------------------------------------------------
     Routine                                   Description
     -------------------------------------------------------------------
     bindresvport                              bind a socket to a
                                               privileged IP port
     dbm, dbminit, fetch, store, delete,       database subroutines
     firstkey, nextkey 
     exportfs                                  export directory trees
     fh_fcntl                                  fcntl given NFS file
                                               handle
     getdomainname, setdomainname              get/set name of current
                                               domain
     getrpcent, getrpcbyname, getrpcbynumber   get RPC entry
     getrpcport                                get RPC port number
     kclt_create                               create kernel RPC client
                                               handles
     lstat                                     get file status
     ndbm, dbm_open, dbm_close, dbm_fetch,     database subroutines
     dbm_store, dbm_delete, dbm_firstkey,
     dbm_nextkey, dbm_error, dbm_clearerr 
     nfs_getfh                                 get NFS file handle
     nfs_svc, async_daemons                    NFS daemons
     rex                                       remote execution protocol
     rpc                                       library routines for
                                               remote procedure calls
     rwall                                     write to specified remote
                                               machines
     xdr                                       library routines for
                                               external data
                                               representation
Applications developed with the SCO OpenServer Development System use the library routines listed in Table 1-5, ``Network System Services library routines for NFS (NS)'' to communicate over NFS.