home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / exampleCode / networking / rpcdemo / README < prev    next >
Encoding:
Text File  |  1994-08-02  |  1.7 KB  |  68 lines

  1.  
  2.  
  3.                  toolbox/bin/exampleCode/networking/rpcdemo
  4.       
  5.  
  6.  
  7.       The Remote Procedure Call (RPC) library allows C programs to make
  8.       procedure calls on other machines across the network.  First, the 
  9.       client calls a procedure to send a data packet to the server.  Upon 
  10.       receipt of the packet, the server calls a dispatch routine to 
  11.       perform the requested service, and then sends back a reply.  
  12.       Finally, the procedure call returns to the client.
  13.       
  14.       This demo is an example RPC client and server application.  The RPC
  15.       client (rminfo) is a simple program to retrieve real memory usage 
  16.       information from a host that has rpc.rminfod (the server daemon) 
  17.       installed.
  18.       
  19.               ------------------------------------------------------
  20.       
  21.       How to use this RPC server & client on IRIX 4.0.x:
  22.       
  23.       1) change ID to root:
  24.       
  25. % su
  26.  
  27.  
  28.       
  29.       2) Edit /etc/rpc and change the last entry to read:
  30.       
  31. sgi_reserved    391063 rminfo
  32.  
  33.  
  34.       
  35.           (Note:  we're borrowing this number just for this demo.
  36.            The entry is really reserved for SGI use only!)
  37.       
  38.       3) Copy the daemon to /usr/etc or some other system directory:
  39.       
  40. # cp rpc.rminfod /usr/etc
  41.  
  42.  
  43.       
  44.       4) Edit /usr/etc/inetd.conf, adding the following entry at the end of
  45.          the file:
  46.       
  47. rminfo/1   dgram   rpc/udp wait   root   /usr/etc/rpc.rinfod   rminfod
  48.       
  49.  
  50.  
  51.       5) Notify inetd about the change:
  52.       
  53. # killall -HUP inetd
  54.  
  55.  
  56.       
  57.       6) Wait a minute or so for inetd to reread the file.
  58.       
  59.       7) Run the rminfo client:
  60.       
  61. # rminfo localhost
  62.       
  63.  
  64.       
  65.       For more information on RPC programming, see the IRIX Network
  66.       Programming Guide.
  67.       
  68.