xref: /netbsd-src/lib/libc/rpc/README (revision b51ed80fd587a49787f7f3850a23e090b555ad90)
1*b51ed80fSperry#	$NetBSD: README,v 1.2 1998/01/09 04:11:52 perry Exp $
2*b51ed80fSperry
363d7b677ScgdRPCSRC 4.0 7/11/89
463d7b677Scgd
563d7b677ScgdThis distribution contains Sun Microsystem's implementation of the
663d7b677ScgdRPC and XDR protocols and is compatible with 4.2BSD and 4.3BSD.  Also
763d7b677Scgdincluded is complete documentation, utilities, RPC service
863d7b677Scgdspecification files, and demonstration services in the format used by
963d7b677Scgdthe RPC protocol compiler (rpcgen).  See WHAT'S NEW below for
1063d7b677Scgddetails.
1163d7b677Scgd
1263d7b677ScgdNOTE ABOUT SECURE RPC:
1363d7b677Scgd
1463d7b677ScgdThis release of RPCSRC contains most of the code needed to implement
1563d7b677ScgdSecure RPC (see "DES Authentication" in the RPC Protocol Specification,
1663d7b677Scgddoc/rpc.rfc.ms).  Due to legal considerations, we are unable to
1763d7b677Scgddistribute an implementation of DES, the Data Encryption Standard, which
1863d7b677ScgdSecure RPC requires.  For this reason, all of the files, documentation, and
1963d7b677Scgdprograms associated with Secure RPC have been placed into a separate
2063d7b677Scgddirectory, secure_rpc.  The RPC library contained in the main body of this
2163d7b677Scgdrelease *DOES NOT* support Secure RPC.  See secure_rpc/README for more
2263d7b677Scgddetails.  (A DES library was posted in Volume 18 of comp.sources.unix.)
2363d7b677Scgd
2463d7b677ScgdIf you wish to report bugs found in this release, send mail to:
2563d7b677Scgd
2663d7b677ScgdPortable ONC/NFS
2763d7b677ScgdSun Microsystems, Inc
2863d7b677ScgdMS 12-33
2963d7b677Scgd2550 Garcia Avenue
3063d7b677ScgdMountain View, CA  94043
3163d7b677Scgd
3263d7b677Scgdor send Email to nfsnet@sun.com (the Internet) or sun!nfsnet (Usenet).
3363d7b677Scgd
3463d7b677ScgdROADMAP
3563d7b677Scgd
3663d7b677ScgdThe directory hierarchy is as follows:
3763d7b677Scgd
3863d7b677Scgd    demo/       Various demonstration services
3963d7b677Scgd    demo/dir        Remote directory lister
4063d7b677Scgd    demo/msg        Remote console message delivery service
4163d7b677Scgd    demo/sort       Remote sort service
4263d7b677Scgd
4363d7b677Scgd    doc/        Documentation for RPC, XDR and NFS in "-ms" format.
4463d7b677Scgd
4563d7b677Scgd    etc/        Utilities (rpcinfo and portmap).  portmap must be
4663d7b677Scgd                started by root before any other RPC network services are
4763d7b677Scgd                used.  SEE BELOW FOR BUGFIX TO 4.3BSD COMPILER.
4863d7b677Scgd
4963d7b677Scgd    man/        Manual pages for RPC library, rpcgen, and utilities.
5063d7b677Scgd
5163d7b677Scgd    rpc/        The RPC and XDR library.  SEE BELOW
5263d7b677Scgd                FOR BUGFIX TO 4.2BSD COMPILER.
5363d7b677Scgd
5463d7b677Scgd    rpcgen/     The RPC Language compiler (for .x files)
5563d7b677Scgd
5663d7b677Scgd    rpcsvc/     Service definition files for various services and the
5763d7b677Scgd                server and client code for the Remote Status service.
5863d7b677Scgd
5963d7b677Scgd    secure_rpc/ The files in this directory are used to build a version of
6063d7b677Scgd                the RPC library with DES Authentication.  See the README
6163d7b677Scgd                file in that directory for more details.
6263d7b677Scgd
6363d7b677ScgdBUILD INSTRUCTIONS
6463d7b677Scgd
6563d7b677ScgdMakefiles can be found in all directories except for man.  The
6663d7b677ScgdMakefile in the top directory will cause these others to be invoked
6763d7b677Scgd(except for in the doc, man and demo directories), in turn building the
6863d7b677Scgdentire release.
6963d7b677Scgd
7063d7b677ScgdWARNING!  THE DEFAULT INSTALLATION PROCEDURES WILL INSTALL FILES
7163d7b677ScgdIN /usr/include, /usr/lib, /usr/bin and /etc.
7263d7b677Scgd
7363d7b677ScgdThe master RPC include file, rpc/rpc.h, is used by all programs and
7463d7b677Scgdroutines that use RPC.  It includes other RPC and system include files
7563d7b677Scgdneeded by the RPC system.  PLEASE NOTE: If your system has NFS, it
7663d7b677Scgdmay have been based on Sun's NFS Source.  The include files installed
7763d7b677Scgdby this package may duplicate include files you will find on your NFS
7863d7b677Scgdsystem.  The RPCSRC 4.0 include files are upwardly compatible to all
7963d7b677ScgdNFS Source include files as of the date of this distribution (not
8063d7b677Scgdincluding any new definitions or declarations added by your system
8163d7b677Scgdvendor).  HOWEVER: Please read the comments towards the end of
8263d7b677Scgdrpc/rpc.h regarding rpc/netdb.h.  You may need to uncomment the
8363d7b677Scgdinclusion of that file if the structures it defines are already
8463d7b677Scgddefined by your system's include files.
8563d7b677Scgd
8663d7b677ScgdAfter making any compiler fixes that are needed (see below), at
8763d7b677Scgdthe top directory, type:
8863d7b677Scgd
8963d7b677Scgd    make install
9063d7b677Scgd
9163d7b677ScgdFor all installations, the Makefile macro DESTDIR is prepended to the
9263d7b677Scgdinstallation path.  It is defined to be null in the Makefiles, so
9363d7b677Scgdinstallations are relative to root.  (You will probably need root
9463d7b677Scgdprivileges for installing the files under the default path.)  To
9563d7b677Scgdinstall the files under some other tree (e.g., /usr/local), use the
9663d7b677Scgdcommand:
9763d7b677Scgd
9863d7b677Scgd    make install DESTDIR=/usr/local
9963d7b677Scgd
10063d7b677ScgdThis will place the include files in /usr/local/usr/include, the RPC
10163d7b677Scgdlibrary in /usr/local/usr/lib, rpcgen in /usr/local/usr/bin, and the
10263d7b677Scgdutilities in /usr/local/etc.  You'll have to edit the Makefiles or
10363d7b677Scgdinstall the files by hand if you want to do anything other than this
10463d7b677Scgdkind of relocation of the installation tree.
10563d7b677Scgd
10663d7b677ScgdThe RPC library will be built and installed first.  By default it is
10763d7b677Scgdinstalled in /usr/lib as "librpclib.a".  The directory
10863d7b677Scgd/usr/include/rpc will also be created, and several header files will
10963d7b677Scgdbe installed there.  ALL RPC SERVICES INCLUDE THESE HEADER FILES.
11063d7b677Scgd
11163d7b677ScgdThe programs in etc/ link in routines from librpclib.a.  If you change
11263d7b677Scgdwhere it is installed, be sure to edit etc/'s Makefile to reflect this.
11363d7b677ScgdThese programs are installed in /etc.  PORTMAP MUST BE RUNNING ON
11463d7b677ScgdYOUR SYSTEM BEFORE YOU START ANY OTHER RPC SERVICE.
11563d7b677Scgd
11663d7b677Scgdrpcgen is installed in /usr/bin.  This program is required to build
11763d7b677Scgdthe demonstration services in demo and the rstat client and server in
11863d7b677Scgdrpcsvc/.
11963d7b677Scgd
12063d7b677ScgdThe rpcsvc/ directory will install its files in the directory
12163d7b677Scgd/usr/include/rpcsvc.  The Remote Status service (rstat_svc) will be
12263d7b677Scgdcompiled and installed in /etc.  If you wish to make this service
12363d7b677Scgdavailable, you should either start this service when needed or have
12463d7b677Scgdit started at boot time by invoking it in your /etc/rc.local script.
12563d7b677Scgd(Be sure that portmap is started first!)  Sun has modified its
12663d7b677Scgdversion of inetd to automatically start RPC services.  (Use "make
12763d7b677ScgdLIB=" when building rstat on a Sun Workstation.)  The Remote Status
12863d7b677Scgdclient (rstat) will be installed in /usr/bin.  This program queries
12963d7b677Scgdthe rstat_svc on a remote host and prints a system status summary
13063d7b677Scgdsimilar to the one printed by "uptime".
13163d7b677Scgd
13263d7b677ScgdThe documentation is not built during the "make install" command.
13363d7b677ScgdTyping "make" in the doc directory will cause all of the manuals to
13463d7b677Scgdbe formatted using nroff into a single file.  We have had a report
13563d7b677Scgdthat certain "troff" equivalents have trouble processing the full
13663d7b677Scgdmanual.  If you have trouble, try building the manuals individually
13763d7b677Scgd(see the Makefile).
13863d7b677Scgd
13963d7b677ScgdThe demonstration services in the demo directory are not built by the
14063d7b677Scgdtop-level "make install" command.  To build these, cd to the demo
14163d7b677Scgddirectory and enter "make".  The three services will be built.
14263d7b677ScgdRPCGEN MUST BE INSTALLED in a path that make can find.  To run the
14363d7b677Scgdservices, start the portmap program as root and invoke the service
14463d7b677Scgd(you probably will want to put it in the background).  rpcinfo can be
14563d7b677Scgdused to check that the service succeeded in getting registered with
14663d7b677Scgdportmap, and to ping the service (see rpcinfo's man page).  You can
14763d7b677Scgdthen use the corresponding client program to exercise the service.
14863d7b677ScgdTo build these services on a Sun workstation, you must prevent the
14963d7b677ScgdMakefile from trying to link the RPC library (as these routines are
15063d7b677Scgdalready a part of Sun's libc).  Use: "make LIB=".
15163d7b677Scgd
15263d7b677ScgdBUGFIX FOR 4.3BSD COMPILER
15363d7b677Scgd
15463d7b677ScgdThe use of a 'void *' declaration for one of the arguments in
15563d7b677Scgdthe reply_proc() procedure in etc/rpcinfo.c will trigger a bug
15663d7b677Scgdin the 4.3BSD compiler.  The bug is fixed by the following change to
15763d7b677Scgdthe compiler file mip/manifest.h:
15863d7b677Scgd
15963d7b677Scgd*** manifest.h.r1.1	Thu Apr 30 13:52:25 1987
16063d7b677Scgd--- manifest.h.r1.2	Mon Nov 23 18:58:17 1987
16163d7b677Scgd***************
16263d7b677Scgd*** 21,27 ****
16363d7b677Scgd  /*
16463d7b677Scgd   * Bogus type values
16563d7b677Scgd   */
16663d7b677Scgd! #define TNULL	PTR		/* pointer to UNDEF */
16763d7b677Scgd  #define TVOID	FTN		/* function returning UNDEF (for void) */
16863d7b677Scgd
16963d7b677Scgd  /*
17063d7b677Scgd--- 21,27 ----
17163d7b677Scgd  /*
17263d7b677Scgd   * Bogus type values
17363d7b677Scgd   */
17463d7b677Scgd! #define TNULL	INCREF(MOETY)	/* pointer to MOETY -- impossible type */
17563d7b677Scgd  #define TVOID	FTN		/* function returning UNDEF (for void) */
17663d7b677Scgd
17763d7b677Scgd  /*
17863d7b677Scgd
17963d7b677ScgdIf you cannot fix your compiler, change the declaration in reply_proc()
18063d7b677Scgdfrom 'void *' to 'char *'.
18163d7b677Scgd
18263d7b677ScgdBUGFIX FOR 4.2BSD COMPILER
18363d7b677Scgd
18463d7b677ScgdUnpatched 4.2BSD compilers complain about valid C.  You can make old
18563d7b677Scgdcompilers happy by changing some voids to ints.  However, the fix to
18663d7b677Scgdthe 4.2 VAX compiler is as follows (to mip/trees.c):
18763d7b677Scgd
18863d7b677Scgd*** trees.c.r1.1	Mon May 11 13:47:58 1987
18963d7b677Scgd--- trees.c.r1.2	Wed Jul  2 18:28:52 1986
19063d7b677Scgd***************
19163d7b677Scgd*** 1247,1253 ****
19263d7b677Scgd  		if(o==CAST && mt1==0)return(TYPL+TYMATCH);
19363d7b677Scgd  		if( mt12 & MDBI ) return( TYPL+LVAL+TYMATCH );
19463d7b677Scgd  		else if( (mt1&MENU)||(mt2&MENU) ) return( LVAL+NCVT+TYPL+PTMATCH+PUN );
19563d7b677Scgd! 		else if( mt12 == 0 ) break;
19663d7b677Scgd  		else if( mt1 & MPTR ) return( LVAL+PTMATCH+PUN );
19763d7b677Scgd  		else if( mt12 & MPTI ) return( TYPL+LVAL+TYMATCH+PUN );
19863d7b677Scgd  		break;
19963d7b677Scgd--- 1261,1269 ----
20063d7b677Scgd  		if(o==CAST && mt1==0)return(TYPL+TYMATCH);
20163d7b677Scgd  		if( mt12 & MDBI ) return( TYPL+LVAL+TYMATCH );
20263d7b677Scgd  		else if( (mt1&MENU)||(mt2&MENU) ) return( LVAL+NCVT+TYPL+PTMATCH+PUN );
20363d7b677Scgd! 		/* if right is TVOID and looks like a CALL, is not ok */
20463d7b677Scgd! 		else if (mt2 == 0 && (p->in.right->in.op == CALL || p->in.right->in.op == UNARY CALL))
20563d7b677Scgd! 			break;
20663d7b677Scgd  		else if( mt1 & MPTR ) return( LVAL+PTMATCH+PUN );
20763d7b677Scgd  		else if( mt12 & MPTI ) return( TYPL+LVAL+TYMATCH+PUN );
20863d7b677Scgd  		break;
20963d7b677Scgd
21063d7b677ScgdWHAT'S NEW IN THIS RELEASE: RPCSRC 4.0
21163d7b677Scgd
21263d7b677ScgdThe previous release was RPCSRC 3.9.  As with all previous releases,
21363d7b677Scgdthis release is based directly on files from Sun Microsystem's
21463d7b677Scgdimplementation.
21563d7b677Scgd
21663d7b677ScgdUpgrade from RPCSRC 3.9
21763d7b677Scgd
21863d7b677Scgd1)  RPCSRC 4.0 upgrades RPCSRC 3.9.  Improvements from SunOS 4.0 have
21963d7b677Scgd    been integrated into this release.
22063d7b677Scgd
22163d7b677ScgdSecure RPC (in the secure_rpc/ directory)
22263d7b677Scgd
22363d7b677Scgd2)  DES Authentication routines and programs are provided.
22463d7b677Scgd3)  A new manual, "Secure NFS" is provided, which describes Secure RPC
22563d7b677Scgd    and Secure NFS.
22663d7b677Scgd4)  Skeleton routines and manual pages are provided which describe the
22763d7b677Scgd    DES encryption procedures required by Secure RPC.  HOWEVER, NO DES
22863d7b677Scgd    ROUTINE IS PROVIDED.
22963d7b677Scgd
23063d7b677ScgdNew Functionality
23163d7b677Scgd
23263d7b677Scgd5)  rpcinfo can now be used to de-register services from the portmapper
23363d7b677Scgd    which may have terminated abnormally.
23463d7b677Scgd6)  A new client, rstat, is provided which queries the rstat_svc and
23563d7b677Scgd    prints a status line similar to the one displayed by "uptime".
236