are created using this interface routine. svc_tp_create(): This routine is used to create server handle for the specified transport. rpcb_set(): This routine is used to set a map between an RPC service and a network address. rpcb_unset(): This routine is used to unset a map between the RPC service and network address created using set routine. rpcb_getaddr(): This routine is used to get the transport addresses of specified RPC services. svc_reg(): The program and version number pair are associated with the spec- ified dispatch routine using this interface routine. svc_unreg(): The association set using svc_reg() is deleted using svc_unreg(). 27.6 RPC Implementation 1. Files that are required for executing RPC server and client: Interface file: Defining the interface details. These include the input/ output structure and the program, version, and procedure number. RPC Programming Client proxy file and server stub file: These can be generated using protocol compilers, mibdl.exe for windows and rpcgen for unix. Interface header: Also generated by a protocol compiler from the interface file. Add this header in both client and server code. Client and server code: To make a handle for communication, registering procedures, and SO on. XDR file: -Unix uses XDR (eternal data representation) in the presenta- tion layer for RPC. This file is also created by protocol compiler. 2. First let us create the interface file (msg.x): // Structure for input struct nodeRequest { short nodeNumber //Structure for output struct nodeResponse short nodeState; //RPC details program MESSAGEPROG { version PRINTMESSAGEVERS { nodeResponse getState (nodeRequest) = 1; } = 1; } = 0x20000055; // The procedure "getState" takes "nodeRequest" as the input parameter and gets "nodeResponse" as the output parameter 3. Using rpcgen: Protocol compiler have tags to perform additional functions. With the options used, all the basic files are created. >>rpcgen -N -a msg.: Output files: -rW-r--r-- 1 jithesh root 210 Aug 16 23:38 msg.x // IDF 1 jithesh root 59