2 3/* 4 * Copyright (c) 2000 Markus Friedl. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 1. Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * 2. Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * 15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27/* 28 * draft-ietf-secsh-architecture-05.txt 29 * 30 * Transport layer protocol: 31 * 32 * 1-19 Transport layer generic (e.g. disconnect, ignore, debug, 33 * etc) 34 * 20-29 Algorithm negotiation 35 * 30-49 Key exchange method specific (numbers can be reused for 36 * different authentication methods) 37 * 38 * User authentication protocol: 39 * 40 * 50-59 User authentication generic 41 * 60-79 User authentication method specific (numbers can be reused 42 * for different authentication methods) 43 * 44 * Connection protocol: 45 * 46 * 80-89 Connection protocol generic 47 * 90-127 Channel related messages 48 * 49 * Reserved for client protocols: 50 * 51 * 128-191 Reserved 52 * 53 * Local extensions: 54 * 55 * 192-255 Local extensions 56 */ 57 58/* ranges */ 59 60#define SSH2_MSG_TRANSPORT_MIN 1 61#define SSH2_MSG_TRANSPORT_MAX 49 62#define SSH2_MSG_USERAUTH_MIN 50 63#define SSH2_MSG_USERAUTH_MAX 79 64#define SSH2_MSG_USERAUTH_PER_METHOD_MIN 60 65#define SSH2_MSG_USERAUTH_PER_METHOD_MAX SSH2_MSG_USERAUTH_MAX 66#define SSH2_MSG_CONNECTION_MIN 80 67#define SSH2_MSG_CONNECTION_MAX 127 68#define SSH2_MSG_RESERVED_MIN 128 69#define SSH2_MSG_RESERVED_MAX 191 70#define SSH2_MSG_LOCAL_MIN 192 71#define SSH2_MSG_LOCAL_MAX 255 72#define SSH2_MSG_MIN 1 73#define SSH2_MSG_MAX 255 74 75/* transport layer: generic */ 76 77#define SSH2_MSG_DISCONNECT 1 78#define SSH2_MSG_IGNORE 2 79#define SSH2_MSG_UNIMPLEMENTED 3 80#define SSH2_MSG_DEBUG 4 81#define SSH2_MSG_SERVICE_REQUEST 5 82#define SSH2_MSG_SERVICE_ACCEPT 6 83 84/* transport layer: alg negotiation */ 85 86#define SSH2_MSG_KEXINIT 20 87#define SSH2_MSG_NEWKEYS 21 88 89/* transport layer: kex specific messages, can be reused */ 90 91#define SSH2_MSG_KEXDH_INIT 30 92#define SSH2_MSG_KEXDH_REPLY 31 93 94/* dh-group-exchange */ 95#define SSH2_MSG_KEX_DH_GEX_REQUEST_OLD 30 96#define SSH2_MSG_KEX_DH_GEX_GROUP 31 97#define SSH2_MSG_KEX_DH_GEX_INIT 32 98#define SSH2_MSG_KEX_DH_GEX_REPLY 33 99#define SSH2_MSG_KEX_DH_GEX_REQUEST 34 100 101/* ecdh */ 102#define SSH2_MSG_KEX_ECDH_INIT 30 103#define SSH2_MSG_KEX_ECDH_REPLY 31 104 105/* user authentication: generic */ 106 107#define SSH2_MSG_USERAUTH_REQUEST 50 108#define SSH2_MSG_USERAUTH_FAILURE 51 109#define SSH2_MSG_USERAUTH_SUCCESS 52 110#define SSH2_MSG_USERAUTH_BANNER 53 111 112/* user authentication: method specific, can be reused */ 113 114#define SSH2_MSG_USERAUTH_PK_OK 60 115#define SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ 60 116#define SSH2_MSG_USERAUTH_INFO_REQUEST 60 117#define SSH2_MSG_USERAUTH_INFO_RESPONSE 61
| 2 3/* 4 * Copyright (c) 2000 Markus Friedl. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 1. Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * 2. Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * 15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27/* 28 * draft-ietf-secsh-architecture-05.txt 29 * 30 * Transport layer protocol: 31 * 32 * 1-19 Transport layer generic (e.g. disconnect, ignore, debug, 33 * etc) 34 * 20-29 Algorithm negotiation 35 * 30-49 Key exchange method specific (numbers can be reused for 36 * different authentication methods) 37 * 38 * User authentication protocol: 39 * 40 * 50-59 User authentication generic 41 * 60-79 User authentication method specific (numbers can be reused 42 * for different authentication methods) 43 * 44 * Connection protocol: 45 * 46 * 80-89 Connection protocol generic 47 * 90-127 Channel related messages 48 * 49 * Reserved for client protocols: 50 * 51 * 128-191 Reserved 52 * 53 * Local extensions: 54 * 55 * 192-255 Local extensions 56 */ 57 58/* ranges */ 59 60#define SSH2_MSG_TRANSPORT_MIN 1 61#define SSH2_MSG_TRANSPORT_MAX 49 62#define SSH2_MSG_USERAUTH_MIN 50 63#define SSH2_MSG_USERAUTH_MAX 79 64#define SSH2_MSG_USERAUTH_PER_METHOD_MIN 60 65#define SSH2_MSG_USERAUTH_PER_METHOD_MAX SSH2_MSG_USERAUTH_MAX 66#define SSH2_MSG_CONNECTION_MIN 80 67#define SSH2_MSG_CONNECTION_MAX 127 68#define SSH2_MSG_RESERVED_MIN 128 69#define SSH2_MSG_RESERVED_MAX 191 70#define SSH2_MSG_LOCAL_MIN 192 71#define SSH2_MSG_LOCAL_MAX 255 72#define SSH2_MSG_MIN 1 73#define SSH2_MSG_MAX 255 74 75/* transport layer: generic */ 76 77#define SSH2_MSG_DISCONNECT 1 78#define SSH2_MSG_IGNORE 2 79#define SSH2_MSG_UNIMPLEMENTED 3 80#define SSH2_MSG_DEBUG 4 81#define SSH2_MSG_SERVICE_REQUEST 5 82#define SSH2_MSG_SERVICE_ACCEPT 6 83 84/* transport layer: alg negotiation */ 85 86#define SSH2_MSG_KEXINIT 20 87#define SSH2_MSG_NEWKEYS 21 88 89/* transport layer: kex specific messages, can be reused */ 90 91#define SSH2_MSG_KEXDH_INIT 30 92#define SSH2_MSG_KEXDH_REPLY 31 93 94/* dh-group-exchange */ 95#define SSH2_MSG_KEX_DH_GEX_REQUEST_OLD 30 96#define SSH2_MSG_KEX_DH_GEX_GROUP 31 97#define SSH2_MSG_KEX_DH_GEX_INIT 32 98#define SSH2_MSG_KEX_DH_GEX_REPLY 33 99#define SSH2_MSG_KEX_DH_GEX_REQUEST 34 100 101/* ecdh */ 102#define SSH2_MSG_KEX_ECDH_INIT 30 103#define SSH2_MSG_KEX_ECDH_REPLY 31 104 105/* user authentication: generic */ 106 107#define SSH2_MSG_USERAUTH_REQUEST 50 108#define SSH2_MSG_USERAUTH_FAILURE 51 109#define SSH2_MSG_USERAUTH_SUCCESS 52 110#define SSH2_MSG_USERAUTH_BANNER 53 111 112/* user authentication: method specific, can be reused */ 113 114#define SSH2_MSG_USERAUTH_PK_OK 60 115#define SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ 60 116#define SSH2_MSG_USERAUTH_INFO_REQUEST 60 117#define SSH2_MSG_USERAUTH_INFO_RESPONSE 61
|