8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / lib / libbc / inc / include / rpc / auth_des.h
bloba580e7328adac818aa143accf07293b9ccd2f157
1 /*
2 * CDDL HEADER START
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.
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.
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]
20 * CDDL HEADER END
22 #pragma ident "%Z%%M% %I% %E% SMI"
25 * %M%, Protocol for DES style authentication for RPC
27 * Copyright (C) 1986, Sun Microsystems, Inc.
30 #ifndef _rpc_auth_des_h
31 #define _rpc_auth_des_h
34 * There are two kinds of "names": fullnames and nicknames
36 enum authdes_namekind {
37 ADN_FULLNAME,
38 ADN_NICKNAME
42 * A fullname contains the network name of the client,
43 * a conversation key and the window
45 struct authdes_fullname {
46 char *name; /* network name of client, up to MAXNETNAMELEN */
47 des_block key; /* conversation key */
48 u_long window; /* associated window */
53 * A credential
55 struct authdes_cred {
56 enum authdes_namekind adc_namekind;
57 struct authdes_fullname adc_fullname;
58 u_long adc_nickname;
64 * A des authentication verifier
66 struct authdes_verf {
67 union {
68 struct timeval adv_ctime; /* clear time */
69 des_block adv_xtime; /* crypt time */
70 } adv_time_u;
71 u_long adv_int_u;
75 * des authentication verifier: client variety
77 * adv_timestamp is the current time.
78 * adv_winverf is the credential window + 1.
79 * Both are encrypted using the conversation key.
81 #define adv_timestamp adv_time_u.adv_ctime
82 #define adv_xtimestamp adv_time_u.adv_xtime
83 #define adv_winverf adv_int_u
86 * des authentication verifier: server variety
88 * adv_timeverf is the client's timestamp + client's window
89 * adv_nickname is the server's nickname for the client.
90 * adv_timeverf is encrypted using the conversation key.
92 #define adv_timeverf adv_time_u.adv_ctime
93 #define adv_xtimeverf adv_time_u.adv_xtime
94 #define adv_nickname adv_int_u
96 #endif /*!_rpc_auth_des_h*/