blob: 1fa4c0a0ddaea1644ce85f69bb9a1ecda10cac79 [file] [log] [blame]
Damien Millerb38eff82000-04-01 11:09:21 +10001/*
Damien Millerdcb6ecd2000-05-17 22:34:22 +10002 * draft-ietf-secsh-architecture-05.txt
Damien Millerb38eff82000-04-01 11:09:21 +10003 *
4 * Transport layer protocol:
Damien Miller4af51302000-04-16 11:18:38 +10005 *
Damien Millerb38eff82000-04-01 11:09:21 +10006 * 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)
Damien Miller4af51302000-04-16 11:18:38 +100011 *
Damien Millerb38eff82000-04-01 11:09:21 +100012 * User authentication protocol:
Damien Miller4af51302000-04-16 11:18:38 +100013 *
Damien Millerb38eff82000-04-01 11:09:21 +100014 * 50-59 User authentication generic
15 * 60-79 User authentication method specific (numbers can be reused
16 * for different authentication methods)
Damien Miller4af51302000-04-16 11:18:38 +100017 *
Damien Millerb38eff82000-04-01 11:09:21 +100018 * Connection protocol:
Damien Miller4af51302000-04-16 11:18:38 +100019 *
Damien Millerb38eff82000-04-01 11:09:21 +100020 * 80-89 Connection protocol generic
21 * 90-127 Channel related messages
Damien Miller4af51302000-04-16 11:18:38 +100022 *
Damien Millerb38eff82000-04-01 11:09:21 +100023 * Reserved for client protocols:
Damien Miller4af51302000-04-16 11:18:38 +100024 *
Damien Millerb38eff82000-04-01 11:09:21 +100025 * 128-191 Reserved
Damien Miller4af51302000-04-16 11:18:38 +100026 *
Damien Millerb38eff82000-04-01 11:09:21 +100027 * Local extensions:
Damien Miller4af51302000-04-16 11:18:38 +100028 *
Damien Millerb38eff82000-04-01 11:09:21 +100029 * 192-255 Local extensions
30 */
Damien Millerdcb6ecd2000-05-17 22:34:22 +100031/* RCSID("$OpenBSD: ssh2.h,v 1.3 2000/05/15 07:03:12 markus Exp $"); */
Damien Millerb38eff82000-04-01 11:09:21 +100032
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
Damien Millerdcb6ecd2000-05-17 22:34:22 +100092#define SSH2_DISCONNECT_RESERVED 4
Damien Millerb38eff82000-04-01 11:09:21 +100093#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
Damien Millerdcb6ecd2000-05-17 22:34:22 +1000100#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
Damien Millerb38eff82000-04-01 11:09:21 +1000104
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