Damien Miller | b38eff8 | 2000-04-01 11:09:21 +1000 | [diff] [blame] | 1 | /* |
Damien Miller | dcb6ecd | 2000-05-17 22:34:22 +1000 | [diff] [blame] | 2 | * draft-ietf-secsh-architecture-05.txt |
Damien Miller | b38eff8 | 2000-04-01 11:09:21 +1000 | [diff] [blame] | 3 | * |
| 4 | * Transport layer protocol: |
Damien Miller | 4af5130 | 2000-04-16 11:18:38 +1000 | [diff] [blame] | 5 | * |
Damien Miller | b38eff8 | 2000-04-01 11:09:21 +1000 | [diff] [blame] | 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) |
Damien Miller | 4af5130 | 2000-04-16 11:18:38 +1000 | [diff] [blame] | 11 | * |
Damien Miller | b38eff8 | 2000-04-01 11:09:21 +1000 | [diff] [blame] | 12 | * User authentication protocol: |
Damien Miller | 4af5130 | 2000-04-16 11:18:38 +1000 | [diff] [blame] | 13 | * |
Damien Miller | b38eff8 | 2000-04-01 11:09:21 +1000 | [diff] [blame] | 14 | * 50-59 User authentication generic |
| 15 | * 60-79 User authentication method specific (numbers can be reused |
| 16 | * for different authentication methods) |
Damien Miller | 4af5130 | 2000-04-16 11:18:38 +1000 | [diff] [blame] | 17 | * |
Damien Miller | b38eff8 | 2000-04-01 11:09:21 +1000 | [diff] [blame] | 18 | * Connection protocol: |
Damien Miller | 4af5130 | 2000-04-16 11:18:38 +1000 | [diff] [blame] | 19 | * |
Damien Miller | b38eff8 | 2000-04-01 11:09:21 +1000 | [diff] [blame] | 20 | * 80-89 Connection protocol generic |
| 21 | * 90-127 Channel related messages |
Damien Miller | 4af5130 | 2000-04-16 11:18:38 +1000 | [diff] [blame] | 22 | * |
Damien Miller | b38eff8 | 2000-04-01 11:09:21 +1000 | [diff] [blame] | 23 | * Reserved for client protocols: |
Damien Miller | 4af5130 | 2000-04-16 11:18:38 +1000 | [diff] [blame] | 24 | * |
Damien Miller | b38eff8 | 2000-04-01 11:09:21 +1000 | [diff] [blame] | 25 | * 128-191 Reserved |
Damien Miller | 4af5130 | 2000-04-16 11:18:38 +1000 | [diff] [blame] | 26 | * |
Damien Miller | b38eff8 | 2000-04-01 11:09:21 +1000 | [diff] [blame] | 27 | * Local extensions: |
Damien Miller | 4af5130 | 2000-04-16 11:18:38 +1000 | [diff] [blame] | 28 | * |
Damien Miller | b38eff8 | 2000-04-01 11:09:21 +1000 | [diff] [blame] | 29 | * 192-255 Local extensions |
| 30 | */ |
Damien Miller | dcb6ecd | 2000-05-17 22:34:22 +1000 | [diff] [blame] | 31 | /* RCSID("$OpenBSD: ssh2.h,v 1.3 2000/05/15 07:03:12 markus Exp $"); */ |
Damien Miller | b38eff8 | 2000-04-01 11:09:21 +1000 | [diff] [blame] | 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 |
Damien Miller | dcb6ecd | 2000-05-17 22:34:22 +1000 | [diff] [blame] | 92 | #define SSH2_DISCONNECT_RESERVED 4 |
Damien Miller | b38eff8 | 2000-04-01 11:09:21 +1000 | [diff] [blame] | 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 |
Damien Miller | dcb6ecd | 2000-05-17 22:34:22 +1000 | [diff] [blame] | 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 |
Damien Miller | b38eff8 | 2000-04-01 11:09:21 +1000 | [diff] [blame] | 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 |