/* rpcbank.x server implementation */ #include #include #include #include "rpcbank.h" int xyz = 0; int * inquiry_1(transaction * t) { account *A; printf(" inside inquiry_1\n"); A = t->A; return &(A->balance); } void * withdraw_1(transaction * t) { account *A; printf(" inside withdraw_1\n"); A = t->A; A->balance -= t->amt; t->amt = 77; xyz = 3; return t; } void * deposit_1(transaction * t) { account *A; printf(" inside deposit_1\n"); A = t->A; A->balance += t->amt; t->amt = 33; return t; } int * syscall_1(char ** command) { system(*command); return (int*)(*command); } /* gcc -lrpcsvc -lnsl -o rb_server rpcbankserver.c rpcbank_svc.c rpcbank_xdr.c */ /* not transparent - no notion of object hosting */ /* that is, the object states should be maintained by the server */ /* inconsistent with semantics */