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