xref: /onnv-gate/usr/src/cmd/ssh/include/ssh1.h (revision 0:68f95e015346)
1*0Sstevel@tonic-gate /*	$OpenBSD: ssh1.h,v 1.3 2001/05/30 12:55:13 markus Exp $	*/
2*0Sstevel@tonic-gate 
3*0Sstevel@tonic-gate #ifndef	_SSH1_H
4*0Sstevel@tonic-gate #define	_SSH1_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 /*
26*0Sstevel@tonic-gate  * Definition of message types.  New values can be added, but old values
27*0Sstevel@tonic-gate  * should not be removed or without careful consideration of the consequences
28*0Sstevel@tonic-gate  * for compatibility.  The maximum value is 254; value 255 is reserved for
29*0Sstevel@tonic-gate  * future extension.
30*0Sstevel@tonic-gate  */
31*0Sstevel@tonic-gate /* Message name */			/* msg code */	/* arguments */
32*0Sstevel@tonic-gate #define SSH_MSG_NONE				0	/* no message */
33*0Sstevel@tonic-gate #define SSH_MSG_DISCONNECT			1	/* cause (string) */
34*0Sstevel@tonic-gate #define SSH_SMSG_PUBLIC_KEY			2	/* ck,msk,srvk,hostk */
35*0Sstevel@tonic-gate #define SSH_CMSG_SESSION_KEY			3	/* key (BIGNUM) */
36*0Sstevel@tonic-gate #define SSH_CMSG_USER				4	/* user (string) */
37*0Sstevel@tonic-gate #define SSH_CMSG_AUTH_RHOSTS			5	/* user (string) */
38*0Sstevel@tonic-gate #define SSH_CMSG_AUTH_RSA			6	/* modulus (BIGNUM) */
39*0Sstevel@tonic-gate #define SSH_SMSG_AUTH_RSA_CHALLENGE		7	/* int (BIGNUM) */
40*0Sstevel@tonic-gate #define SSH_CMSG_AUTH_RSA_RESPONSE		8	/* int (BIGNUM) */
41*0Sstevel@tonic-gate #define SSH_CMSG_AUTH_PASSWORD			9	/* pass (string) */
42*0Sstevel@tonic-gate #define SSH_CMSG_REQUEST_PTY		        10	/* TERM, tty modes */
43*0Sstevel@tonic-gate #define SSH_CMSG_WINDOW_SIZE		        11	/* row,col,xpix,ypix */
44*0Sstevel@tonic-gate #define SSH_CMSG_EXEC_SHELL			12	/* */
45*0Sstevel@tonic-gate #define SSH_CMSG_EXEC_CMD			13	/* cmd (string) */
46*0Sstevel@tonic-gate #define SSH_SMSG_SUCCESS			14	/* */
47*0Sstevel@tonic-gate #define SSH_SMSG_FAILURE			15	/* */
48*0Sstevel@tonic-gate #define SSH_CMSG_STDIN_DATA			16	/* data (string) */
49*0Sstevel@tonic-gate #define SSH_SMSG_STDOUT_DATA			17	/* data (string) */
50*0Sstevel@tonic-gate #define SSH_SMSG_STDERR_DATA			18	/* data (string) */
51*0Sstevel@tonic-gate #define SSH_CMSG_EOF				19	/* */
52*0Sstevel@tonic-gate #define SSH_SMSG_EXITSTATUS			20	/* status (int) */
53*0Sstevel@tonic-gate #define SSH_MSG_CHANNEL_OPEN_CONFIRMATION	21	/* channel (int) */
54*0Sstevel@tonic-gate #define SSH_MSG_CHANNEL_OPEN_FAILURE		22	/* channel (int) */
55*0Sstevel@tonic-gate #define SSH_MSG_CHANNEL_DATA			23	/* ch,data (int,str) */
56*0Sstevel@tonic-gate #define SSH_MSG_CHANNEL_CLOSE			24	/* channel (int) */
57*0Sstevel@tonic-gate #define SSH_MSG_CHANNEL_CLOSE_CONFIRMATION	25	/* channel (int) */
58*0Sstevel@tonic-gate /*      SSH_CMSG_X11_REQUEST_FORWARDING         26         OBSOLETE */
59*0Sstevel@tonic-gate #define SSH_SMSG_X11_OPEN			27	/* channel (int) */
60*0Sstevel@tonic-gate #define SSH_CMSG_PORT_FORWARD_REQUEST		28	/* p,host,hp (i,s,i) */
61*0Sstevel@tonic-gate #define SSH_MSG_PORT_OPEN			29	/* ch,h,p (i,s,i) */
62*0Sstevel@tonic-gate #define SSH_CMSG_AGENT_REQUEST_FORWARDING	30	/* */
63*0Sstevel@tonic-gate #define SSH_SMSG_AGENT_OPEN			31	/* port (int) */
64*0Sstevel@tonic-gate #define SSH_MSG_IGNORE				32	/* string */
65*0Sstevel@tonic-gate #define SSH_CMSG_EXIT_CONFIRMATION		33	/* */
66*0Sstevel@tonic-gate #define SSH_CMSG_X11_REQUEST_FORWARDING		34	/* proto,data (s,s) */
67*0Sstevel@tonic-gate #define SSH_CMSG_AUTH_RHOSTS_RSA		35	/* user,mod (s,mpi) */
68*0Sstevel@tonic-gate #define SSH_MSG_DEBUG				36	/* string */
69*0Sstevel@tonic-gate #define SSH_CMSG_REQUEST_COMPRESSION		37	/* level 1-9 (int) */
70*0Sstevel@tonic-gate #define SSH_CMSG_MAX_PACKET_SIZE		38	/* size 4k-1024k (int) */
71*0Sstevel@tonic-gate #define SSH_CMSG_AUTH_TIS			39	/* we use this for s/key */
72*0Sstevel@tonic-gate #define SSH_SMSG_AUTH_TIS_CHALLENGE		40	/* challenge (string) */
73*0Sstevel@tonic-gate #define SSH_CMSG_AUTH_TIS_RESPONSE		41	/* response (string) */
74*0Sstevel@tonic-gate #define SSH_CMSG_AUTH_KERBEROS			42	/* (KTEXT) */
75*0Sstevel@tonic-gate #define SSH_SMSG_AUTH_KERBEROS_RESPONSE		43	/* (KTEXT) */
76*0Sstevel@tonic-gate #define SSH_CMSG_HAVE_KERBEROS_TGT		44	/* credentials (s) */
77*0Sstevel@tonic-gate #define SSH_CMSG_HAVE_AFS_TOKEN			65	/* token (s) */
78*0Sstevel@tonic-gate 
79*0Sstevel@tonic-gate /* protocol version 1.5 overloads some version 1.3 message types */
80*0Sstevel@tonic-gate #define SSH_MSG_CHANNEL_INPUT_EOF	SSH_MSG_CHANNEL_CLOSE
81*0Sstevel@tonic-gate #define SSH_MSG_CHANNEL_OUTPUT_CLOSE	SSH_MSG_CHANNEL_CLOSE_CONFIRMATION
82*0Sstevel@tonic-gate 
83*0Sstevel@tonic-gate /*
84*0Sstevel@tonic-gate  * Authentication methods.  New types can be added, but old types should not
85*0Sstevel@tonic-gate  * be removed for compatibility.  The maximum allowed value is 31.
86*0Sstevel@tonic-gate  */
87*0Sstevel@tonic-gate #define SSH_AUTH_RHOSTS		1
88*0Sstevel@tonic-gate #define SSH_AUTH_RSA		2
89*0Sstevel@tonic-gate #define SSH_AUTH_PASSWORD	3
90*0Sstevel@tonic-gate #define SSH_AUTH_RHOSTS_RSA	4
91*0Sstevel@tonic-gate #define SSH_AUTH_TIS		5
92*0Sstevel@tonic-gate #define SSH_AUTH_KERBEROS	6
93*0Sstevel@tonic-gate #define SSH_PASS_KERBEROS_TGT	7
94*0Sstevel@tonic-gate 				/* 8 to 15 are reserved */
95*0Sstevel@tonic-gate #define SSH_PASS_AFS_TOKEN	21
96*0Sstevel@tonic-gate 
97*0Sstevel@tonic-gate /* Protocol flags.  These are bit masks. */
98*0Sstevel@tonic-gate #define SSH_PROTOFLAG_SCREEN_NUMBER	1	/* X11 forwarding includes screen */
99*0Sstevel@tonic-gate #define SSH_PROTOFLAG_HOST_IN_FWD_OPEN	2	/* forwarding opens contain host */
100*0Sstevel@tonic-gate 
101*0Sstevel@tonic-gate #ifdef __cplusplus
102*0Sstevel@tonic-gate }
103*0Sstevel@tonic-gate #endif
104*0Sstevel@tonic-gate 
105*0Sstevel@tonic-gate #endif /* _SSH1_H */
106