Main Page | Class List | File List | Class Members | File Members | Related Pages

gi_xdr_rpc.h

Go to the documentation of this file.
00001 /* 00002 * $Id: gi_xdr_rpc.h,v 1.1.2.2 2004/04/20 22:12:53 jasta Exp $ 00003 * 00004 * Copyright (C) 2004 giFT project (gift.sourceforge.net) 00005 * 00006 * This program is free software; you can redistribute it and/or modify it 00007 * under the terms of the GNU General Public License as published by the 00008 * Free Software Foundation; either version 2, or (at your option) any 00009 * later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, but 00012 * WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * General Public License for more details. 00015 */ 00016 00017 #ifndef __GI_XDR_RPC_H 00018 #define __GI_XDR_RPC_H 00019 00020 /*****************************************************************************/ 00021 00026 /*****************************************************************************/ 00027 00028 enum gi_rpcmsg_type 00029 { 00030 GI_RPCMSG_CALL = 0, 00031 GI_RPCMSG_REPLY = 1 00032 }; 00033 00034 enum gi_rpcmsg_rstat 00035 { 00036 GI_RPCMSG_REPLY_ACCEPTED = 0, 00037 GI_RPCMSG_REPLY_DENIED = 1 00038 }; 00039 00040 enum gi_rpcmsg_astat 00041 { 00042 GI_RPCMSG_ACCEPT_SUCCESS = 0, 00043 GI_RPCMSG_ACCEPT_PROG_UNAVAIL = 1, 00044 GI_RPCMSG_ACCEPT_PROG_MISMATCH = 2, 00045 GI_RPCMSG_ACCEPT_PROC_UNAVAIL = 3, 00046 GI_RPCMSG_ACCEPT_GARBAGE_ARGS = 4, 00047 GI_RPCMSG_ACCEPT_SYSTEM_ERR = 5 00048 }; 00049 00050 enum gi_rpcmsg_estat 00051 { 00052 GI_RPCMSG_REJECT_RPC_MISMATCH = 0, 00053 GI_RPCMSG_REJECT_AUTH_ERROR = 1 00054 }; 00055 00056 enum gi_rpcmsg_auth_flavor 00057 { 00058 GI_RPCMSG_AUTH_NONE = 0 00059 }; 00060 00061 struct gi_rpcmsg_oauth 00062 { 00063 enum gi_rpcmsg_auth_flavor flavor; 00064 void *body; 00065 }; 00066 00067 struct gi_rpcmsg_call 00068 { 00069 unsigned int rpcvers; 00070 unsigned int prog; 00071 unsigned int vers; 00072 unsigned int proc; 00073 00074 struct gi_rpcmsg_oauth cred; 00075 struct gi_rpcmsg_oauth verf; 00076 }; 00077 00078 struct gi_rpcmsg_acpt_reply 00079 { 00080 struct gi_rpcmsg_oauth verf; 00081 enum gi_rpcmsg_astat stat; 00082 00083 union 00084 { 00085 void *results; 00086 struct 00087 { 00088 unsigned int low; 00089 unsigned int high; 00090 } mismatch; 00091 } data; 00092 }; 00093 00094 struct gi_rpcmsg_rjct_reply 00095 { 00096 enum gi_rpcmsg_estat stat; 00097 00098 union 00099 { 00100 void *stat; 00101 struct 00102 { 00103 unsigned int low; 00104 unsigned int high; 00105 } mismatch; 00106 } data; 00107 }; 00108 00109 struct gi_rpcmsg_reply 00110 { 00111 enum gi_rpcmsg_rstat stat; 00112 00113 union 00114 { 00115 struct gi_rpcmsg_acpt_reply accept; 00116 struct gi_rpcmsg_rjct_reply reject; 00117 } reply; 00118 }; 00119 00120 struct gi_rpcmsg 00121 { 00122 unsigned int xid; 00123 enum gi_rpcmsg_type type; 00124 00125 union 00126 { 00127 struct gi_rpcmsg_call call; 00128 struct gi_rpcmsg_reply reply; 00129 } body; 00130 }; 00131 00132 /*****************************************************************************/ 00133 00138 struct gi_rpcrm 00139 { 00144 bool lastfrag; 00145 00151 uint32_t length; 00152 }; 00153 00154 /*****************************************************************************/ 00155 00156 EXTERN_C_BEGIN 00157 00158 /*****************************************************************************/ 00159 00168 LIBGIFT_EXPORT 00169 bool gi_xdr_rpcmsg (GiXdr *xdrs, struct gi_rpcmsg *msg, bool rm); 00170 00178 LIBGIFT_EXPORT 00179 bool gi_xdr_rpcrm (GiXdr *xdrs, struct gi_rpcrm *rm); 00180 00181 /*****************************************************************************/ 00182 00183 EXTERN_C_END 00184 00185 /*****************************************************************************/ 00186 00187 #endif /* __GI_XDR_RPC_H */

Generated on Sun Aug 22 07:56:40 2004 by doxygen 1.3.7