|
||||
File indexing completed on 2025-01-18 10:13:01
0001 /* @(#)auth_des.h 2.2 88/07/29 4.0 RPCSRC; from 1.3 88/02/08 SMI */ 0002 /* $FreeBSD: src/include/rpc/auth_des.h,v 1.3 2002/03/23 17:24:55 imp Exp $ */ 0003 /* 0004 * Copyright (c) 2009, Sun Microsystems, Inc. 0005 * All rights reserved. 0006 * 0007 * Redistribution and use in source and binary forms, with or without 0008 * modification, are permitted provided that the following conditions are met: 0009 * - Redistributions of source code must retain the above copyright notice, 0010 * this list of conditions and the following disclaimer. 0011 * - Redistributions in binary form must reproduce the above copyright notice, 0012 * this list of conditions and the following disclaimer in the documentation 0013 * and/or other materials provided with the distribution. 0014 * - Neither the name of Sun Microsystems, Inc. nor the names of its 0015 * contributors may be used to endorse or promote products derived 0016 * from this software without specific prior written permission. 0017 * 0018 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 0019 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 0020 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 0021 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 0022 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 0023 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 0024 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 0025 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 0026 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 0027 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 0028 * POSSIBILITY OF SUCH DAMAGE. 0029 * 0030 * from: @(#)auth_des.h 2.2 88/07/29 4.0 RPCSRC 0031 * from: @(#)auth_des.h 1.14 94/04/25 SMI 0032 */ 0033 0034 /* 0035 * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. 0036 */ 0037 0038 /* 0039 * auth_des.h, Protocol for DES style authentication for RPC 0040 */ 0041 0042 #ifndef _TI_AUTH_DES_ 0043 #define _TI_AUTH_DES_ 0044 0045 #include <rpc/auth.h> 0046 0047 /* 0048 * There are two kinds of "names": fullnames and nicknames 0049 */ 0050 enum authdes_namekind { 0051 ADN_FULLNAME, 0052 ADN_NICKNAME 0053 }; 0054 0055 /* 0056 * A fullname contains the network name of the client, 0057 * a conversation key and the window 0058 */ 0059 struct authdes_fullname { 0060 char *name; /* network name of client, up to MAXNETNAMELEN */ 0061 union des_block key; /* conversation key */ 0062 /* u_long window; */ 0063 u_int32_t window; /* associated window */ 0064 }; 0065 0066 0067 /* 0068 * A credential 0069 */ 0070 struct authdes_cred { 0071 enum authdes_namekind adc_namekind; 0072 struct authdes_fullname adc_fullname; 0073 /*u_long adc_nickname;*/ 0074 u_int32_t adc_nickname; 0075 }; 0076 0077 0078 0079 /* 0080 * A des authentication verifier 0081 */ 0082 struct authdes_verf { 0083 union { 0084 struct timeval adv_ctime; /* clear time */ 0085 des_block adv_xtime; /* crypt time */ 0086 } adv_time_u; 0087 /*u_long adv_int_u;*/ 0088 u_int32_t adv_int_u; 0089 }; 0090 0091 /* 0092 * des authentication verifier: client variety 0093 * 0094 * adv_timestamp is the current time. 0095 * adv_winverf is the credential window + 1. 0096 * Both are encrypted using the conversation key. 0097 */ 0098 #define adv_timestamp adv_time_u.adv_ctime 0099 #define adv_xtimestamp adv_time_u.adv_xtime 0100 #define adv_winverf adv_int_u 0101 0102 /* 0103 * des authentication verifier: server variety 0104 * 0105 * adv_timeverf is the client's timestamp + client's window 0106 * adv_nickname is the server's nickname for the client. 0107 * adv_timeverf is encrypted using the conversation key. 0108 */ 0109 #define adv_timeverf adv_time_u.adv_ctime 0110 #define adv_xtimeverf adv_time_u.adv_xtime 0111 #define adv_nickname adv_int_u 0112 0113 #ifdef __cplusplus 0114 extern "C" { 0115 #endif 0116 extern int rtime(struct sockaddr_in *, struct timeval *, 0117 struct timeval *); 0118 extern void kgetnetname(char *); 0119 #ifdef __cplusplus 0120 } 0121 #endif 0122 0123 #endif /* ndef _TI_AUTH_DES_ */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |