xref: /dflybsd-src/lib/libc/rpc/README (revision 86d7f5d305c6adaa56ff4582ece9859d73106103)
186d7f5d3SJohn Marino$FreeBSD: src/lib/libc/rpc/README,v 1.2 2001/03/19 12:49:50 alfred Exp $
286d7f5d3SJohn Marino
386d7f5d3SJohn MarinoPLEASE READ THE DISCLAIMER FILE.  DO NOT CALL THE SUN MICROSYSTEMS SUPPORT
486d7f5d3SJohn MarinoLINE WITH QUESTIONS ON THIS RELEASE.  THEY CANNOT ANSWER QUESTIONS ABOUT THIS
586d7f5d3SJohn MarinoUNSUPPORTED SOURCE RELEASE.
686d7f5d3SJohn Marino
786d7f5d3SJohn MarinoTIRPCSRC 2.3 29 Aug 1994
886d7f5d3SJohn Marino
986d7f5d3SJohn MarinoThis distribution contains SunSoft's implementation of transport-independent
1086d7f5d3SJohn MarinoRPC (TI-RPC), External Data Representation (XDR), and various utilities and
1186d7f5d3SJohn Marinodocumentation.  These libraries and programs form the base of Open Network
1286d7f5d3SJohn MarinoComputing (ONC), and are derived directly from the Solaris 2.3 source.
1386d7f5d3SJohn Marino
1486d7f5d3SJohn MarinoPrevious releases of RPC Source based on SunOS 4.x were ported to 4.2BSD and
1586d7f5d3SJohn Marinoused Sockets as the transport interface.  These versions were
1686d7f5d3SJohn Marinotransport-specific RPC (TS-RPC).
1786d7f5d3SJohn Marino
1886d7f5d3SJohn MarinoTI-RPC is an enhanced version of TS-RPC that requires the UNIX System V
1986d7f5d3SJohn MarinoTransport Layer Interface (TLI) or an equivalent X/Open Transport Interface
2086d7f5d3SJohn Marino(XTI).  TI-RPC is on-the-wire compatible with the TS-RPC, which is supported
2186d7f5d3SJohn Marinoby almost 70 vendors on all major operating systems.  TS-RPC source code
2286d7f5d3SJohn Marino(RPCSRC 4.0) remains available from several internet sites.
2386d7f5d3SJohn Marino
2486d7f5d3SJohn MarinoThis release is a native source release, that is, it is compatible for
2586d7f5d3SJohn Marinobuilding on Solaris 2.3.  This release was built on Solaris 2.3 using SunPro
2686d7f5d3SJohn MarinoSPARCompiler 2.0.1.
2786d7f5d3SJohn Marino
2886d7f5d3SJohn MarinoSolaris 2.3 is based on System V, Release 4 (SVR4), and while this release
2986d7f5d3SJohn Marinoshould be mostly compatible with other SVR4 systems, some Solaris facilities
3086d7f5d3SJohn Marinothat are assumed may not be available.  In particular, this release uses the
3186d7f5d3SJohn MarinoMakefile format supported by SparcCompiler 2.0.1.  Second, the Secure RPC
3286d7f5d3SJohn Marinoroutines use the Solaris Name Service Switch to access public-key credential
3386d7f5d3SJohn Marinodatabases.  This code will need to be ported if your system does not support
3486d7f5d3SJohn Marinothe Name Service Switch.  Finally, this release uses the synchronization
3586d7f5d3SJohn Marinointerfaces of UI Threads to make certain interfaces thread-safe.  These
3686d7f5d3SJohn Marinointerfaces are found in libthread in Solaris 2.3 and later.
3786d7f5d3SJohn Marino
3886d7f5d3SJohn MarinoApplications linked with this release's librpc must link with the United
3986d7f5d3SJohn MarinoStates domestic version of libcrypt in order to resolve the cbc_crypt() and
4086d7f5d3SJohn Marinoecb_crypt() functions.  These routines are used with Secure RPC however all
4186d7f5d3SJohn MarinoRPC programs that link with this release's librpc will need to link with the
4286d7f5d3SJohn Marinodomestic libcrypt.  Note that the Solaris 2.3 Encryption Kit is only available
4386d7f5d3SJohn Marinowithin the United States.  (PLEASE NOTE: The RPC implementation found in
4486d7f5d3SJohn MarinoSolaris 2.3's libnsl does *not* have this requirement; linking with libcrypt
4586d7f5d3SJohn Marinois only a requirement for the TIRPCSRC 2.3 version of librpc.)
4686d7f5d3SJohn Marino
4786d7f5d3SJohn Marino
4886d7f5d3SJohn MarinoDOCUMENTATION NOTE
4986d7f5d3SJohn Marino
5086d7f5d3SJohn MarinoThe documentation found in the doc directory are derived from the Solaris 2.3
5186d7f5d3SJohn MarinoNetwork Interfaces Programming Guide.  A small number of compile examples are
5286d7f5d3SJohn Marinogiven, and these use libnsl to link in the RPC library.  This release builds
5386d7f5d3SJohn Marinothe RPC library as librpc.  To use this release's librpc, use the link command
5486d7f5d3SJohn Marino"-lrpc -lnsl -lcrypt".  This links the application with TIRPCSRC 2.3's librpc
5586d7f5d3SJohn Marinofor RPC routines, Solaris's libnsl for other networking functions, and
5686d7f5d3SJohn Marinolibcrypt for the cbc_crypt() and ecb_crypt functions.
5786d7f5d3SJohn Marino
5886d7f5d3SJohn Marino
5986d7f5d3SJohn MarinoWHY IS THIS RELEASE BEING DONE?
6086d7f5d3SJohn Marino
6186d7f5d3SJohn MarinoThis release is being distributed to make the Sun implementation of the ONC
6286d7f5d3SJohn Marinotechnologies available for reference and porting to non-Solaris platforms.
6386d7f5d3SJohn MarinoThe current release is a native source distribution, and provides services
6486d7f5d3SJohn Marinothat are already available on Solaris 2.3 (such as the RPC headers, the RPC
6586d7f5d3SJohn Marinolibrary in libnsl, rpcbind, rpcinfo, etc.).  It is not our intention to
6686d7f5d3SJohn Marinoreplace these services.  See the DISCLAIMER for further information about the
6786d7f5d3SJohn Marinolegal status of this release.
6886d7f5d3SJohn Marino
6986d7f5d3SJohn Marino
7086d7f5d3SJohn MarinoWHAT'S NEW IN THIS RELEASE: TIRPCSRC 2.3
7186d7f5d3SJohn Marino
7286d7f5d3SJohn MarinoThe previous release was TIRPCSRC 2.0.
7386d7f5d3SJohn Marino
7486d7f5d3SJohn Marino1.      This release is based on Solaris 2.3.  The previous release was
7586d7f5d3SJohn Marino	based on Solaris 2.0.  This release contains a siginificant number of
7686d7f5d3SJohn Marino	bug fixes and other enhancements over TIRPCSRC 2.0.
7786d7f5d3SJohn Marino
7886d7f5d3SJohn Marino2.      The RPC library is thread safe for all client-side interfaces
7986d7f5d3SJohn Marino	(clnt_create, clnt_call, etc.).  The server-side interfaces
8086d7f5d3SJohn Marino	(svc_create, svc_run, etc.) are not thread safe in this release. The
8186d7f5d3SJohn Marino	server-side interfaces will be made thread safe in the next release of
8286d7f5d3SJohn Marino	TIRPCSRC.  Please see the manual pages for details about which
8386d7f5d3SJohn Marino	interfaces are thread safe.
8486d7f5d3SJohn Marino
8586d7f5d3SJohn Marino3.      As part of the work to make the RPC library thread-safe, rpcgen has
8686d7f5d3SJohn Marino	been enhanced to generate thread-safe RPC stubs (the -M option).  Note
8786d7f5d3SJohn Marino	that this modifies the call-signature for the stub functions; the
8886d7f5d3SJohn Marino	procedure calling the RPC stub must now pass to the stub a pointer to
8986d7f5d3SJohn Marino	an allocated structure where results will be placed by the stub.  See
9086d7f5d3SJohn Marino	the rpcgen manual page and the rpcgen Programming Guide for details.
9186d7f5d3SJohn Marino
9286d7f5d3SJohn Marino4.      The Remote Asynchronous Calls (RAC) library is now included.  RAC was
9386d7f5d3SJohn Marino	first introduced in TIRPCSRC 1.0, and was bundled with librpc.  It is
9486d7f5d3SJohn Marino	now a separate library.  The asynchronous call model that RAC provides
9586d7f5d3SJohn Marino	can be achieved by using threads for making client-side RPC calls.
9686d7f5d3SJohn Marino	The ONC Technology group recommends using threads (where possible) to
9786d7f5d3SJohn Marino	achieve asynchrony rather than RAC.  See the rpc_rac(3n) manual page
9886d7f5d3SJohn Marino	for details.
9986d7f5d3SJohn Marino
10086d7f5d3SJohn Marino
10186d7f5d3SJohn MarinoROADMAP
10286d7f5d3SJohn Marino
10386d7f5d3SJohn MarinoThe directory hierarchy is as follows:
10486d7f5d3SJohn Marino
10586d7f5d3SJohn Marino    cmd/        Utilities
10686d7f5d3SJohn Marino    cmd/rpcgen      The RPC Language compiler (for .x files)
10786d7f5d3SJohn Marino    cmd/rpcbind     The RPC bindery and portmapper
10886d7f5d3SJohn Marino    cmd/rpcinfo     RPC bindery query utility
10986d7f5d3SJohn Marino    cmd/keyserv     The Secure RPC keyserver
11086d7f5d3SJohn Marino    cmd/demo        Some simple ONC demo services
11186d7f5d3SJohn Marino
11286d7f5d3SJohn Marino    doc/        Postscript versions of ONC documentation
11386d7f5d3SJohn Marino
11486d7f5d3SJohn Marino    head/       Header files
11586d7f5d3SJohn Marino    head/rpcsvc     RPCL (.x) specifications for various ONC services, and
11686d7f5d3SJohn Marino                    header files.
11786d7f5d3SJohn Marino
11886d7f5d3SJohn Marino    lib/        Libraries
11986d7f5d3SJohn Marino    lib/librpc      The RPC and XDR library
12086d7f5d3SJohn Marino    lib/librac      The Remote Asynchronous Calls (RAC) library
12186d7f5d3SJohn Marino
12286d7f5d3SJohn Marino    man/        Manual pages for the RPC library and utilities.
12386d7f5d3SJohn Marino
12486d7f5d3SJohn Marino    uts/common/rpc      RPC header files
12586d7f5d3SJohn Marino
12686d7f5d3SJohn Marino
12786d7f5d3SJohn Marino
12886d7f5d3SJohn MarinoBUILD INSTRUCTIONS
12986d7f5d3SJohn Marino
13086d7f5d3SJohn MarinoPrior to building the release, you must define the SRC environment variable
13186d7f5d3SJohn Marinoto be the path to the top-level Makefile.  For example, if /usr/src/tirpcsrc
13286d7f5d3SJohn Marinois where to top-level Makefile is located, execute this command prior to
13386d7f5d3SJohn Marinobuilding the release:
13486d7f5d3SJohn Marino
13586d7f5d3SJohn Marino        setenv SRC /usr/src/tirpcsrc        (csh)
13686d7f5d3SJohn Marinoor
13786d7f5d3SJohn Marino        SRC=/usr/src/tirpcsrc; export SRC   (sh)
13886d7f5d3SJohn Marino
13986d7f5d3SJohn MarinoThe sources in the lib directory depend on header files installed from head
14086d7f5d3SJohn Marinoand uts/common/rpc, and the programs in the cmd directory depend on libraries
14186d7f5d3SJohn Marinofrom lib.  Therefore, you should do a "make install" to build the release.
14286d7f5d3SJohn Marino
14386d7f5d3SJohn MarinoThe top-level Makefile builds the release.  The "ROOT" macro defines where the
14486d7f5d3SJohn Marinoheaders and libraries are installed.  The default for ROOT is "/proto".  You
14586d7f5d3SJohn Marinomay change this by either modifiying Makefile.master, or issuing the build
14686d7f5d3SJohn Marinocommand with a new definition for ROOT:
14786d7f5d3SJohn Marino
14886d7f5d3SJohn Marino        make install ROOT=/opt/onc
14986d7f5d3SJohn Marino
15086d7f5d3SJohn MarinoYou will of course need write privileges for the destination directory.
15186d7f5d3SJohn MarinoThe headers, libraries and executables will be built and installed under the
15286d7f5d3SJohn MarinoROOT.
15386d7f5d3SJohn Marino
15486d7f5d3SJohn Marino
15586d7f5d3SJohn MarinoThe demonstration services in the demo directory are not built by the
15686d7f5d3SJohn Marinotop-level "make install" command.  To build these, cd to the cmd/demo
15786d7f5d3SJohn Marinodirectory and enter "make".  The four services will be built.
15886d7f5d3SJohn MarinoRPCGEN MUST BE INSTALLED in a path that make can find.  To run the
15986d7f5d3SJohn Marinoservices, rpcbind must be running, then invoke the service
16086d7f5d3SJohn Marino(you probably will want to put it in the background).  rpcinfo can be
16186d7f5d3SJohn Marinoused to check that the service succeeded in getting registered with
16286d7f5d3SJohn Marinorpcbind, and to ping the service (see rpcinfo's man page).  You can
16386d7f5d3SJohn Marinothen use the corresponding client program to exercise the service.
16486d7f5d3SJohn Marino
16586d7f5d3SJohn Marino
16686d7f5d3SJohn MarinoBUILDING ONC APPLICATIONS
16786d7f5d3SJohn Marino
16886d7f5d3SJohn MarinoSee the Makefiles in the demonstration services for examples of building
16986d7f5d3SJohn MarinoONC applications with this release.  The $(ROOT)/usr/include directory
17086d7f5d3SJohn Marinomust be included in the compiler header file search path (-I), and the
17186d7f5d3SJohn Marino$(ROOT)/usr/lib directory must be included in the linker library file search
17286d7f5d3SJohn Marinopath (-L).  Also, to run executables built dynamically, the shared library
17386d7f5d3SJohn Marinosearch path (LD_LIBRARY_PATH) must also include $(ROOT)/usr/lib.  In addition
17486d7f5d3SJohn Marinoto linking in this release's librpc (via -lrpc), you must also link with
17586d7f5d3SJohn MarinoSolaris's libnsl (-lnsl) and the US domestic version of libcrypt (-lcrypt).
176