/* RPC specification file Standard RPC is not object-oriented. It is also used only with C (maybe C++) It is also OS-dependent to a significant degree For pure functions, RPC is fine, but we will try to encapsulate information as they are in oop. compile with rpcgen rpcbank.x */ typedef struct bankstruct account; struct bankstruct { int balance; int pin; }; typedef struct bankinfo transaction; struct bankinfo { account *A; int amt; /* used in withdraw-deposit */ }; program rpcbank { version bankVersion { void withdraw(transaction) = 1; /* one arg only! */ void deposit(transaction) = 2; int inquiry(transaction) = 3; int syscall(string) = 4; } = 1; } = 0x20000001;