1 /* 2 * Copyright 2012 Haiku, Inc. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Paweł Dziepak, pdziepak@quarnos.org 7 */ 8 #ifndef RPCDEFS_H 9 #define RPCDEFS_H 10 11 12 namespace RPC { 13 14 enum { 15 VERSION = 2 16 }; 17 18 enum { 19 PROGRAM_NFS = 100003, 20 PROGRAM_NFS_CB = 0x40000000 21 }; 22 23 enum { 24 NFS_VERSION = 4, 25 NFS_CB_VERSION = 1 26 }; 27 28 enum { 29 CALL = 0, 30 REPLY = 1 31 }; 32 33 enum { 34 MSG_ACCEPTED = 0, 35 MSG_DENIED = 1 36 }; 37 38 enum AcceptStat { 39 SUCCESS = 0, /* RPC executed successfully */ 40 PROG_UNAVAIL = 1, /* remote hasn't exported program */ 41 PROG_MISMATCH = 2, /* remote can't support version # */ 42 PROC_UNAVAIL = 3, /* program can't support procedure */ 43 GARBAGE_ARGS = 4, /* procedure can't decode params */ 44 SYSTEM_ERR = 5 /* e.g. memory allocation failure */ 45 }; 46 47 enum RejectStat { 48 RPC_MISMATCH = 0, /* RPC version number != 2 */ 49 AUTH_ERROR = 1 /* remote can't authenticate caller */ 50 }; 51 52 enum AuthFlavour { 53 AUTH_NONE = 0, 54 AUTH_SYS = 1 55 }; 56 57 } // namespace RPC 58 59 60 #endif // RPCDEFS_H 61 62