home *** CD-ROM | disk | FTP | other *** search
-
-
- toolbox/bin/exampleCode/networking/rpcdemo
-
-
-
- The Remote Procedure Call (RPC) library allows C programs to make
- procedure calls on other machines across the network. First, the
- client calls a procedure to send a data packet to the server. Upon
- receipt of the packet, the server calls a dispatch routine to
- perform the requested service, and then sends back a reply.
- Finally, the procedure call returns to the client.
-
- This demo is an example RPC client and server application. The RPC
- client (rminfo) is a simple program to retrieve real memory usage
- information from a host that has rpc.rminfod (the server daemon)
- installed.
-
- ------------------------------------------------------
-
- How to use this RPC server & client on IRIX 4.0.x:
-
- 1) change ID to root:
-
- % su
-
-
-
- 2) Edit /etc/rpc and change the last entry to read:
-
- sgi_reserved 391063 rminfo
-
-
-
- (Note: we're borrowing this number just for this demo.
- The entry is really reserved for SGI use only!)
-
- 3) Copy the daemon to /usr/etc or some other system directory:
-
- # cp rpc.rminfod /usr/etc
-
-
-
- 4) Edit /usr/etc/inetd.conf, adding the following entry at the end of
- the file:
-
- rminfo/1 dgram rpc/udp wait root /usr/etc/rpc.rinfod rminfod
-
-
-
- 5) Notify inetd about the change:
-
- # killall -HUP inetd
-
-
-
- 6) Wait a minute or so for inetd to reread the file.
-
- 7) Run the rminfo client:
-
- # rminfo localhost
-
-
-
- For more information on RPC programming, see the IRIX Network
- Programming Guide.
-
-