1323124Sdes/* $OpenBSD: ssh1.h,v 1.7 2016/05/04 14:22:33 markus Exp $ */ 276259Sgreen 376259Sgreen/* 476259Sgreen * Author: Tatu Ylonen <ylo@cs.hut.fi> 576259Sgreen * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 676259Sgreen * All rights reserved 776259Sgreen * 876259Sgreen * As far as I am concerned, the code I have written for this software 976259Sgreen * can be used freely for any purpose. Any derived versions of this 1076259Sgreen * software must be clearly marked as such, and if the derived work is 1176259Sgreen * incompatible with the protocol description in the RFC file, it must be 1276259Sgreen * called by a name other than "ssh" or "Secure Shell". 1376259Sgreen */ 1476259Sgreen 1576259Sgreen/* 1676259Sgreen * Definition of message types. New values can be added, but old values 1776259Sgreen * should not be removed or without careful consideration of the consequences 1876259Sgreen * for compatibility. The maximum value is 254; value 255 is reserved for 1976259Sgreen * future extension. 2076259Sgreen */ 21146998Sdes/* Ranges */ 22146998Sdes#define SSH_MSG_MIN 1 23146998Sdes#define SSH_MSG_MAX 254 2476259Sgreen/* Message name */ /* msg code */ /* arguments */ 2576259Sgreen#define SSH_MSG_DISCONNECT 1 /* cause (string) */ 2676259Sgreen#define SSH_SMSG_PUBLIC_KEY 2 /* ck,msk,srvk,hostk */ 2776259Sgreen#define SSH_CMSG_SESSION_KEY 3 /* key (BIGNUM) */ 2876259Sgreen#define SSH_CMSG_USER 4 /* user (string) */ 2976259Sgreen#define SSH_CMSG_AUTH_RHOSTS 5 /* user (string) */ 3076259Sgreen#define SSH_CMSG_AUTH_RSA 6 /* modulus (BIGNUM) */ 3176259Sgreen#define SSH_SMSG_AUTH_RSA_CHALLENGE 7 /* int (BIGNUM) */ 3276259Sgreen#define SSH_CMSG_AUTH_RSA_RESPONSE 8 /* int (BIGNUM) */ 3376259Sgreen#define SSH_CMSG_AUTH_PASSWORD 9 /* pass (string) */ 34137015Sdes#define SSH_CMSG_REQUEST_PTY 10 /* TERM, tty modes */ 35137015Sdes#define SSH_CMSG_WINDOW_SIZE 11 /* row,col,xpix,ypix */ 3676259Sgreen#define SSH_CMSG_EXEC_SHELL 12 /* */ 3776259Sgreen#define SSH_CMSG_EXEC_CMD 13 /* cmd (string) */ 3876259Sgreen#define SSH_SMSG_SUCCESS 14 /* */ 3976259Sgreen#define SSH_SMSG_FAILURE 15 /* */ 4076259Sgreen#define SSH_CMSG_STDIN_DATA 16 /* data (string) */ 4176259Sgreen#define SSH_SMSG_STDOUT_DATA 17 /* data (string) */ 4276259Sgreen#define SSH_SMSG_STDERR_DATA 18 /* data (string) */ 4376259Sgreen#define SSH_CMSG_EOF 19 /* */ 4476259Sgreen#define SSH_SMSG_EXITSTATUS 20 /* status (int) */ 4576259Sgreen#define SSH_MSG_CHANNEL_OPEN_CONFIRMATION 21 /* channel (int) */ 4676259Sgreen#define SSH_MSG_CHANNEL_OPEN_FAILURE 22 /* channel (int) */ 4776259Sgreen#define SSH_MSG_CHANNEL_DATA 23 /* ch,data (int,str) */ 4876259Sgreen#define SSH_MSG_CHANNEL_CLOSE 24 /* channel (int) */ 4976259Sgreen#define SSH_MSG_CHANNEL_CLOSE_CONFIRMATION 25 /* channel (int) */ 50137015Sdes/* SSH_CMSG_X11_REQUEST_FORWARDING 26 OBSOLETE */ 5176259Sgreen#define SSH_SMSG_X11_OPEN 27 /* channel (int) */ 5276259Sgreen#define SSH_CMSG_PORT_FORWARD_REQUEST 28 /* p,host,hp (i,s,i) */ 5376259Sgreen#define SSH_MSG_PORT_OPEN 29 /* ch,h,p (i,s,i) */ 5476259Sgreen#define SSH_CMSG_AGENT_REQUEST_FORWARDING 30 /* */ 5576259Sgreen#define SSH_SMSG_AGENT_OPEN 31 /* port (int) */ 5676259Sgreen#define SSH_MSG_IGNORE 32 /* string */ 5776259Sgreen#define SSH_CMSG_EXIT_CONFIRMATION 33 /* */ 5876259Sgreen#define SSH_CMSG_X11_REQUEST_FORWARDING 34 /* proto,data (s,s) */ 5976259Sgreen#define SSH_CMSG_AUTH_RHOSTS_RSA 35 /* user,mod (s,mpi) */ 6076259Sgreen#define SSH_MSG_DEBUG 36 /* string */ 6176259Sgreen#define SSH_CMSG_REQUEST_COMPRESSION 37 /* level 1-9 (int) */ 6276259Sgreen#define SSH_CMSG_MAX_PACKET_SIZE 38 /* size 4k-1024k (int) */ 6376259Sgreen#define SSH_CMSG_AUTH_TIS 39 /* we use this for s/key */ 6476259Sgreen#define SSH_SMSG_AUTH_TIS_CHALLENGE 40 /* challenge (string) */ 6576259Sgreen#define SSH_CMSG_AUTH_TIS_RESPONSE 41 /* response (string) */ 6676259Sgreen#define SSH_CMSG_AUTH_KERBEROS 42 /* (KTEXT) */ 6776259Sgreen#define SSH_SMSG_AUTH_KERBEROS_RESPONSE 43 /* (KTEXT) */ 6876259Sgreen#define SSH_CMSG_HAVE_KERBEROS_TGT 44 /* credentials (s) */ 6976259Sgreen#define SSH_CMSG_HAVE_AFS_TOKEN 65 /* token (s) */ 7076259Sgreen 7192555Sdes/* protocol version 1.5 overloads some version 1.3 message types */ 7292555Sdes#define SSH_MSG_CHANNEL_INPUT_EOF SSH_MSG_CHANNEL_CLOSE 7392555Sdes#define SSH_MSG_CHANNEL_OUTPUT_CLOSE SSH_MSG_CHANNEL_CLOSE_CONFIRMATION 7492555Sdes 7576259Sgreen/* 7676259Sgreen * Authentication methods. New types can be added, but old types should not 7776259Sgreen * be removed for compatibility. The maximum allowed value is 31. 7876259Sgreen */ 7976259Sgreen#define SSH_AUTH_RHOSTS 1 8076259Sgreen#define SSH_AUTH_RSA 2 8176259Sgreen#define SSH_AUTH_PASSWORD 3 8276259Sgreen#define SSH_AUTH_RHOSTS_RSA 4 8376259Sgreen#define SSH_AUTH_TIS 5 8476259Sgreen#define SSH_AUTH_KERBEROS 6 8576259Sgreen#define SSH_PASS_KERBEROS_TGT 7 8676259Sgreen /* 8 to 15 are reserved */ 8776259Sgreen#define SSH_PASS_AFS_TOKEN 21 8876259Sgreen 8976259Sgreen/* Protocol flags. These are bit masks. */ 9076259Sgreen#define SSH_PROTOFLAG_SCREEN_NUMBER 1 /* X11 forwarding includes screen */ 9176259Sgreen#define SSH_PROTOFLAG_HOST_IN_FWD_OPEN 2 /* forwarding opens contain host */ 92