xref: /titanic_41/usr/src/lib/libbc/inc/include/rpc/key_prot.h (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 1988 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #pragma ident	"%Z%%M%	%I%	%E% SMI"
28 
29 /*
30  * Compiled from key_prot.x using rpcgen.
31  * DO NOT EDIT THIS FILE!
32  * This is NOT source code!
33  */
34 
35 #ifndef _rpc_key_prot_h
36 #define	_rpc_key_prot_h
37 
38 #define	KEY_PROG 100029
39 #define	KEY_VERS 1
40 #define	KEY_SET 1
41 #define	KEY_ENCRYPT 2
42 #define	KEY_DECRYPT 3
43 #define	KEY_GEN 4
44 #define	KEY_GETCRED 5
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 bool_t xdr_keystatus();
61 
62 #ifndef KERNEL
63 
64 typedef char keybuf[HEXKEYBYTES];
65 bool_t xdr_keybuf();
66 
67 #endif
68 
69 typedef char *netnamestr;
70 bool_t xdr_netnamestr();
71 
72 
73 struct cryptkeyarg {
74 	netnamestr remotename;
75 	des_block deskey;
76 };
77 typedef struct cryptkeyarg cryptkeyarg;
78 bool_t xdr_cryptkeyarg();
79 
80 
81 struct cryptkeyres {
82 	keystatus status;
83 	union {
84 		des_block deskey;
85 	} cryptkeyres_u;
86 };
87 typedef struct cryptkeyres cryptkeyres;
88 bool_t xdr_cryptkeyres();
89 
90 #define	MAXGIDS 16
91 
92 struct unixcred {
93 	u_int uid;
94 	u_int gid;
95 	struct {
96 		u_int gids_len;
97 		u_int *gids_val;
98 	} gids;
99 };
100 typedef struct unixcred unixcred;
101 bool_t xdr_unixcred();
102 
103 
104 struct getcredres {
105 	keystatus status;
106 	union {
107 		unixcred cred;
108 	} getcredres_u;
109 };
110 typedef struct getcredres getcredres;
111 bool_t xdr_getcredres();
112 
113 #endif /*!_rpc_key_prot_h*/
114