Damien Miller | 5109638 | 2006-03-26 14:30:00 +1100 | [diff] [blame] | 1 | /* $OpenBSD: ssh1.h,v 1.6 2006/03/25 22:22:43 djm Exp $ */ |
Ben Lindstrom | 36579d3 | 2001-01-29 07:39:26 +0000 | [diff] [blame] | 2 | |
Ben Lindstrom | 226cfa0 | 2001-01-22 05:34:40 +0000 | [diff] [blame] | 3 | /* |
| 4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
| 5 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
| 6 | * All rights reserved |
| 7 | * |
| 8 | * As far as I am concerned, the code I have written for this software |
| 9 | * can be used freely for any purpose. Any derived versions of this |
| 10 | * software must be clearly marked as such, and if the derived work is |
| 11 | * incompatible with the protocol description in the RFC file, it must be |
| 12 | * called by a name other than "ssh" or "Secure Shell". |
| 13 | */ |
| 14 | |
| 15 | /* |
| 16 | * Definition of message types. New values can be added, but old values |
| 17 | * should not be removed or without careful consideration of the consequences |
| 18 | * for compatibility. The maximum value is 254; value 255 is reserved for |
| 19 | * future extension. |
| 20 | */ |
Darren Tucker | b2694f0 | 2004-11-05 20:27:54 +1100 | [diff] [blame] | 21 | /* Ranges */ |
| 22 | #define SSH_MSG_MIN 1 |
| 23 | #define SSH_MSG_MAX 254 |
Ben Lindstrom | 226cfa0 | 2001-01-22 05:34:40 +0000 | [diff] [blame] | 24 | /* Message name */ /* msg code */ /* arguments */ |
| 25 | #define SSH_MSG_NONE 0 /* no message */ |
| 26 | #define SSH_MSG_DISCONNECT 1 /* cause (string) */ |
| 27 | #define SSH_SMSG_PUBLIC_KEY 2 /* ck,msk,srvk,hostk */ |
| 28 | #define SSH_CMSG_SESSION_KEY 3 /* key (BIGNUM) */ |
| 29 | #define SSH_CMSG_USER 4 /* user (string) */ |
| 30 | #define SSH_CMSG_AUTH_RHOSTS 5 /* user (string) */ |
| 31 | #define SSH_CMSG_AUTH_RSA 6 /* modulus (BIGNUM) */ |
| 32 | #define SSH_SMSG_AUTH_RSA_CHALLENGE 7 /* int (BIGNUM) */ |
| 33 | #define SSH_CMSG_AUTH_RSA_RESPONSE 8 /* int (BIGNUM) */ |
| 34 | #define SSH_CMSG_AUTH_PASSWORD 9 /* pass (string) */ |
Darren Tucker | fc95970 | 2004-07-17 16:12:08 +1000 | [diff] [blame] | 35 | #define SSH_CMSG_REQUEST_PTY 10 /* TERM, tty modes */ |
| 36 | #define SSH_CMSG_WINDOW_SIZE 11 /* row,col,xpix,ypix */ |
Ben Lindstrom | 226cfa0 | 2001-01-22 05:34:40 +0000 | [diff] [blame] | 37 | #define SSH_CMSG_EXEC_SHELL 12 /* */ |
| 38 | #define SSH_CMSG_EXEC_CMD 13 /* cmd (string) */ |
| 39 | #define SSH_SMSG_SUCCESS 14 /* */ |
| 40 | #define SSH_SMSG_FAILURE 15 /* */ |
| 41 | #define SSH_CMSG_STDIN_DATA 16 /* data (string) */ |
| 42 | #define SSH_SMSG_STDOUT_DATA 17 /* data (string) */ |
| 43 | #define SSH_SMSG_STDERR_DATA 18 /* data (string) */ |
| 44 | #define SSH_CMSG_EOF 19 /* */ |
| 45 | #define SSH_SMSG_EXITSTATUS 20 /* status (int) */ |
| 46 | #define SSH_MSG_CHANNEL_OPEN_CONFIRMATION 21 /* channel (int) */ |
| 47 | #define SSH_MSG_CHANNEL_OPEN_FAILURE 22 /* channel (int) */ |
| 48 | #define SSH_MSG_CHANNEL_DATA 23 /* ch,data (int,str) */ |
| 49 | #define SSH_MSG_CHANNEL_CLOSE 24 /* channel (int) */ |
| 50 | #define SSH_MSG_CHANNEL_CLOSE_CONFIRMATION 25 /* channel (int) */ |
Darren Tucker | fc95970 | 2004-07-17 16:12:08 +1000 | [diff] [blame] | 51 | /* SSH_CMSG_X11_REQUEST_FORWARDING 26 OBSOLETE */ |
Ben Lindstrom | 226cfa0 | 2001-01-22 05:34:40 +0000 | [diff] [blame] | 52 | #define SSH_SMSG_X11_OPEN 27 /* channel (int) */ |
| 53 | #define SSH_CMSG_PORT_FORWARD_REQUEST 28 /* p,host,hp (i,s,i) */ |
| 54 | #define SSH_MSG_PORT_OPEN 29 /* ch,h,p (i,s,i) */ |
| 55 | #define SSH_CMSG_AGENT_REQUEST_FORWARDING 30 /* */ |
| 56 | #define SSH_SMSG_AGENT_OPEN 31 /* port (int) */ |
| 57 | #define SSH_MSG_IGNORE 32 /* string */ |
| 58 | #define SSH_CMSG_EXIT_CONFIRMATION 33 /* */ |
| 59 | #define SSH_CMSG_X11_REQUEST_FORWARDING 34 /* proto,data (s,s) */ |
| 60 | #define SSH_CMSG_AUTH_RHOSTS_RSA 35 /* user,mod (s,mpi) */ |
| 61 | #define SSH_MSG_DEBUG 36 /* string */ |
| 62 | #define SSH_CMSG_REQUEST_COMPRESSION 37 /* level 1-9 (int) */ |
| 63 | #define SSH_CMSG_MAX_PACKET_SIZE 38 /* size 4k-1024k (int) */ |
| 64 | #define SSH_CMSG_AUTH_TIS 39 /* we use this for s/key */ |
| 65 | #define SSH_SMSG_AUTH_TIS_CHALLENGE 40 /* challenge (string) */ |
| 66 | #define SSH_CMSG_AUTH_TIS_RESPONSE 41 /* response (string) */ |
| 67 | #define SSH_CMSG_AUTH_KERBEROS 42 /* (KTEXT) */ |
| 68 | #define SSH_SMSG_AUTH_KERBEROS_RESPONSE 43 /* (KTEXT) */ |
| 69 | #define SSH_CMSG_HAVE_KERBEROS_TGT 44 /* credentials (s) */ |
| 70 | #define SSH_CMSG_HAVE_AFS_TOKEN 65 /* token (s) */ |
| 71 | |
Ben Lindstrom | e6455ae | 2001-06-09 00:17:10 +0000 | [diff] [blame] | 72 | /* protocol version 1.5 overloads some version 1.3 message types */ |
| 73 | #define SSH_MSG_CHANNEL_INPUT_EOF SSH_MSG_CHANNEL_CLOSE |
| 74 | #define SSH_MSG_CHANNEL_OUTPUT_CLOSE SSH_MSG_CHANNEL_CLOSE_CONFIRMATION |
| 75 | |
Ben Lindstrom | 226cfa0 | 2001-01-22 05:34:40 +0000 | [diff] [blame] | 76 | /* |
| 77 | * Authentication methods. New types can be added, but old types should not |
| 78 | * be removed for compatibility. The maximum allowed value is 31. |
| 79 | */ |
| 80 | #define SSH_AUTH_RHOSTS 1 |
| 81 | #define SSH_AUTH_RSA 2 |
| 82 | #define SSH_AUTH_PASSWORD 3 |
| 83 | #define SSH_AUTH_RHOSTS_RSA 4 |
| 84 | #define SSH_AUTH_TIS 5 |
| 85 | #define SSH_AUTH_KERBEROS 6 |
| 86 | #define SSH_PASS_KERBEROS_TGT 7 |
| 87 | /* 8 to 15 are reserved */ |
| 88 | #define SSH_PASS_AFS_TOKEN 21 |
| 89 | |
| 90 | /* Protocol flags. These are bit masks. */ |
| 91 | #define SSH_PROTOFLAG_SCREEN_NUMBER 1 /* X11 forwarding includes screen */ |
| 92 | #define SSH_PROTOFLAG_HOST_IN_FWD_OPEN 2 /* forwarding opens contain host */ |