11.2Sperry#	$NetBSD: README,v 1.2 1998/01/09 04:11:52 perry Exp $
21.2Sperry
31.1ScgdRPCSRC 4.0 7/11/89
41.1Scgd
51.1ScgdThis distribution contains Sun Microsystem's implementation of the
61.1ScgdRPC and XDR protocols and is compatible with 4.2BSD and 4.3BSD.  Also
71.1Scgdincluded is complete documentation, utilities, RPC service
81.1Scgdspecification files, and demonstration services in the format used by
91.1Scgdthe RPC protocol compiler (rpcgen).  See WHAT'S NEW below for
101.1Scgddetails.
111.1Scgd
121.1ScgdNOTE ABOUT SECURE RPC:
131.1Scgd
141.1ScgdThis release of RPCSRC contains most of the code needed to implement
151.1ScgdSecure RPC (see "DES Authentication" in the RPC Protocol Specification,
161.1Scgddoc/rpc.rfc.ms).  Due to legal considerations, we are unable to
171.1Scgddistribute an implementation of DES, the Data Encryption Standard, which
181.1ScgdSecure RPC requires.  For this reason, all of the files, documentation, and
191.1Scgdprograms associated with Secure RPC have been placed into a separate
201.1Scgddirectory, secure_rpc.  The RPC library contained in the main body of this
211.1Scgdrelease *DOES NOT* support Secure RPC.  See secure_rpc/README for more
221.1Scgddetails.  (A DES library was posted in Volume 18 of comp.sources.unix.)
231.1Scgd
241.1ScgdIf you wish to report bugs found in this release, send mail to:
251.1Scgd
261.1ScgdPortable ONC/NFS
271.1ScgdSun Microsystems, Inc
281.1ScgdMS 12-33
291.1Scgd2550 Garcia Avenue
301.1ScgdMountain View, CA  94043
311.1Scgd
321.1Scgdor send Email to nfsnet@sun.com (the Internet) or sun!nfsnet (Usenet).
331.1Scgd
341.1ScgdROADMAP
351.1Scgd
361.1ScgdThe directory hierarchy is as follows:
371.1Scgd
381.1Scgd    demo/       Various demonstration services
391.1Scgd    demo/dir        Remote directory lister
401.1Scgd    demo/msg        Remote console message delivery service
411.1Scgd    demo/sort       Remote sort service
421.1Scgd
431.1Scgd    doc/        Documentation for RPC, XDR and NFS in "-ms" format.
441.1Scgd
451.1Scgd    etc/        Utilities (rpcinfo and portmap).  portmap must be
461.1Scgd                started by root before any other RPC network services are
471.1Scgd                used.  SEE BELOW FOR BUGFIX TO 4.3BSD COMPILER.
481.1Scgd
491.1Scgd    man/        Manual pages for RPC library, rpcgen, and utilities.
501.1Scgd
511.1Scgd    rpc/        The RPC and XDR library.  SEE BELOW
521.1Scgd                FOR BUGFIX TO 4.2BSD COMPILER.
531.1Scgd
541.1Scgd    rpcgen/     The RPC Language compiler (for .x files)
551.1Scgd
561.1Scgd    rpcsvc/     Service definition files for various services and the
571.1Scgd                server and client code for the Remote Status service.
581.1Scgd
591.1Scgd    secure_rpc/ The files in this directory are used to build a version of
601.1Scgd                the RPC library with DES Authentication.  See the README
611.1Scgd                file in that directory for more details.
621.1Scgd
631.1ScgdBUILD INSTRUCTIONS
641.1Scgd
651.1ScgdMakefiles can be found in all directories except for man.  The
661.1ScgdMakefile in the top directory will cause these others to be invoked
671.1Scgd(except for in the doc, man and demo directories), in turn building the
681.1Scgdentire release.
691.1Scgd
701.1ScgdWARNING!  THE DEFAULT INSTALLATION PROCEDURES WILL INSTALL FILES
711.1ScgdIN /usr/include, /usr/lib, /usr/bin and /etc.
721.1Scgd
731.1ScgdThe master RPC include file, rpc/rpc.h, is used by all programs and
741.1Scgdroutines that use RPC.  It includes other RPC and system include files
751.1Scgdneeded by the RPC system.  PLEASE NOTE: If your system has NFS, it
761.1Scgdmay have been based on Sun's NFS Source.  The include files installed
771.1Scgdby this package may duplicate include files you will find on your NFS
781.1Scgdsystem.  The RPCSRC 4.0 include files are upwardly compatible to all
791.1ScgdNFS Source include files as of the date of this distribution (not
801.1Scgdincluding any new definitions or declarations added by your system
811.1Scgdvendor).  HOWEVER: Please read the comments towards the end of
821.1Scgdrpc/rpc.h regarding rpc/netdb.h.  You may need to uncomment the
831.1Scgdinclusion of that file if the structures it defines are already
841.1Scgddefined by your system's include files.
851.1Scgd
861.1ScgdAfter making any compiler fixes that are needed (see below), at
871.1Scgdthe top directory, type:
881.1Scgd
891.1Scgd    make install
901.1Scgd
911.1ScgdFor all installations, the Makefile macro DESTDIR is prepended to the
921.1Scgdinstallation path.  It is defined to be null in the Makefiles, so
931.1Scgdinstallations are relative to root.  (You will probably need root
941.1Scgdprivileges for installing the files under the default path.)  To
951.1Scgdinstall the files under some other tree (e.g., /usr/local), use the
961.1Scgdcommand:
971.1Scgd
981.1Scgd    make install DESTDIR=/usr/local
991.1Scgd
1001.1ScgdThis will place the include files in /usr/local/usr/include, the RPC
1011.1Scgdlibrary in /usr/local/usr/lib, rpcgen in /usr/local/usr/bin, and the
1021.1Scgdutilities in /usr/local/etc.  You'll have to edit the Makefiles or
1031.1Scgdinstall the files by hand if you want to do anything other than this
1041.1Scgdkind of relocation of the installation tree.
1051.1Scgd
1061.1ScgdThe RPC library will be built and installed first.  By default it is
1071.1Scgdinstalled in /usr/lib as "librpclib.a".  The directory
1081.1Scgd/usr/include/rpc will also be created, and several header files will
1091.1Scgdbe installed there.  ALL RPC SERVICES INCLUDE THESE HEADER FILES.
1101.1Scgd
1111.1ScgdThe programs in etc/ link in routines from librpclib.a.  If you change
1121.1Scgdwhere it is installed, be sure to edit etc/'s Makefile to reflect this.
1131.1ScgdThese programs are installed in /etc.  PORTMAP MUST BE RUNNING ON
1141.1ScgdYOUR SYSTEM BEFORE YOU START ANY OTHER RPC SERVICE.
1151.1Scgd
1161.1Scgdrpcgen is installed in /usr/bin.  This program is required to build
1171.1Scgdthe demonstration services in demo and the rstat client and server in
1181.1Scgdrpcsvc/.
1191.1Scgd
1201.1ScgdThe rpcsvc/ directory will install its files in the directory
1211.1Scgd/usr/include/rpcsvc.  The Remote Status service (rstat_svc) will be
1221.1Scgdcompiled and installed in /etc.  If you wish to make this service
1231.1Scgdavailable, you should either start this service when needed or have
1241.1Scgdit started at boot time by invoking it in your /etc/rc.local script.
1251.1Scgd(Be sure that portmap is started first!)  Sun has modified its
1261.1Scgdversion of inetd to automatically start RPC services.  (Use "make
1271.1ScgdLIB=" when building rstat on a Sun Workstation.)  The Remote Status
1281.1Scgdclient (rstat) will be installed in /usr/bin.  This program queries
1291.1Scgdthe rstat_svc on a remote host and prints a system status summary
1301.1Scgdsimilar to the one printed by "uptime".
1311.1Scgd
1321.1ScgdThe documentation is not built during the "make install" command.
1331.1ScgdTyping "make" in the doc directory will cause all of the manuals to
1341.1Scgdbe formatted using nroff into a single file.  We have had a report
1351.1Scgdthat certain "troff" equivalents have trouble processing the full
1361.1Scgdmanual.  If you have trouble, try building the manuals individually
1371.1Scgd(see the Makefile).
1381.1Scgd
1391.1ScgdThe demonstration services in the demo directory are not built by the
1401.1Scgdtop-level "make install" command.  To build these, cd to the demo
1411.1Scgddirectory and enter "make".  The three services will be built.
1421.1ScgdRPCGEN MUST BE INSTALLED in a path that make can find.  To run the
1431.1Scgdservices, start the portmap program as root and invoke the service
1441.1Scgd(you probably will want to put it in the background).  rpcinfo can be
1451.1Scgdused to check that the service succeeded in getting registered with
1461.1Scgdportmap, and to ping the service (see rpcinfo's man page).  You can
1471.1Scgdthen use the corresponding client program to exercise the service.
1481.1ScgdTo build these services on a Sun workstation, you must prevent the
1491.1ScgdMakefile from trying to link the RPC library (as these routines are
1501.1Scgdalready a part of Sun's libc).  Use: "make LIB=".
1511.1Scgd
1521.1ScgdBUGFIX FOR 4.3BSD COMPILER
1531.1Scgd
1541.1ScgdThe use of a 'void *' declaration for one of the arguments in
1551.1Scgdthe reply_proc() procedure in etc/rpcinfo.c will trigger a bug
1561.1Scgdin the 4.3BSD compiler.  The bug is fixed by the following change to
1571.1Scgdthe compiler file mip/manifest.h:
1581.1Scgd
1591.1Scgd*** manifest.h.r1.1	Thu Apr 30 13:52:25 1987
1601.1Scgd--- manifest.h.r1.2	Mon Nov 23 18:58:17 1987
1611.1Scgd***************
1621.1Scgd*** 21,27 ****
1631.1Scgd  /*
1641.1Scgd   * Bogus type values
1651.1Scgd   */
1661.1Scgd! #define TNULL	PTR		/* pointer to UNDEF */
1671.1Scgd  #define TVOID	FTN		/* function returning UNDEF (for void) */
1681.1Scgd  
1691.1Scgd  /*
1701.1Scgd--- 21,27 ----
1711.1Scgd  /*
1721.1Scgd   * Bogus type values
1731.1Scgd   */
1741.1Scgd! #define TNULL	INCREF(MOETY)	/* pointer to MOETY -- impossible type */
1751.1Scgd  #define TVOID	FTN		/* function returning UNDEF (for void) */
1761.1Scgd  
1771.1Scgd  /*
1781.1Scgd
1791.1ScgdIf you cannot fix your compiler, change the declaration in reply_proc()
1801.1Scgdfrom 'void *' to 'char *'.
1811.1Scgd
1821.1ScgdBUGFIX FOR 4.2BSD COMPILER
1831.1Scgd
1841.1ScgdUnpatched 4.2BSD compilers complain about valid C.  You can make old
1851.1Scgdcompilers happy by changing some voids to ints.  However, the fix to
1861.1Scgdthe 4.2 VAX compiler is as follows (to mip/trees.c):
1871.1Scgd
1881.1Scgd*** trees.c.r1.1	Mon May 11 13:47:58 1987
1891.1Scgd--- trees.c.r1.2	Wed Jul  2 18:28:52 1986
1901.1Scgd***************
1911.1Scgd*** 1247,1253 ****
1921.1Scgd  		if(o==CAST && mt1==0)return(TYPL+TYMATCH);
1931.1Scgd  		if( mt12 & MDBI ) return( TYPL+LVAL+TYMATCH );
1941.1Scgd  		else if( (mt1&MENU)||(mt2&MENU) ) return( LVAL+NCVT+TYPL+PTMATCH+PUN );
1951.1Scgd! 		else if( mt12 == 0 ) break;
1961.1Scgd  		else if( mt1 & MPTR ) return( LVAL+PTMATCH+PUN );
1971.1Scgd  		else if( mt12 & MPTI ) return( TYPL+LVAL+TYMATCH+PUN );
1981.1Scgd  		break;
1991.1Scgd--- 1261,1269 ----
2001.1Scgd  		if(o==CAST && mt1==0)return(TYPL+TYMATCH);
2011.1Scgd  		if( mt12 & MDBI ) return( TYPL+LVAL+TYMATCH );
2021.1Scgd  		else if( (mt1&MENU)||(mt2&MENU) ) return( LVAL+NCVT+TYPL+PTMATCH+PUN );
2031.1Scgd! 		/* if right is TVOID and looks like a CALL, is not ok */
2041.1Scgd! 		else if (mt2 == 0 && (p->in.right->in.op == CALL || p->in.right->in.op == UNARY CALL))
2051.1Scgd! 			break;
2061.1Scgd  		else if( mt1 & MPTR ) return( LVAL+PTMATCH+PUN );
2071.1Scgd  		else if( mt12 & MPTI ) return( TYPL+LVAL+TYMATCH+PUN );
2081.1Scgd  		break;
2091.1Scgd
2101.1ScgdWHAT'S NEW IN THIS RELEASE: RPCSRC 4.0
2111.1Scgd
2121.1ScgdThe previous release was RPCSRC 3.9.  As with all previous releases,
2131.1Scgdthis release is based directly on files from Sun Microsystem's
2141.1Scgdimplementation.
2151.1Scgd
2161.1ScgdUpgrade from RPCSRC 3.9
2171.1Scgd
2181.1Scgd1)  RPCSRC 4.0 upgrades RPCSRC 3.9.  Improvements from SunOS 4.0 have
2191.1Scgd    been integrated into this release.
2201.1Scgd
2211.1ScgdSecure RPC (in the secure_rpc/ directory)
2221.1Scgd
2231.1Scgd2)  DES Authentication routines and programs are provided.
2241.1Scgd3)  A new manual, "Secure NFS" is provided, which describes Secure RPC
2251.1Scgd    and Secure NFS.
2261.1Scgd4)  Skeleton routines and manual pages are provided which describe the
2271.1Scgd    DES encryption procedures required by Secure RPC.  HOWEVER, NO DES
2281.1Scgd    ROUTINE IS PROVIDED.
2291.1Scgd
2301.1ScgdNew Functionality
2311.1Scgd
2321.1Scgd5)  rpcinfo can now be used to de-register services from the portmapper
2331.1Scgd    which may have terminated abnormally.
2341.1Scgd6)  A new client, rstat, is provided which queries the rstat_svc and
2351.1Scgd    prints a status line similar to the one displayed by "uptime".
236