1 #ifndef _RPC_H 2 3 #define _RPC_H 4 5 const int32 RPC_VERSION = 2; 6 7 typedef enum rpc_auth_flavor 8 { 9 RPC_AUTH_NONE = 0, 10 RPC_AUTH_SYS = 1, 11 RPC_AUTH_SHORT = 2 12 } rpc_auth_flavor; 13 14 typedef enum rpc_msg_type 15 { 16 RPC_CALL = 0, 17 RPC_REPLY = 1 18 } rpc_msg_type; 19 20 typedef enum rpc_reply_stat 21 { 22 RPC_MSG_ACCEPTED = 0, 23 RPC_MSG_DENIED = 1 24 } rpc_reply_stat; 25 26 typedef enum rpc_accept_stat 27 { 28 RPC_SUCCESS = 0, /* RPC executed successfully */ 29 RPC_PROG_UNAVAIL = 1, /* remote hasn't exported program */ 30 RPC_PROG_MISMATCH = 2, /* remote can't support version # */ 31 RPC_PROC_UNAVAIL = 3, /* program can't support procedure */ 32 RPC_GARBAGE_ARGS = 4, /* procedure can't decode params */ 33 RPC_SYSTEM_ERR = 5 /* errors like memory allocation failure */ 34 } rpc_accept_stat; 35 36 typedef enum rpc_reject_stat 37 { 38 RPC_RPC_MISMATCH = 0, /* RPC version number != 2 */ 39 RPC_AUTH_ERROR = 1 /* remote can't authenticate caller */ 40 } rpc_reject_stat; 41 42 typedef enum rpc_auth_stat 43 { 44 RPC_AUTH_OK = 0, /* success */ 45 /* 46 * failed at remote end 47 */ 48 RPC_AUTH_BADCRED = 1, /* bad credential (seal broken) */ 49 RPC_AUTH_REJECTEDCRED = 2, /* client must begin new session */ 50 RPC_AUTH_BADVERF = 3, /* bad verifier (seal broken) */ 51 RPC_AUTH_REJECTEDVERF = 4, /* verifier expired or replayed */ 52 RPC_AUTH_TOOWEAK = 5, /* rejected for security reasons */ 53 /* 54 * failed locally 55 */ 56 RPC_AUTH_INVALIDRESP = 6, /* bogus response verifier */ 57 RPC_AUTH_FAILED = 7 /* reason unknown */ 58 } rpc_auth_stat; 59 60 #endif 61