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 12 #ifdef __cplusplus 13 extern "C" { 14 #endif 15 16 /* 17 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 18 * unrestricted use provided that this legend is included on all tape 19 * media and as a part of the software program in whole or part. Users 20 * may copy or modify Sun RPC without charge, but are not authorized 21 * to license or distribute it to anyone else except as part of a product or 22 * program developed by the user. 23 * 24 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE 25 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR 26 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. 27 * 28 * Sun RPC is provided with no support and without any obligation on the 29 * part of Sun Microsystems, Inc. to assist in its use, correction, 30 * modification or enhancement. 31 * 32 * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE 33 * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC 34 * OR ANY PART THEREOF. 35 * 36 * In no event will Sun Microsystems, Inc. be liable for any lost revenue 37 * or profits or other special, indirect and consequential damages, even if 38 * Sun has been advised of the possibility of such damages. 39 * 40 * Sun Microsystems, Inc. 41 * 2550 Garcia Avenue 42 * Mountain View, California 94043 43 */ 44 #if 0 45 #pragma ident "@(#)key_prot.x 1.7 94/04/29 SMI" 46 #endif 47 48 /* Copyright (c) 1990, 1991 Sun Microsystems, Inc. */ 49 50 /* 51 * Compiled from key_prot.x using rpcgen. 52 * DO NOT EDIT THIS FILE! 53 * This is NOT source code! 54 */ 55 #define PROOT 3 56 #define HEXMODULUS "d4a0ba0250b6fd2ec626e7efd637df76c716e22d0944b88b" 57 #define HEXKEYBYTES 48 58 #define KEYSIZE 192 59 #define KEYBYTES 24 60 #define KEYCHECKSUMSIZE 16 61 62 enum keystatus { 63 KEY_SUCCESS = 0, 64 KEY_NOSECRET = 1, 65 KEY_UNKNOWN = 2, 66 KEY_SYSTEMERR = 3, 67 }; 68 typedef enum keystatus keystatus; 69 70 typedef char keybuf[HEXKEYBYTES]; 71 72 typedef char *netnamestr; 73 74 struct cryptkeyarg { 75 netnamestr remotename; 76 des_block deskey; 77 }; 78 typedef struct cryptkeyarg cryptkeyarg; 79 80 struct cryptkeyarg2 { 81 netnamestr remotename; 82 netobj remotekey; 83 des_block deskey; 84 }; 85 typedef struct cryptkeyarg2 cryptkeyarg2; 86 87 struct cryptkeyres { 88 keystatus status; 89 union { 90 des_block deskey; 91 } cryptkeyres_u; 92 }; 93 typedef struct cryptkeyres cryptkeyres; 94 #define MAXGIDS 16 95 96 struct unixcred { 97 u_int uid; 98 u_int gid; 99 struct { 100 u_int gids_len; 101 u_int *gids_val; 102 } gids; 103 }; 104 typedef struct unixcred unixcred; 105 106 struct getcredres { 107 keystatus status; 108 union { 109 unixcred cred; 110 } getcredres_u; 111 }; 112 typedef struct getcredres getcredres; 113 114 struct key_netstarg { 115 keybuf st_priv_key; 116 keybuf st_pub_key; 117 netnamestr st_netname; 118 }; 119 typedef struct key_netstarg key_netstarg; 120 121 struct key_netstres { 122 keystatus status; 123 union { 124 key_netstarg knet; 125 } key_netstres_u; 126 }; 127 typedef struct key_netstres key_netstres; 128 129 #ifndef opaque 130 #define opaque char 131 #endif 132 133 134 #define KEY_PROG 100029 135 #define KEY_VERS 1 136 137 #if defined(__STDC__) || defined(__cplusplus) 138 #define KEY_SET 1 139 extern keystatus * key_set_1(char *, CLIENT *); 140 extern keystatus * key_set_1_svc(char *, struct svc_req *); 141 #define KEY_ENCRYPT 2 142 extern cryptkeyres * key_encrypt_1(cryptkeyarg *, CLIENT *); 143 extern cryptkeyres * key_encrypt_1_svc(cryptkeyarg *, struct svc_req *); 144 #define KEY_DECRYPT 3 145 extern cryptkeyres * key_decrypt_1(cryptkeyarg *, CLIENT *); 146 extern cryptkeyres * key_decrypt_1_svc(cryptkeyarg *, struct svc_req *); 147 #define KEY_GEN 4 148 extern des_block * key_gen_1(void *, CLIENT *); 149 extern des_block * key_gen_1_svc(void *, struct svc_req *); 150 #define KEY_GETCRED 5 151 extern getcredres * key_getcred_1(netnamestr *, CLIENT *); 152 extern getcredres * key_getcred_1_svc(netnamestr *, struct svc_req *); 153 extern int key_prog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t); 154 155 #else /* K&R C */ 156 #define KEY_SET 1 157 extern keystatus * key_set_1(); 158 extern keystatus * key_set_1_svc(); 159 #define KEY_ENCRYPT 2 160 extern cryptkeyres * key_encrypt_1(); 161 extern cryptkeyres * key_encrypt_1_svc(); 162 #define KEY_DECRYPT 3 163 extern cryptkeyres * key_decrypt_1(); 164 extern cryptkeyres * key_decrypt_1_svc(); 165 #define KEY_GEN 4 166 extern des_block * key_gen_1(); 167 extern des_block * key_gen_1_svc(); 168 #define KEY_GETCRED 5 169 extern getcredres * key_getcred_1(); 170 extern getcredres * key_getcred_1_svc(); 171 extern int key_prog_1_freeresult (); 172 #endif /* K&R C */ 173 #define KEY_VERS2 2 174 175 #if defined(__STDC__) || defined(__cplusplus) 176 extern keystatus * key_set_2(char *, CLIENT *); 177 extern keystatus * key_set_2_svc(char *, struct svc_req *); 178 extern cryptkeyres * key_encrypt_2(cryptkeyarg *, CLIENT *); 179 extern cryptkeyres * key_encrypt_2_svc(cryptkeyarg *, struct svc_req *); 180 extern cryptkeyres * key_decrypt_2(cryptkeyarg *, CLIENT *); 181 extern cryptkeyres * key_decrypt_2_svc(cryptkeyarg *, struct svc_req *); 182 extern des_block * key_gen_2(void *, CLIENT *); 183 extern des_block * key_gen_2_svc(void *, struct svc_req *); 184 extern getcredres * key_getcred_2(netnamestr *, CLIENT *); 185 extern getcredres * key_getcred_2_svc(netnamestr *, struct svc_req *); 186 #define KEY_ENCRYPT_PK 6 187 extern cryptkeyres * key_encrypt_pk_2(cryptkeyarg2 *, CLIENT *); 188 extern cryptkeyres * key_encrypt_pk_2_svc(cryptkeyarg2 *, struct svc_req *); 189 #define KEY_DECRYPT_PK 7 190 extern cryptkeyres * key_decrypt_pk_2(cryptkeyarg2 *, CLIENT *); 191 extern cryptkeyres * key_decrypt_pk_2_svc(cryptkeyarg2 *, struct svc_req *); 192 #define KEY_NET_PUT 8 193 extern keystatus * key_net_put_2(key_netstarg *, CLIENT *); 194 extern keystatus * key_net_put_2_svc(key_netstarg *, struct svc_req *); 195 #define KEY_NET_GET 9 196 extern key_netstres * key_net_get_2(void *, CLIENT *); 197 extern key_netstres * key_net_get_2_svc(void *, struct svc_req *); 198 #define KEY_GET_CONV 10 199 extern cryptkeyres * key_get_conv_2(char *, CLIENT *); 200 extern cryptkeyres * key_get_conv_2_svc(char *, struct svc_req *); 201 extern int key_prog_2_freeresult (SVCXPRT *, xdrproc_t, caddr_t); 202 203 #else /* K&R C */ 204 extern keystatus * key_set_2(); 205 extern keystatus * key_set_2_svc(); 206 extern cryptkeyres * key_encrypt_2(); 207 extern cryptkeyres * key_encrypt_2_svc(); 208 extern cryptkeyres * key_decrypt_2(); 209 extern cryptkeyres * key_decrypt_2_svc(); 210 extern des_block * key_gen_2(); 211 extern des_block * key_gen_2_svc(); 212 extern getcredres * key_getcred_2(); 213 extern getcredres * key_getcred_2_svc(); 214 #define KEY_ENCRYPT_PK 6 215 extern cryptkeyres * key_encrypt_pk_2(); 216 extern cryptkeyres * key_encrypt_pk_2_svc(); 217 #define KEY_DECRYPT_PK 7 218 extern cryptkeyres * key_decrypt_pk_2(); 219 extern cryptkeyres * key_decrypt_pk_2_svc(); 220 #define KEY_NET_PUT 8 221 extern keystatus * key_net_put_2(); 222 extern keystatus * key_net_put_2_svc(); 223 #define KEY_NET_GET 9 224 extern key_netstres * key_net_get_2(); 225 extern key_netstres * key_net_get_2_svc(); 226 #define KEY_GET_CONV 10 227 extern cryptkeyres * key_get_conv_2(); 228 extern cryptkeyres * key_get_conv_2_svc(); 229 extern int key_prog_2_freeresult (); 230 #endif /* K&R C */ 231 232 /* the xdr functions */ 233 234 #if defined(__STDC__) || defined(__cplusplus) 235 extern bool_t xdr_keystatus (XDR *, keystatus*); 236 extern bool_t xdr_keybuf (XDR *, keybuf); 237 extern bool_t xdr_netnamestr (XDR *, netnamestr*); 238 extern bool_t xdr_cryptkeyarg (XDR *, cryptkeyarg*); 239 extern bool_t xdr_cryptkeyarg2 (XDR *, cryptkeyarg2*); 240 extern bool_t xdr_cryptkeyres (XDR *, cryptkeyres*); 241 extern bool_t xdr_unixcred (XDR *, unixcred*); 242 extern bool_t xdr_getcredres (XDR *, getcredres*); 243 extern bool_t xdr_key_netstarg (XDR *, key_netstarg*); 244 extern bool_t xdr_key_netstres (XDR *, key_netstres*); 245 246 #else /* K&R C */ 247 extern bool_t xdr_keystatus (); 248 extern bool_t xdr_keybuf (); 249 extern bool_t xdr_netnamestr (); 250 extern bool_t xdr_cryptkeyarg (); 251 extern bool_t xdr_cryptkeyarg2 (); 252 extern bool_t xdr_cryptkeyres (); 253 extern bool_t xdr_unixcred (); 254 extern bool_t xdr_getcredres (); 255 extern bool_t xdr_key_netstarg (); 256 extern bool_t xdr_key_netstres (); 257 258 #endif /* K&R C */ 259 260 #ifdef __cplusplus 261 } 262 #endif 263 264 #endif /* !_KEY_PROT_H_RPCGEN */ 265