ssh2.h revision 61209
1/*
2 * draft-ietf-secsh-architecture-05.txt
3 *
4 *   Transport layer protocol:
5 *
6 *     1-19     Transport layer generic (e.g. disconnect, ignore, debug,
7 *              etc)
8 *     20-29    Algorithm negotiation
9 *     30-49    Key exchange method specific (numbers can be reused for
10 *              different authentication methods)
11 *
12 *   User authentication protocol:
13 *
14 *     50-59    User authentication generic
15 *     60-79    User authentication method specific (numbers can be reused
16 *              for different authentication methods)
17 *
18 *   Connection protocol:
19 *
20 *     80-89    Connection protocol generic
21 *     90-127   Channel related messages
22 *
23 *   Reserved for client protocols:
24 *
25 *     128-191  Reserved
26 *
27 *   Local extensions:
28 *
29 *     192-255  Local extensions
30 */
31/* RCSID("$OpenBSD: ssh2.h,v 1.3 2000/05/15 07:03:12 markus Exp $"); */
32
33/* transport layer: generic */
34
35#define SSH2_MSG_DISCONNECT				1
36#define SSH2_MSG_IGNORE					2
37#define SSH2_MSG_UNIMPLEMENTED				3
38#define SSH2_MSG_DEBUG					4
39#define SSH2_MSG_SERVICE_REQUEST			5
40#define SSH2_MSG_SERVICE_ACCEPT				6
41
42/* transport layer: alg negotiation */
43
44#define SSH2_MSG_KEXINIT				20
45#define SSH2_MSG_NEWKEYS				21
46
47/* transport layer: kex specific messages, can be reused */
48
49#define SSH2_MSG_KEXDH_INIT				30
50#define SSH2_MSG_KEXDH_REPLY				31
51
52/* user authentication: generic */
53
54#define SSH2_MSG_USERAUTH_REQUEST			50
55#define SSH2_MSG_USERAUTH_FAILURE			51
56#define SSH2_MSG_USERAUTH_SUCCESS			52
57#define SSH2_MSG_USERAUTH_BANNER			53
58
59/* user authentication: method specific, can be reused */
60
61#define SSH2_MSG_USERAUTH_PK_OK				60
62#define SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ		60
63#define SSH2_MSG_USERAUTH_INFO_REQUEST			60
64#define SSH2_MSG_USERAUTH_INFO_RESPONSE			61
65
66/* connection protocol: generic */
67
68#define SSH2_MSG_GLOBAL_REQUEST				80
69#define SSH2_MSG_REQUEST_SUCCESS			81
70#define SSH2_MSG_REQUEST_FAILURE			82
71
72/* channel related messages */
73
74#define SSH2_MSG_CHANNEL_OPEN				90
75#define SSH2_MSG_CHANNEL_OPEN_CONFIRMATION		91
76#define SSH2_MSG_CHANNEL_OPEN_FAILURE			92
77#define SSH2_MSG_CHANNEL_WINDOW_ADJUST			93
78#define SSH2_MSG_CHANNEL_DATA				94
79#define SSH2_MSG_CHANNEL_EXTENDED_DATA			95
80#define SSH2_MSG_CHANNEL_EOF				96
81#define SSH2_MSG_CHANNEL_CLOSE				97
82#define SSH2_MSG_CHANNEL_REQUEST			98
83#define SSH2_MSG_CHANNEL_SUCCESS			99
84#define SSH2_MSG_CHANNEL_FAILURE			100
85
86/* disconnect reason code */
87
88#define SSH2_DISCONNECT_HOST_NOT_ALLOWED_TO_CONNECT	1
89#define SSH2_DISCONNECT_PROTOCOL_ERROR			2
90#define SSH2_DISCONNECT_KEY_EXCHANGE_FAILED		3
91#define SSH2_DISCONNECT_HOST_AUTHENTICATION_FAILED	4
92#define SSH2_DISCONNECT_RESERVED			4
93#define SSH2_DISCONNECT_MAC_ERROR			5
94#define SSH2_DISCONNECT_COMPRESSION_ERROR		6
95#define SSH2_DISCONNECT_SERVICE_NOT_AVAILABLE		7
96#define SSH2_DISCONNECT_PROTOCOL_VERSION_NOT_SUPPORTED	8
97#define SSH2_DISCONNECT_HOST_KEY_NOT_VERIFIABLE		9
98#define SSH2_DISCONNECT_CONNECTION_LOST			10
99#define SSH2_DISCONNECT_BY_APPLICATION			11
100#define SSH2_DISCONNECT_TOO_MANY_CONNECTIONS		12
101#define SSH2_DISCONNECT_AUTH_CANCELLED_BY_USER		13
102#define SSH2_DISCONNECT_NO_MORE_AUTH_METHODS_AVAILABLE	14
103#define SSH2_DISCONNECT_ILLEGAL_USER_NAME		15
104
105/* misc */
106
107#define SSH2_OPEN_ADMINISTRATIVELY_PROHIBITED		1
108#define SSH2_OPEN_CONNECT_FAILED			2
109#define SSH2_OPEN_UNKNOWN_CHANNEL_TYPE			3
110#define SSH2_OPEN_RESOURCE_SHORTAGE			4
111
112#define SSH2_EXTENDED_DATA_STDERR			1
113