remdesk.h (4890B)
1/** 2 * FreeRDP: A Remote Desktop Protocol Implementation 3 * Remote Assistance Virtual Channel 4 * 5 * Copyright 2014 Marc-Andre Moreau <marcandre.moreau@gmail.com> 6 * 7 * Licensed under the Apache License, Version 2.0 (the "License"); 8 * you may not use this file except in compliance with the License. 9 * You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, software 14 * distributed under the License is distributed on an "AS IS" BASIS, 15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 * See the License for the specific language governing permissions and 17 * limitations under the License. 18 */ 19 20#ifndef FREERDP_CHANNEL_REMDESK_H 21#define FREERDP_CHANNEL_REMDESK_H 22 23#include <freerdp/api.h> 24#include <freerdp/types.h> 25 26#define REMDESK_SVC_CHANNEL_NAME "remdesk" 27 28#define REMDESK_ERROR_NOERROR 0 29#define REMDESK_ERROR_NOINFO 1 30#define REMDESK_ERROR_LOCALNOTERROR 3 31#define REMDESK_ERROR_REMOTEBYUSER 4 32#define REMDESK_ERROR_BYSERVER 5 33#define REMDESK_ERROR_DNSLOOKUPFAILED 6 34#define REMDESK_ERROR_OUTOFMEMORY 7 35#define REMDESK_ERROR_CONNECTIONTIMEDOUT 8 36#define REMDESK_ERROR_SOCKETCONNECTFAILED 9 37#define REMDESK_ERROR_HOSTNOTFOUND 11 38#define REMDESK_ERROR_WINSOCKSENDFAILED 12 39#define REMDESK_ERROR_INVALIDIPADDR 14 40#define REMDESK_ERROR_SOCKETRECVFAILED 15 41#define REMDESK_ERROR_INVALIDENCRYPTION 18 42#define REMDESK_ERROR_GETHOSTBYNAMEFAILED 20 43#define REMDESK_ERROR_LICENSINGFAILED 21 44#define REMDESK_ERROR_ENCRYPTIONERROR 22 45#define REMDESK_ERROR_DECRYPTIONERROR 23 46#define REMDESK_ERROR_INVALIDPARAMETERSTRING 24 47#define REMDESK_ERROR_HELPSESSIONNOTFOUND 25 48#define REMDESK_ERROR_INVALIDPASSWORD 26 49#define REMDESK_ERROR_HELPSESSIONEXPIRED 27 50#define REMDESK_ERROR_CANTOPENRESOLVER 28 51#define REMDESK_ERROR_UNKNOWNSESSMGRERROR 29 52#define REMDESK_ERROR_CANTFORMLINKTOUSERSESSION 30 53#define REMDESK_ERROR_RCPROTOCOLERROR 32 54#define REMDESK_ERROR_RCUNKNOWNERROR 33 55#define REMDESK_ERROR_INTERNALERROR 34 56#define REMDESK_ERROR_HELPEERESPONSEPENDING 35 57#define REMDESK_ERROR_HELPEESAIDYES 36 58#define REMDESK_ERROR_HELPEEALREADYBEINGHELPED 37 59#define REMDESK_ERROR_HELPEECONSIDERINGHELP 38 60#define REMDESK_ERROR_HELPEENEVERRESPONDED 40 61#define REMDESK_ERROR_HELPEESAIDNO 41 62#define REMDESK_ERROR_HELPSESSIONACCESSDENIED 42 63#define REMDESK_ERROR_USERNOTFOUND 43 64#define REMDESK_ERROR_SESSMGRERRORNOTINIT 44 65#define REMDESK_ERROR_SELFHELPNOTSUPPORTED 45 66#define REMDESK_ERROR_INCOMPATIBLEVERSION 47 67#define REMDESK_ERROR_SESSIONNOTCONNECTED 48 68#define REMDESK_ERROR_SYSTEMSHUTDOWN 50 69#define REMDESK_ERROR_STOPLISTENBYUSER 51 70#define REMDESK_ERROR_WINSOCK_FAILED 52 71#define REMDESK_ERROR_MISMATCHPARMS 53 72#define REMDESK_ERROR_PASSWORDS_DONT_MATCH 61 73#define REMDESK_ERROR_SHADOWEND_BASE 300 74#define REMDESK_ERROR_SHADOWEND_CONFIGCHANGE 301 75#define REMDESK_ERROR_SHADOWEND_UNKNOWN 302 76 77struct _REMDESK_CHANNEL_HEADER 78{ 79 UINT32 DataLength; 80 char ChannelName[32]; 81}; 82typedef struct _REMDESK_CHANNEL_HEADER REMDESK_CHANNEL_HEADER; 83 84#define REMDESK_CHANNEL_CTL_NAME "RC_CTL" 85#define REMDESK_CHANNEL_CTL_SIZE 22 86 87struct _REMDESK_CTL_HEADER 88{ 89 UINT32 DataLength; 90 char ChannelName[32]; 91 92 UINT32 msgType; 93}; 94typedef struct _REMDESK_CTL_HEADER REMDESK_CTL_HEADER; 95 96#define REMDESK_CTL_REMOTE_CONTROL_DESKTOP 1 97#define REMDESK_CTL_RESULT 2 98#define REMDESK_CTL_AUTHENTICATE 3 99#define REMDESK_CTL_SERVER_ANNOUNCE 4 100#define REMDESK_CTL_DISCONNECT 5 101#define REMDESK_CTL_VERSIONINFO 6 102#define REMDESK_CTL_ISCONNECTED 7 103#define REMDESK_CTL_VERIFY_PASSWORD 8 104#define REMDESK_CTL_EXPERT_ON_VISTA 9 105#define REMDESK_CTL_RANOVICE_NAME 10 106#define REMDESK_CTL_RAEXPERT_NAME 11 107#define REMDESK_CTL_TOKEN 12 108 109struct _REMDESK_CTL_RESULT_PDU 110{ 111 REMDESK_CTL_HEADER ctlHeader; 112 113 UINT32 result; 114}; 115typedef struct _REMDESK_CTL_RESULT_PDU REMDESK_CTL_RESULT_PDU; 116 117struct _REMDESK_CTL_VERSION_INFO_PDU 118{ 119 REMDESK_CTL_HEADER ctlHeader; 120 121 UINT32 versionMajor; 122 UINT32 versionMinor; 123}; 124typedef struct _REMDESK_CTL_VERSION_INFO_PDU REMDESK_CTL_VERSION_INFO_PDU; 125 126struct _REMDESK_CTL_AUTHENTICATE_PDU 127{ 128 REMDESK_CTL_HEADER ctlHeader; 129 130 char* raConnectionString; 131 char* expertBlob; 132}; 133typedef struct _REMDESK_CTL_AUTHENTICATE_PDU REMDESK_CTL_AUTHENTICATE_PDU; 134 135struct _REMDESK_CTL_REMOTE_CONTROL_DESKTOP_PDU 136{ 137 REMDESK_CTL_HEADER ctlHeader; 138 139 char* raConnectionString; 140}; 141typedef struct _REMDESK_CTL_REMOTE_CONTROL_DESKTOP_PDU REMDESK_CTL_REMOTE_CONTROL_DESKTOP_PDU; 142 143struct _REMDESK_CTL_VERIFY_PASSWORD_PDU 144{ 145 REMDESK_CTL_HEADER ctlHeader; 146 147 char* expertBlob; 148}; 149typedef struct _REMDESK_CTL_VERIFY_PASSWORD_PDU REMDESK_CTL_VERIFY_PASSWORD_PDU; 150 151struct _REMDESK_CTL_EXPERT_ON_VISTA_PDU 152{ 153 REMDESK_CTL_HEADER ctlHeader; 154 155 BYTE* EncryptedPassword; 156 UINT32 EncryptedPasswordLength; 157}; 158typedef struct _REMDESK_CTL_EXPERT_ON_VISTA_PDU REMDESK_CTL_EXPERT_ON_VISTA_PDU; 159 160#endif /* FREERDP_CHANNEL_REMDESK_H */