The return codes (cast into an integer) are found in clnt.h.It is intended for programmers who wish to write network applications using Remote Procedure Calls (RPC), and who want to understand the RPC mechanisms usually hidden by the rpcgen protocol compiler rpcgen is described in detail in Chapter 4.However, for most applications, you can bypass the material presented here by using rpcgen.
The section Generating XDR Routines contains the complete source for a working RPC servicea remote directory listing service that uses rpcgen to generate XDR routines as well as client and server stubs. When the packet arrives, the server calls a dispatch routine, performs whatever service is requested, sends back the reply, and returns the procedure call to the client. Think of this level as a way of using RPC, rather than as a part of RPC itself. Users are not explicitly aware of using RPC - they simply call a procedure, just as they would call malloc(). ![]() They simply make remote procedure calls to routines on other machines. It is this layer that allows RPC to pass the hello world test. RPC calls are made with the system routines registerrpc(), callrpc(), and svcrun(). At the middle layer, a call to rnusers() is implemented by way of these two routines. It does not allow timeout specifications or the choice of transport. It allows no UNIX process control or flexibility in case of errors. ![]() ![]() Even though this document discusses how RPC is used to communicate between processes on different machines, RPC works just as well for communication between different processes on the same machine. You can do this by calling the RPC library routine rnusers(), as illustrated here. However, applications may be written on MVS, which accesses these functions on other machines. They do, however, have RPC program numbers (which are discussed in the next section), so they can be invoked with callrpc(). Most of the other RPC services also have compilable rpcgen(1) protocol description files. See Chapter 4, for detailed information about rpcgen and the rpcgen protocol description file. Using this method, the number of remote users can be found by using this program. It can be used with the RPCXDR code supplied if the defines for the ruser program are used. Together with the program and version numbers, this defines the procedure to be called. Multiple arguments and results are handled by embedding them in structures.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |