xref: /freebsd/lib/libc/rpc/README (revision 8360efbd6c932013ffdb2f83d2f2de4278febb5e)
18360efbdSAlfred Perlstein$FreeBSD$
299064799SGarrett Wollman
38360efbdSAlfred PerlsteinPLEASE READ THE DISCLAIMER FILE.  DO NOT CALL THE SUN MICROSYSTEMS SUPPORT
48360efbdSAlfred PerlsteinLINE WITH QUESTIONS ON THIS RELEASE.  THEY CANNOT ANSWER QUESTIONS ABOUT THIS
58360efbdSAlfred PerlsteinUNSUPPORTED SOURCE RELEASE.
699064799SGarrett Wollman
78360efbdSAlfred PerlsteinTIRPCSRC 2.3 29 Aug 1994
899064799SGarrett Wollman
98360efbdSAlfred PerlsteinThis distribution contains SunSoft's implementation of transport-independent
108360efbdSAlfred PerlsteinRPC (TI-RPC), External Data Representation (XDR), and various utilities and
118360efbdSAlfred Perlsteindocumentation.  These libraries and programs form the base of Open Network
128360efbdSAlfred PerlsteinComputing (ONC), and are derived directly from the Solaris 2.3 source.
1399064799SGarrett Wollman
148360efbdSAlfred PerlsteinPrevious releases of RPC Source based on SunOS 4.x were ported to 4.2BSD and
158360efbdSAlfred Perlsteinused Sockets as the transport interface.  These versions were
168360efbdSAlfred Perlsteintransport-specific RPC (TS-RPC).
1799064799SGarrett Wollman
188360efbdSAlfred PerlsteinTI-RPC is an enhanced version of TS-RPC that requires the UNIX System V
198360efbdSAlfred PerlsteinTransport Layer Interface (TLI) or an equivalent X/Open Transport Interface
208360efbdSAlfred Perlstein(XTI).  TI-RPC is on-the-wire compatible with the TS-RPC, which is supported
218360efbdSAlfred Perlsteinby almost 70 vendors on all major operating systems.  TS-RPC source code
228360efbdSAlfred Perlstein(RPCSRC 4.0) remains available from several internet sites.
2399064799SGarrett Wollman
248360efbdSAlfred PerlsteinThis release is a native source release, that is, it is compatible for
258360efbdSAlfred Perlsteinbuilding on Solaris 2.3.  This release was built on Solaris 2.3 using SunPro
268360efbdSAlfred PerlsteinSPARCompiler 2.0.1.
278360efbdSAlfred Perlstein
288360efbdSAlfred PerlsteinSolaris 2.3 is based on System V, Release 4 (SVR4), and while this release
298360efbdSAlfred Perlsteinshould be mostly compatible with other SVR4 systems, some Solaris facilities
308360efbdSAlfred Perlsteinthat are assumed may not be available.  In particular, this release uses the
318360efbdSAlfred PerlsteinMakefile format supported by SparcCompiler 2.0.1.  Second, the Secure RPC
328360efbdSAlfred Perlsteinroutines use the Solaris Name Service Switch to access public-key credential
338360efbdSAlfred Perlsteindatabases.  This code will need to be ported if your system does not support
348360efbdSAlfred Perlsteinthe Name Service Switch.  Finally, this release uses the synchronization
358360efbdSAlfred Perlsteininterfaces of UI Threads to make certain interfaces thread-safe.  These
368360efbdSAlfred Perlsteininterfaces are found in libthread in Solaris 2.3 and later.
378360efbdSAlfred Perlstein
388360efbdSAlfred PerlsteinApplications linked with this release's librpc must link with the United
398360efbdSAlfred PerlsteinStates domestic version of libcrypt in order to resolve the cbc_crypt() and
408360efbdSAlfred Perlsteinecb_crypt() functions.  These routines are used with Secure RPC however all
418360efbdSAlfred PerlsteinRPC programs that link with this release's librpc will need to link with the
428360efbdSAlfred Perlsteindomestic libcrypt.  Note that the Solaris 2.3 Encryption Kit is only available
438360efbdSAlfred Perlsteinwithin the United States.  (PLEASE NOTE: The RPC implementation found in
448360efbdSAlfred PerlsteinSolaris 2.3's libnsl does *not* have this requirement; linking with libcrypt
458360efbdSAlfred Perlsteinis only a requirement for the TIRPCSRC 2.3 version of librpc.)
468360efbdSAlfred Perlstein
478360efbdSAlfred Perlstein
488360efbdSAlfred PerlsteinDOCUMENTATION NOTE
498360efbdSAlfred Perlstein
508360efbdSAlfred PerlsteinThe documentation found in the doc directory are derived from the Solaris 2.3
518360efbdSAlfred PerlsteinNetwork Interfaces Programming Guide.  A small number of compile examples are
528360efbdSAlfred Perlsteingiven, and these use libnsl to link in the RPC library.  This release builds
538360efbdSAlfred Perlsteinthe RPC library as librpc.  To use this release's librpc, use the link command
548360efbdSAlfred Perlstein"-lrpc -lnsl -lcrypt".  This links the application with TIRPCSRC 2.3's librpc
558360efbdSAlfred Perlsteinfor RPC routines, Solaris's libnsl for other networking functions, and
568360efbdSAlfred Perlsteinlibcrypt for the cbc_crypt() and ecb_crypt functions.
578360efbdSAlfred Perlstein
588360efbdSAlfred Perlstein
598360efbdSAlfred PerlsteinWHY IS THIS RELEASE BEING DONE?
608360efbdSAlfred Perlstein
618360efbdSAlfred PerlsteinThis release is being distributed to make the Sun implementation of the ONC
628360efbdSAlfred Perlsteintechnologies available for reference and porting to non-Solaris platforms.
638360efbdSAlfred PerlsteinThe current release is a native source distribution, and provides services
648360efbdSAlfred Perlsteinthat are already available on Solaris 2.3 (such as the RPC headers, the RPC
658360efbdSAlfred Perlsteinlibrary in libnsl, rpcbind, rpcinfo, etc.).  It is not our intention to
668360efbdSAlfred Perlsteinreplace these services.  See the DISCLAIMER for further information about the
678360efbdSAlfred Perlsteinlegal status of this release.
688360efbdSAlfred Perlstein
698360efbdSAlfred Perlstein
708360efbdSAlfred PerlsteinWHAT'S NEW IN THIS RELEASE: TIRPCSRC 2.3
718360efbdSAlfred Perlstein
728360efbdSAlfred PerlsteinThe previous release was TIRPCSRC 2.0.
738360efbdSAlfred Perlstein
748360efbdSAlfred Perlstein1.      This release is based on Solaris 2.3.  The previous release was
758360efbdSAlfred Perlstein	based on Solaris 2.0.  This release contains a siginificant number of
768360efbdSAlfred Perlstein	bug fixes and other enhancements over TIRPCSRC 2.0.
778360efbdSAlfred Perlstein
788360efbdSAlfred Perlstein2.      The RPC library is thread safe for all client-side interfaces
798360efbdSAlfred Perlstein	(clnt_create, clnt_call, etc.).  The server-side interfaces
808360efbdSAlfred Perlstein	(svc_create, svc_run, etc.) are not thread safe in this release. The
818360efbdSAlfred Perlstein	server-side interfaces will be made thread safe in the next release of
828360efbdSAlfred Perlstein	TIRPCSRC.  Please see the manual pages for details about which
838360efbdSAlfred Perlstein	interfaces are thread safe.
848360efbdSAlfred Perlstein
858360efbdSAlfred Perlstein3.      As part of the work to make the RPC library thread-safe, rpcgen has
868360efbdSAlfred Perlstein	been enhanced to generate thread-safe RPC stubs (the -M option).  Note
878360efbdSAlfred Perlstein	that this modifies the call-signature for the stub functions; the
888360efbdSAlfred Perlstein	procedure calling the RPC stub must now pass to the stub a pointer to
898360efbdSAlfred Perlstein	an allocated structure where results will be placed by the stub.  See
908360efbdSAlfred Perlstein	the rpcgen manual page and the rpcgen Programming Guide for details.
918360efbdSAlfred Perlstein
928360efbdSAlfred Perlstein4.      The Remote Asynchronous Calls (RAC) library is now included.  RAC was
938360efbdSAlfred Perlstein	first introduced in TIRPCSRC 1.0, and was bundled with librpc.  It is
948360efbdSAlfred Perlstein	now a separate library.  The asynchronous call model that RAC provides
958360efbdSAlfred Perlstein	can be achieved by using threads for making client-side RPC calls.
968360efbdSAlfred Perlstein	The ONC Technology group recommends using threads (where possible) to
978360efbdSAlfred Perlstein	achieve asynchrony rather than RAC.  See the rpc_rac(3n) manual page
988360efbdSAlfred Perlstein	for details.
998360efbdSAlfred Perlstein
10099064799SGarrett Wollman
10199064799SGarrett WollmanROADMAP
10299064799SGarrett Wollman
10399064799SGarrett WollmanThe directory hierarchy is as follows:
10499064799SGarrett Wollman
1058360efbdSAlfred Perlstein    cmd/        Utilities
1068360efbdSAlfred Perlstein    cmd/rpcgen      The RPC Language compiler (for .x files)
1078360efbdSAlfred Perlstein    cmd/rpcbind     The RPC bindery and portmapper
1088360efbdSAlfred Perlstein    cmd/rpcinfo     RPC bindery query utility
1098360efbdSAlfred Perlstein    cmd/keyserv     The Secure RPC keyserver
1108360efbdSAlfred Perlstein    cmd/demo        Some simple ONC demo services
11199064799SGarrett Wollman
1128360efbdSAlfred Perlstein    doc/        Postscript versions of ONC documentation
11399064799SGarrett Wollman
1148360efbdSAlfred Perlstein    head/       Header files
1158360efbdSAlfred Perlstein    head/rpcsvc     RPCL (.x) specifications for various ONC services, and
1168360efbdSAlfred Perlstein                    header files.
11799064799SGarrett Wollman
1188360efbdSAlfred Perlstein    lib/        Libraries
1198360efbdSAlfred Perlstein    lib/librpc      The RPC and XDR library
1208360efbdSAlfred Perlstein    lib/librac      The Remote Asynchronous Calls (RAC) library
12199064799SGarrett Wollman
1228360efbdSAlfred Perlstein    man/        Manual pages for the RPC library and utilities.
12399064799SGarrett Wollman
1248360efbdSAlfred Perlstein    uts/common/rpc      RPC header files
12599064799SGarrett Wollman
12699064799SGarrett Wollman
12799064799SGarrett Wollman
12899064799SGarrett WollmanBUILD INSTRUCTIONS
12999064799SGarrett Wollman
1308360efbdSAlfred PerlsteinPrior to building the release, you must define the SRC environment variable
1318360efbdSAlfred Perlsteinto be the path to the top-level Makefile.  For example, if /usr/src/tirpcsrc
1328360efbdSAlfred Perlsteinis where to top-level Makefile is located, execute this command prior to
1338360efbdSAlfred Perlsteinbuilding the release:
13499064799SGarrett Wollman
1358360efbdSAlfred Perlstein        setenv SRC /usr/src/tirpcsrc        (csh)
1368360efbdSAlfred Perlsteinor
1378360efbdSAlfred Perlstein        SRC=/usr/src/tirpcsrc; export SRC   (sh)
13899064799SGarrett Wollman
1398360efbdSAlfred PerlsteinThe sources in the lib directory depend on header files installed from head
1408360efbdSAlfred Perlsteinand uts/common/rpc, and the programs in the cmd directory depend on libraries
1418360efbdSAlfred Perlsteinfrom lib.  Therefore, you should do a "make install" to build the release.
14299064799SGarrett Wollman
1438360efbdSAlfred PerlsteinThe top-level Makefile builds the release.  The "ROOT" macro defines where the
1448360efbdSAlfred Perlsteinheaders and libraries are installed.  The default for ROOT is "/proto".  You
1458360efbdSAlfred Perlsteinmay change this by either modifiying Makefile.master, or issuing the build
1468360efbdSAlfred Perlsteincommand with a new definition for ROOT:
14799064799SGarrett Wollman
1488360efbdSAlfred Perlstein        make install ROOT=/opt/onc
14999064799SGarrett Wollman
1508360efbdSAlfred PerlsteinYou will of course need write privileges for the destination directory.
1518360efbdSAlfred PerlsteinThe headers, libraries and executables will be built and installed under the
1528360efbdSAlfred PerlsteinROOT.
15399064799SGarrett Wollman
15499064799SGarrett Wollman
15599064799SGarrett WollmanThe demonstration services in the demo directory are not built by the
1568360efbdSAlfred Perlsteintop-level "make install" command.  To build these, cd to the cmd/demo
1578360efbdSAlfred Perlsteindirectory and enter "make".  The four services will be built.
15899064799SGarrett WollmanRPCGEN MUST BE INSTALLED in a path that make can find.  To run the
1598360efbdSAlfred Perlsteinservices, rpcbind must be running, then invoke the service
16099064799SGarrett Wollman(you probably will want to put it in the background).  rpcinfo can be
16199064799SGarrett Wollmanused to check that the service succeeded in getting registered with
1628360efbdSAlfred Perlsteinrpcbind, and to ping the service (see rpcinfo's man page).  You can
16399064799SGarrett Wollmanthen use the corresponding client program to exercise the service.
16499064799SGarrett Wollman
16599064799SGarrett Wollman
1668360efbdSAlfred PerlsteinBUILDING ONC APPLICATIONS
16799064799SGarrett Wollman
1688360efbdSAlfred PerlsteinSee the Makefiles in the demonstration services for examples of building
1698360efbdSAlfred PerlsteinONC applications with this release.  The $(ROOT)/usr/include directory
1708360efbdSAlfred Perlsteinmust be included in the compiler header file search path (-I), and the
1718360efbdSAlfred Perlstein$(ROOT)/usr/lib directory must be included in the linker library file search
1728360efbdSAlfred Perlsteinpath (-L).  Also, to run executables built dynamically, the shared library
1738360efbdSAlfred Perlsteinsearch path (LD_LIBRARY_PATH) must also include $(ROOT)/usr/lib.  In addition
1748360efbdSAlfred Perlsteinto linking in this release's librpc (via -lrpc), you must also link with
1758360efbdSAlfred PerlsteinSolaris's libnsl (-lnsl) and the US domestic version of libcrypt (-lcrypt).
17699064799SGarrett Wollman
177