| 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 | #ifdef __cplusplus |
| 12 | extern "C" { |
| 13 | #endif |
| 14 | |
| 15 | /*- |
| 16 | * Copyright (c) 2010, Oracle America, Inc. |
| 17 | * |
| 18 | * Redistribution and use in source and binary forms, with or without |
| 19 | * modification, are permitted provided that the following conditions are |
| 20 | * met: |
| 21 | * |
| 22 | * * Redistributions of source code must retain the above copyright |
| 23 | * notice, this list of conditions and the following disclaimer. |
| 24 | * * Redistributions in binary form must reproduce the above |
| 25 | * copyright notice, this list of conditions and the following |
| 26 | * disclaimer in the documentation and/or other materials |
| 27 | * provided with the distribution. |
| 28 | * * Neither the name of the "Oracle America, Inc." nor the names of its |
| 29 | * contributors may be used to endorse or promote products derived |
| 30 | * from this software without specific prior written permission. |
| 31 | * |
| 32 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 33 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 34 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
| 35 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
| 36 | * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, |
| 37 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 38 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE |
| 39 | * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 40 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| 41 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
| 42 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 43 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 44 | */ |
| 45 | /* |
| 46 | * Compiled from key_prot.x using rpcgen. |
| 47 | * DO NOT EDIT THIS FILE! |
| 48 | * This is NOT source code! |
| 49 | */ |
| 50 | #define	PROOT 3 |
| 51 | #define	HEXMODULUS "d4a0ba0250b6fd2ec626e7efd637df76c716e22d0944b88b" |
| 52 | #define	HEXKEYBYTES 48 |
| 53 | #define	KEYSIZE 192 |
| 54 | #define	KEYBYTES 24 |
| 55 | #define	KEYCHECKSUMSIZE 16 |
| 56 | |
| 57 | enum keystatus { |
| 58 | 	KEY_SUCCESS = 0, |
| 59 | 	KEY_NOSECRET = 1, |
| 60 | 	KEY_UNKNOWN = 2, |
| 61 | 	KEY_SYSTEMERR = 3 |
| 62 | }; |
| 63 | typedef enum keystatus keystatus; |
| 64 | |
| 65 | typedef char keybuf[HEXKEYBYTES]; |
| 66 | |
| 67 | typedef char *netnamestr; |
| 68 | |
| 69 | struct cryptkeyarg { |
| 70 | 	netnamestr remotename; |
| 71 | 	des_block deskey; |
| 72 | }; |
| 73 | typedef struct cryptkeyarg cryptkeyarg; |
| 74 | |
| 75 | struct cryptkeyarg2 { |
| 76 | 	netnamestr remotename; |
| 77 | 	netobj remotekey; |
| 78 | 	des_block deskey; |
| 79 | }; |
| 80 | typedef struct cryptkeyarg2 cryptkeyarg2; |
| 81 | |
| 82 | struct cryptkeyres { |
| 83 | 	keystatus status; |
| 84 | 	union { |
| 85 | 		des_block deskey; |
| 86 | 	} cryptkeyres_u; |
| 87 | }; |
| 88 | typedef struct cryptkeyres cryptkeyres; |
| 89 | #define	MAXGIDS 16 |
| 90 | |
| 91 | struct unixcred { |
| 92 | 	u_int uid; |
| 93 | 	u_int gid; |
| 94 | 	struct { |
| 95 | 		u_int gids_len; |
| 96 | 		u_int *gids_val; |
| 97 | 	} gids; |
| 98 | }; |
| 99 | typedef struct unixcred unixcred; |
| 100 | |
| 101 | struct getcredres { |
| 102 | 	keystatus status; |
| 103 | 	union { |
| 104 | 		unixcred cred; |
| 105 | 	} getcredres_u; |
| 106 | }; |
| 107 | typedef struct getcredres getcredres; |
| 108 | |
| 109 | struct key_netstarg { |
| 110 | 	keybuf st_priv_key; |
| 111 | 	keybuf st_pub_key; |
| 112 | 	netnamestr st_netname; |
| 113 | }; |
| 114 | typedef struct key_netstarg key_netstarg; |
| 115 | |
| 116 | struct key_netstres { |
| 117 | 	keystatus status; |
| 118 | 	union { |
| 119 | 		key_netstarg knet; |
| 120 | 	} key_netstres_u; |
| 121 | }; |
| 122 | typedef struct key_netstres key_netstres; |
| 123 | |
| 124 | #ifndef opaque |
| 125 | #define opaque char |
| 126 | #endif |
| 127 | |
| 128 | |
| 129 | #define	KEY_PROG ((unsigned long)(100029)) |
| 130 | #define	KEY_VERS ((unsigned long)(1)) |
| 131 | |
| 132 | extern void key_prog_1(struct svc_req *rqstp, SVCXPRT *transp); |
| 133 | #define	KEY_SET ((unsigned long)(1)) |
| 134 | extern keystatus * key_set_1(char *, CLIENT *); |
| 135 | extern keystatus * key_set_1_svc(char *, struct svc_req *); |
| 136 | #define	KEY_ENCRYPT ((unsigned long)(2)) |
| 137 | extern cryptkeyres * key_encrypt_1(cryptkeyarg *, CLIENT *); |
| 138 | extern cryptkeyres * key_encrypt_1_svc(cryptkeyarg *, struct svc_req *); |
| 139 | #define	KEY_DECRYPT ((unsigned long)(3)) |
| 140 | extern cryptkeyres * key_decrypt_1(cryptkeyarg *, CLIENT *); |
| 141 | extern cryptkeyres * key_decrypt_1_svc(cryptkeyarg *, struct svc_req *); |
| 142 | #define	KEY_GEN ((unsigned long)(4)) |
| 143 | extern des_block * key_gen_1(void *, CLIENT *); |
| 144 | extern des_block * key_gen_1_svc(void *, struct svc_req *); |
| 145 | #define	KEY_GETCRED ((unsigned long)(5)) |
| 146 | extern getcredres * key_getcred_1(netnamestr *, CLIENT *); |
| 147 | extern getcredres * key_getcred_1_svc(netnamestr *, struct svc_req *); |
| 148 | extern int key_prog_1_freeresult(SVCXPRT *, xdrproc_t, caddr_t); |
| 149 | #define	KEY_VERS2 ((unsigned long)(2)) |
| 150 | |
| 151 | extern void key_prog_2(struct svc_req *rqstp, SVCXPRT *transp); |
| 152 | extern keystatus * key_set_2(char *, CLIENT *); |
| 153 | extern keystatus * key_set_2_svc(char *, struct svc_req *); |
| 154 | extern cryptkeyres * key_encrypt_2(cryptkeyarg *, CLIENT *); |
| 155 | extern cryptkeyres * key_encrypt_2_svc(cryptkeyarg *, struct svc_req *); |
| 156 | extern cryptkeyres * key_decrypt_2(cryptkeyarg *, CLIENT *); |
| 157 | extern cryptkeyres * key_decrypt_2_svc(cryptkeyarg *, struct svc_req *); |
| 158 | extern des_block * key_gen_2(void *, CLIENT *); |
| 159 | extern des_block * key_gen_2_svc(void *, struct svc_req *); |
| 160 | extern getcredres * key_getcred_2(netnamestr *, CLIENT *); |
| 161 | extern getcredres * key_getcred_2_svc(netnamestr *, struct svc_req *); |
| 162 | #define	KEY_ENCRYPT_PK ((unsigned long)(6)) |
| 163 | extern cryptkeyres * key_encrypt_pk_2(cryptkeyarg2 *, CLIENT *); |
| 164 | extern cryptkeyres * key_encrypt_pk_2_svc(cryptkeyarg2 *, struct svc_req *); |
| 165 | #define	KEY_DECRYPT_PK ((unsigned long)(7)) |
| 166 | extern cryptkeyres * key_decrypt_pk_2(cryptkeyarg2 *, CLIENT *); |
| 167 | extern cryptkeyres * key_decrypt_pk_2_svc(cryptkeyarg2 *, struct svc_req *); |
| 168 | #define	KEY_NET_PUT ((unsigned long)(8)) |
| 169 | extern keystatus * key_net_put_2(key_netstarg *, CLIENT *); |
| 170 | extern keystatus * key_net_put_2_svc(key_netstarg *, struct svc_req *); |
| 171 | #define	KEY_NET_GET ((unsigned long)(9)) |
| 172 | extern key_netstres * key_net_get_2(void *, CLIENT *); |
| 173 | extern key_netstres * key_net_get_2_svc(void *, struct svc_req *); |
| 174 | #define	KEY_GET_CONV ((unsigned long)(10)) |
| 175 | extern cryptkeyres * key_get_conv_2(char *, CLIENT *); |
| 176 | extern cryptkeyres * key_get_conv_2_svc(char *, struct svc_req *); |
| 177 | extern int key_prog_2_freeresult(SVCXPRT *, xdrproc_t, caddr_t); |
| 178 | |
| 179 | /* the xdr functions */ |
| 180 | extern bool_t xdr_keystatus(XDR *, keystatus*); |
| 181 | extern bool_t xdr_keybuf(XDR *, keybuf); |
| 182 | extern bool_t xdr_netnamestr(XDR *, netnamestr*); |
| 183 | extern bool_t xdr_cryptkeyarg(XDR *, cryptkeyarg*); |
| 184 | extern bool_t xdr_cryptkeyarg2(XDR *, cryptkeyarg2*); |
| 185 | extern bool_t xdr_cryptkeyres(XDR *, cryptkeyres*); |
| 186 | extern bool_t xdr_unixcred(XDR *, unixcred*); |
| 187 | extern bool_t xdr_getcredres(XDR *, getcredres*); |
| 188 | extern bool_t xdr_key_netstarg(XDR *, key_netstarg*); |
| 189 | extern bool_t xdr_key_netstres(XDR *, key_netstres*); |
| 190 | |
| 191 | #ifdef __cplusplus |
| 192 | } |
| 193 | #endif |
| 194 | |
| 195 | #endif /* !_KEY_PROT_H_RPCGEN */ |