7 Aug 16 23:38 msg_xdr.c / XDR File -rW-r--r-- 1 jithesh root 4398 Aug 16 23:38 msg_svc.c // Server stub 1 jithesh root 671 Aug 16 23:38 msg_clnt.c // Client Proxy -r'w-r--r-- 1 jithesh root 606 Aug 16 23:38 msg.h // IDF header Fundamentals of EMS, NMS and OSS/BSS -rwxr-xr-x 1 jithesh root 1063 Aug 16 23:38 makefile.msg* // Make file -rW-r--r-- 1 jithesh root 1148 Aug 17 00:20 msg_client.c // Client code -IW-I--I-- 1 jithesh root 459 Aug 17 00:20 msg_server.c // Server code 4. Modify client code (msg _client.c): nodeResponse *result 1; // already available code nodeRequest getstate_1_arg1, // already available code // Add the code below after the code specified above which is already available in the output of rpcgen getstate_1_arg1.nodeNumber = 3; switch(result1->nodeState) case 1: printf ("%S Node State is Active \n") ; break; case 2: printf ("%s Node State is Busy \n") ;break; default: printf ("%s Node State is Faulty \n") ;break; // The response message from server is of type short. // Each state of the node of type short maps to an actual state. 5. Modifying server code (msg_server.c) static nodeResponse result; // already available code // Add the code below after the code specified above which is already available in the output of rpcgen result. nodeState = 1; // Here the server is always returning the node state as "1" corresponding to Active 6. Compile/linking: /usr/local/bin/gcc - C : msg_xdr.c usr/local/bin/gcc msg_client.c msg_clnt.c msg_xdr.o -O client - Insl usr/local/bin/gcc msg_server.c msg_svc.c msg_xdr.o -O sever -Insl Output: -rwxr-xr-x 1 jithesh root 8096 Aug 17 00:20 client* -rwxr-xr-x 1 jithesh root 11720 Aug 17 00:20 sever* 7. Some points to be noted: Just like socket programming here connection handling is involved also. RPC Programming We need to create handle, register rpc, destroy handle after use. The protocol compiler generates code for this or the programmer can write code for the same. The programmer needs to update xdr_free to release memory, though this is not mandatory for the pr