1*0Sstevel@tonic-gate /*	$OpenBSD: ssh.h,v 1.71 2002/06/22 02:00:29 stevesk Exp $	*/
2*0Sstevel@tonic-gate 
3*0Sstevel@tonic-gate #ifndef	_SSH_H
4*0Sstevel@tonic-gate #define	_SSH_H
5*0Sstevel@tonic-gate 
6*0Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
7*0Sstevel@tonic-gate 
8*0Sstevel@tonic-gate #ifdef __cplusplus
9*0Sstevel@tonic-gate extern "C" {
10*0Sstevel@tonic-gate #endif
11*0Sstevel@tonic-gate 
12*0Sstevel@tonic-gate 
13*0Sstevel@tonic-gate /*
14*0Sstevel@tonic-gate  * Author: Tatu Ylonen <ylo@cs.hut.fi>
15*0Sstevel@tonic-gate  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
16*0Sstevel@tonic-gate  *                    All rights reserved
17*0Sstevel@tonic-gate  *
18*0Sstevel@tonic-gate  * As far as I am concerned, the code I have written for this software
19*0Sstevel@tonic-gate  * can be used freely for any purpose.  Any derived versions of this
20*0Sstevel@tonic-gate  * software must be clearly marked as such, and if the derived work is
21*0Sstevel@tonic-gate  * incompatible with the protocol description in the RFC file, it must be
22*0Sstevel@tonic-gate  * called by a name other than "ssh" or "Secure Shell".
23*0Sstevel@tonic-gate  */
24*0Sstevel@tonic-gate 
25*0Sstevel@tonic-gate #include <netinet/in.h> /* For struct sockaddr_in */
26*0Sstevel@tonic-gate #include <pwd.h> /* For struct pw */
27*0Sstevel@tonic-gate #include <stdarg.h> /* For va_list */
28*0Sstevel@tonic-gate #include <syslog.h> /* For LOG_AUTH and friends */
29*0Sstevel@tonic-gate #include <sys/socket.h> /* For struct sockaddr_storage */
30*0Sstevel@tonic-gate #include "fake-socket.h" /* For struct sockaddr_storage */
31*0Sstevel@tonic-gate #ifdef HAVE_SYS_SELECT_H
32*0Sstevel@tonic-gate # include <sys/select.h>
33*0Sstevel@tonic-gate #endif
34*0Sstevel@tonic-gate 
35*0Sstevel@tonic-gate /* Cipher used for encrypting authentication files. */
36*0Sstevel@tonic-gate #define SSH_AUTHFILE_CIPHER	SSH_CIPHER_3DES
37*0Sstevel@tonic-gate 
38*0Sstevel@tonic-gate /* Default port number. */
39*0Sstevel@tonic-gate #define SSH_DEFAULT_PORT	22
40*0Sstevel@tonic-gate 
41*0Sstevel@tonic-gate /* Maximum number of TCP/IP ports forwarded per direction. */
42*0Sstevel@tonic-gate #define SSH_MAX_FORWARDS_PER_DIRECTION	100
43*0Sstevel@tonic-gate 
44*0Sstevel@tonic-gate /*
45*0Sstevel@tonic-gate  * Maximum number of RSA authentication identity files that can be specified
46*0Sstevel@tonic-gate  * in configuration files or on the command line.
47*0Sstevel@tonic-gate  */
48*0Sstevel@tonic-gate #define SSH_MAX_IDENTITY_FILES		100
49*0Sstevel@tonic-gate 
50*0Sstevel@tonic-gate /*
51*0Sstevel@tonic-gate  * Major protocol version.  Different version indicates major incompatibility
52*0Sstevel@tonic-gate  * that prevents communication.
53*0Sstevel@tonic-gate  *
54*0Sstevel@tonic-gate  * Minor protocol version.  Different version indicates minor incompatibility
55*0Sstevel@tonic-gate  * that does not prevent interoperation.
56*0Sstevel@tonic-gate  */
57*0Sstevel@tonic-gate #define PROTOCOL_MAJOR_1	1
58*0Sstevel@tonic-gate #define PROTOCOL_MINOR_1	5
59*0Sstevel@tonic-gate 
60*0Sstevel@tonic-gate /* We support both SSH1 and SSH2 */
61*0Sstevel@tonic-gate #define PROTOCOL_MAJOR_2	2
62*0Sstevel@tonic-gate #define PROTOCOL_MINOR_2	0
63*0Sstevel@tonic-gate 
64*0Sstevel@tonic-gate /*
65*0Sstevel@tonic-gate  * Name for the service.  The port named by this service overrides the
66*0Sstevel@tonic-gate  * default port if present.
67*0Sstevel@tonic-gate  */
68*0Sstevel@tonic-gate #define SSH_SERVICE_NAME	"ssh"
69*0Sstevel@tonic-gate 
70*0Sstevel@tonic-gate /*
71*0Sstevel@tonic-gate  * Name of the environment variable containing the process ID of the
72*0Sstevel@tonic-gate  * authentication agent.
73*0Sstevel@tonic-gate  */
74*0Sstevel@tonic-gate #define SSH_AGENTPID_ENV_NAME	"SSH_AGENT_PID"
75*0Sstevel@tonic-gate 
76*0Sstevel@tonic-gate /*
77*0Sstevel@tonic-gate  * Name of the environment variable containing the pathname of the
78*0Sstevel@tonic-gate  * authentication socket.
79*0Sstevel@tonic-gate  */
80*0Sstevel@tonic-gate #define SSH_AUTHSOCKET_ENV_NAME "SSH_AUTH_SOCK"
81*0Sstevel@tonic-gate 
82*0Sstevel@tonic-gate /*
83*0Sstevel@tonic-gate  * Environment variable for overwriting the default location of askpass
84*0Sstevel@tonic-gate  */
85*0Sstevel@tonic-gate #define SSH_ASKPASS_ENV		"SSH_ASKPASS"
86*0Sstevel@tonic-gate 
87*0Sstevel@tonic-gate /*
88*0Sstevel@tonic-gate  * Force host key length and server key length to differ by at least this
89*0Sstevel@tonic-gate  * many bits.  This is to make double encryption with rsaref work.
90*0Sstevel@tonic-gate  */
91*0Sstevel@tonic-gate #define SSH_KEY_BITS_RESERVED		128
92*0Sstevel@tonic-gate 
93*0Sstevel@tonic-gate /*
94*0Sstevel@tonic-gate  * Length of the session key in bytes.  (Specified as 256 bits in the
95*0Sstevel@tonic-gate  * protocol.)
96*0Sstevel@tonic-gate  */
97*0Sstevel@tonic-gate #define SSH_SESSION_KEY_LENGTH		32
98*0Sstevel@tonic-gate 
99*0Sstevel@tonic-gate /* Name of Kerberos service for SSH to use. */
100*0Sstevel@tonic-gate #define KRB4_SERVICE_NAME		"rcmd"
101*0Sstevel@tonic-gate 
102*0Sstevel@tonic-gate /* Used to identify ``EscapeChar none'' */
103*0Sstevel@tonic-gate #define SSH_ESCAPECHAR_NONE		-2
104*0Sstevel@tonic-gate 
105*0Sstevel@tonic-gate /*
106*0Sstevel@tonic-gate  * unprivileged user when UsePrivilegeSeparation=yes;
107*0Sstevel@tonic-gate  * sshd will change its privileges to this user and its
108*0Sstevel@tonic-gate  * primary group.
109*0Sstevel@tonic-gate  */
110*0Sstevel@tonic-gate #ifndef SSH_PRIVSEP_USER
111*0Sstevel@tonic-gate #define SSH_PRIVSEP_USER		"sshd"
112*0Sstevel@tonic-gate #endif
113*0Sstevel@tonic-gate 
114*0Sstevel@tonic-gate /* Minimum modulus size (n) for RSA keys. */
115*0Sstevel@tonic-gate #define SSH_RSA_MINIMUM_MODULUS_SIZE	768
116*0Sstevel@tonic-gate 
117*0Sstevel@tonic-gate #ifdef __cplusplus
118*0Sstevel@tonic-gate }
119*0Sstevel@tonic-gate #endif
120*0Sstevel@tonic-gate 
121*0Sstevel@tonic-gate #endif /* _SSH_H */
122