1 /* 2 * Please do not edit this file. 3 * It was generated using rpcgen. 4 */ 5 6 #ifndef _KEY_PROT_H_RPCGEN 7 #define _KEY_PROT_H_RPCGEN 8 9 #include <rpc/rpc.h> 10 11 /* Copyright (c) 2010, Oracle America, Inc. 12 * 13 * Redistribution and use in source and binary forms, with or without 14 * modification, are permitted provided that the following conditions are 15 * met: 16 * 17 * * Redistributions of source code must retain the above copyright 18 * notice, this list of conditions and the following disclaimer. 19 * * Redistributions in binary form must reproduce the above 20 * copyright notice, this list of conditions and the following 21 * disclaimer in the documentation and/or other materials 22 * provided with the distribution. 23 * * Neither the name of the "Oracle America, Inc." nor the names of its 24 * contributors may be used to endorse or promote products derived 25 * from this software without specific prior written permission. 26 * 27 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 28 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 29 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 30 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 31 * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 32 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 34 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 35 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 36 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 37 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 38 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 */ 40 41 /* 42 * Compiled from key_prot.x using rpcgen. 43 * DO NOT EDIT THIS FILE! 44 * This is NOT source code! 45 */ 46 #define PROOT 3 47 #define HEXMODULUS "d4a0ba0250b6fd2ec626e7efd637df76c716e22d0944b88b" 48 #define HEXKEYBYTES 48 49 #define KEYSIZE 192 50 #define KEYBYTES 24 51 #define KEYCHECKSUMSIZE 16 52 53 enum keystatus { 54 KEY_SUCCESS = 0, 55 KEY_NOSECRET = 1, 56 KEY_UNKNOWN = 2, 57 KEY_SYSTEMERR = 3, 58 }; 59 typedef enum keystatus keystatus; 60 #ifdef __cplusplus 61 extern "C" bool_t xdr_keystatus(XDR *, keystatus*); 62 #elif __STDC__ 63 extern bool_t xdr_keystatus(XDR *, keystatus*); 64 #else /* Old Style C */ 65 bool_t xdr_keystatus(); 66 #endif /* Old Style C */ 67 68 69 typedef char keybuf[HEXKEYBYTES]; 70 #ifdef __cplusplus 71 extern "C" bool_t xdr_keybuf(XDR *, keybuf); 72 #elif __STDC__ 73 extern bool_t xdr_keybuf(XDR *, keybuf); 74 #else /* Old Style C */ 75 bool_t xdr_keybuf(); 76 #endif /* Old Style C */ 77 78 79 typedef char *netnamestr; 80 #ifdef __cplusplus 81 extern "C" bool_t xdr_netnamestr(XDR *, netnamestr*); 82 #elif __STDC__ 83 extern bool_t xdr_netnamestr(XDR *, netnamestr*); 84 #else /* Old Style C */ 85 bool_t xdr_netnamestr(); 86 #endif /* Old Style C */ 87 88 89 struct cryptkeyarg { 90 netnamestr remotename; 91 des_block deskey; 92 }; 93 typedef struct cryptkeyarg cryptkeyarg; 94 #ifdef __cplusplus 95 extern "C" bool_t xdr_cryptkeyarg(XDR *, cryptkeyarg*); 96 #elif __STDC__ 97 extern bool_t xdr_cryptkeyarg(XDR *, cryptkeyarg*); 98 #else /* Old Style C */ 99 bool_t xdr_cryptkeyarg(); 100 #endif /* Old Style C */ 101 102 103 struct cryptkeyarg2 { 104 netnamestr remotename; 105 netobj remotekey; 106 des_block deskey; 107 }; 108 typedef struct cryptkeyarg2 cryptkeyarg2; 109 #ifdef __cplusplus 110 extern "C" bool_t xdr_cryptkeyarg2(XDR *, cryptkeyarg2*); 111 #elif __STDC__ 112 extern bool_t xdr_cryptkeyarg2(XDR *, cryptkeyarg2*); 113 #else /* Old Style C */ 114 bool_t xdr_cryptkeyarg2(); 115 #endif /* Old Style C */ 116 117 118 struct cryptkeyres { 119 keystatus status; 120 union { 121 des_block deskey; 122 } cryptkeyres_u; 123 }; 124 typedef struct cryptkeyres cryptkeyres; 125 #ifdef __cplusplus 126 extern "C" bool_t xdr_cryptkeyres(XDR *, cryptkeyres*); 127 #elif __STDC__ 128 extern bool_t xdr_cryptkeyres(XDR *, cryptkeyres*); 129 #else /* Old Style C */ 130 bool_t xdr_cryptkeyres(); 131 #endif /* Old Style C */ 132 133 #define MAXGIDS 16 134 135 struct unixcred { 136 u_int uid; 137 u_int gid; 138 struct { 139 u_int gids_len; 140 u_int *gids_val; 141 } gids; 142 }; 143 typedef struct unixcred unixcred; 144 #ifdef __cplusplus 145 extern "C" bool_t xdr_unixcred(XDR *, unixcred*); 146 #elif __STDC__ 147 extern bool_t xdr_unixcred(XDR *, unixcred*); 148 #else /* Old Style C */ 149 bool_t xdr_unixcred(); 150 #endif /* Old Style C */ 151 152 153 struct getcredres { 154 keystatus status; 155 union { 156 unixcred cred; 157 } getcredres_u; 158 }; 159 typedef struct getcredres getcredres; 160 #ifdef __cplusplus 161 extern "C" bool_t xdr_getcredres(XDR *, getcredres*); 162 #elif __STDC__ 163 extern bool_t xdr_getcredres(XDR *, getcredres*); 164 #else /* Old Style C */ 165 bool_t xdr_getcredres(); 166 #endif /* Old Style C */ 167 168 169 struct key_netstarg { 170 keybuf st_priv_key; 171 keybuf st_pub_key; 172 netnamestr st_netname; 173 }; 174 typedef struct key_netstarg key_netstarg; 175 #ifdef __cplusplus 176 extern "C" bool_t xdr_key_netstarg(XDR *, key_netstarg*); 177 #elif __STDC__ 178 extern bool_t xdr_key_netstarg(XDR *, key_netstarg*); 179 #else /* Old Style C */ 180 bool_t xdr_key_netstarg(); 181 #endif /* Old Style C */ 182 183 184 struct key_netstres { 185 keystatus status; 186 union { 187 key_netstarg knet; 188 } key_netstres_u; 189 }; 190 typedef struct key_netstres key_netstres; 191 #ifdef __cplusplus 192 extern "C" bool_t xdr_key_netstres(XDR *, key_netstres*); 193 #elif __STDC__ 194 extern bool_t xdr_key_netstres(XDR *, key_netstres*); 195 #else /* Old Style C */ 196 bool_t xdr_key_netstres(); 197 #endif /* Old Style C */ 198 199 200 #ifndef opaque 201 #define opaque char 202 #endif 203 204 205 #define KEY_PROG ((u_long)100029) 206 #define KEY_VERS ((u_long)1) 207 208 #ifdef __cplusplus 209 #define KEY_SET ((u_long)1) 210 extern "C" keystatus * key_set_1(opaque *, CLIENT *); 211 extern "C" keystatus * key_set_1_svc(opaque *, struct svc_req *); 212 #define KEY_ENCRYPT ((u_long)2) 213 extern "C" cryptkeyres * key_encrypt_1(cryptkeyarg *, CLIENT *); 214 extern "C" cryptkeyres * key_encrypt_1_svc(cryptkeyarg *, struct svc_req *); 215 #define KEY_DECRYPT ((u_long)3) 216 extern "C" cryptkeyres * key_decrypt_1(cryptkeyarg *, CLIENT *); 217 extern "C" cryptkeyres * key_decrypt_1_svc(cryptkeyarg *, struct svc_req *); 218 #define KEY_GEN ((u_long)4) 219 extern "C" des_block * key_gen_1(void *, CLIENT *); 220 extern "C" des_block * key_gen_1_svc(void *, struct svc_req *); 221 #define KEY_GETCRED ((u_long)5) 222 extern "C" getcredres * key_getcred_1(netnamestr *, CLIENT *); 223 extern "C" getcredres * key_getcred_1_svc(netnamestr *, struct svc_req *); 224 225 #elif __STDC__ 226 #define KEY_SET ((u_long)1) 227 extern keystatus * key_set_1(opaque *, CLIENT *); 228 extern keystatus * key_set_1_svc(opaque *, struct svc_req *); 229 #define KEY_ENCRYPT ((u_long)2) 230 extern cryptkeyres * key_encrypt_1(cryptkeyarg *, CLIENT *); 231 extern cryptkeyres * key_encrypt_1_svc(cryptkeyarg *, struct svc_req *); 232 #define KEY_DECRYPT ((u_long)3) 233 extern cryptkeyres * key_decrypt_1(cryptkeyarg *, CLIENT *); 234 extern cryptkeyres * key_decrypt_1_svc(cryptkeyarg *, struct svc_req *); 235 #define KEY_GEN ((u_long)4) 236 extern des_block * key_gen_1(void *, CLIENT *); 237 extern des_block * key_gen_1_svc(void *, struct svc_req *); 238 #define KEY_GETCRED ((u_long)5) 239 extern getcredres * key_getcred_1(netnamestr *, CLIENT *); 240 extern getcredres * key_getcred_1_svc(netnamestr *, struct svc_req *); 241 242 #else /* Old Style C */ 243 #define KEY_SET ((u_long)1) 244 extern keystatus * key_set_1(); 245 extern keystatus * key_set_1_svc(); 246 #define KEY_ENCRYPT ((u_long)2) 247 extern cryptkeyres * key_encrypt_1(); 248 extern cryptkeyres * key_encrypt_1_svc(); 249 #define KEY_DECRYPT ((u_long)3) 250 extern cryptkeyres * key_decrypt_1(); 251 extern cryptkeyres * key_decrypt_1_svc(); 252 #define KEY_GEN ((u_long)4) 253 extern des_block * key_gen_1(); 254 extern des_block * key_gen_1_svc(); 255 #define KEY_GETCRED ((u_long)5) 256 extern getcredres * key_getcred_1(); 257 extern getcredres * key_getcred_1_svc(); 258 #endif /* Old Style C */ 259 #define KEY_VERS2 ((u_long)2) 260 261 #ifdef __cplusplus 262 extern "C" keystatus * key_set_2(opaque *, CLIENT *); 263 extern "C" keystatus * key_set_2_svc(opaque *, struct svc_req *); 264 extern "C" cryptkeyres * key_encrypt_2(cryptkeyarg *, CLIENT *); 265 extern "C" cryptkeyres * key_encrypt_2_svc(cryptkeyarg *, struct svc_req *); 266 extern "C" cryptkeyres * key_decrypt_2(cryptkeyarg *, CLIENT *); 267 extern "C" cryptkeyres * key_decrypt_2_svc(cryptkeyarg *, struct svc_req *); 268 extern "C" des_block * key_gen_2(void *, CLIENT *); 269 extern "C" des_block * key_gen_2_svc(void *, struct svc_req *); 270 extern "C" getcredres * key_getcred_2(netnamestr *, CLIENT *); 271 extern "C" getcredres * key_getcred_2_svc(netnamestr *, struct svc_req *); 272 #define KEY_ENCRYPT_PK ((u_long)6) 273 extern "C" cryptkeyres * key_encrypt_pk_2(cryptkeyarg2 *, CLIENT *); 274 extern "C" cryptkeyres * key_encrypt_pk_2_svc(cryptkeyarg2 *, struct svc_req *); 275 #define KEY_DECRYPT_PK ((u_long)7) 276 extern "C" cryptkeyres * key_decrypt_pk_2(cryptkeyarg2 *, CLIENT *); 277 extern "C" cryptkeyres * key_decrypt_pk_2_svc(cryptkeyarg2 *, struct svc_req *); 278 #define KEY_NET_PUT ((u_long)8) 279 extern "C" keystatus * key_net_put_2(key_netstarg *, CLIENT *); 280 extern "C" keystatus * key_net_put_2_svc(key_netstarg *, struct svc_req *); 281 #define KEY_NET_GET ((u_long)9) 282 extern "C" key_netstres * key_net_get_2(void *, CLIENT *); 283 extern "C" key_netstres * key_net_get_2_svc(void *, struct svc_req *); 284 #define KEY_GET_CONV ((u_long)10) 285 extern "C" cryptkeyres * key_get_conv_2(opaque *, CLIENT *); 286 extern "C" cryptkeyres * key_get_conv_2_svc(opaque *, struct svc_req *); 287 288 #elif __STDC__ 289 extern keystatus * key_set_2(opaque *, CLIENT *); 290 extern keystatus * key_set_2_svc(opaque *, struct svc_req *); 291 extern cryptkeyres * key_encrypt_2(cryptkeyarg *, CLIENT *); 292 extern cryptkeyres * key_encrypt_2_svc(cryptkeyarg *, struct svc_req *); 293 extern cryptkeyres * key_decrypt_2(cryptkeyarg *, CLIENT *); 294 extern cryptkeyres * key_decrypt_2_svc(cryptkeyarg *, struct svc_req *); 295 extern des_block * key_gen_2(void *, CLIENT *); 296 extern des_block * key_gen_2_svc(void *, struct svc_req *); 297 extern getcredres * key_getcred_2(netnamestr *, CLIENT *); 298 extern getcredres * key_getcred_2_svc(netnamestr *, struct svc_req *); 299 #define KEY_ENCRYPT_PK ((u_long)6) 300 extern cryptkeyres * key_encrypt_pk_2(cryptkeyarg2 *, CLIENT *); 301 extern cryptkeyres * key_encrypt_pk_2_svc(cryptkeyarg2 *, struct svc_req *); 302 #define KEY_DECRYPT_PK ((u_long)7) 303 extern cryptkeyres * key_decrypt_pk_2(cryptkeyarg2 *, CLIENT *); 304 extern cryptkeyres * key_decrypt_pk_2_svc(cryptkeyarg2 *, struct svc_req *); 305 #define KEY_NET_PUT ((u_long)8) 306 extern keystatus * key_net_put_2(key_netstarg *, CLIENT *); 307 extern keystatus * key_net_put_2_svc(key_netstarg *, struct svc_req *); 308 #define KEY_NET_GET ((u_long)9) 309 extern key_netstres * key_net_get_2(void *, CLIENT *); 310 extern key_netstres * key_net_get_2_svc(void *, struct svc_req *); 311 #define KEY_GET_CONV ((u_long)10) 312 extern cryptkeyres * key_get_conv_2(opaque *, CLIENT *); 313 extern cryptkeyres * key_get_conv_2_svc(opaque *, struct svc_req *); 314 315 #else /* Old Style C */ 316 extern keystatus * key_set_2(); 317 extern keystatus * key_set_2_svc(); 318 extern cryptkeyres * key_encrypt_2(); 319 extern cryptkeyres * key_encrypt_2_svc(); 320 extern cryptkeyres * key_decrypt_2(); 321 extern cryptkeyres * key_decrypt_2_svc(); 322 extern des_block * key_gen_2(); 323 extern des_block * key_gen_2_svc(); 324 extern getcredres * key_getcred_2(); 325 extern getcredres * key_getcred_2_svc(); 326 #define KEY_ENCRYPT_PK ((u_long)6) 327 extern cryptkeyres * key_encrypt_pk_2(); 328 extern cryptkeyres * key_encrypt_pk_2_svc(); 329 #define KEY_DECRYPT_PK ((u_long)7) 330 extern cryptkeyres * key_decrypt_pk_2(); 331 extern cryptkeyres * key_decrypt_pk_2_svc(); 332 #define KEY_NET_PUT ((u_long)8) 333 extern keystatus * key_net_put_2(); 334 extern keystatus * key_net_put_2_svc(); 335 #define KEY_NET_GET ((u_long)9) 336 extern key_netstres * key_net_get_2(); 337 extern key_netstres * key_net_get_2_svc(); 338 #define KEY_GET_CONV ((u_long)10) 339 extern cryptkeyres * key_get_conv_2(); 340 extern cryptkeyres * key_get_conv_2_svc(); 341 #endif /* Old Style C */ 342 343 #endif /* !_KEY_PROT_H_RPCGEN */ 344