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