Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenconstants.h
Go to the documentation of this file.
00001 /* 00002 rdesktop: A Remote Desktop Protocol client. 00003 Miscellaneous protocol constants 00004 Copyright (C) Matthew Chapman 1999-2005 00005 00006 This program is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation; either version 2 of the License, or 00009 (at your option) any later version. 00010 00011 This program is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License along 00017 with this program; if not, write to the Free Software Foundation, Inc., 00018 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 00019 */ 00020 00021 /* TCP port for Remote Desktop Protocol */ 00022 #define TCP_PORT_RDP 3389 00023 00024 #define DEFAULT_CODEPAGE "UTF-8" 00025 #define WINDOWS_CODEPAGE "UTF-16LE" 00026 00027 /* ISO PDU codes */ 00028 enum ISO_PDU_CODE 00029 { 00030 ISO_PDU_CR = 0xE0, /* Connection Request */ 00031 ISO_PDU_CC = 0xD0, /* Connection Confirm */ 00032 ISO_PDU_DR = 0x80, /* Disconnect Request */ 00033 ISO_PDU_DT = 0xF0, /* Data */ 00034 ISO_PDU_ER = 0x70 /* Error */ 00035 }; 00036 00037 /* MCS PDU codes */ 00038 enum MCS_PDU_TYPE 00039 { 00040 MCS_EDRQ = 1, /* Erect Domain Request */ 00041 MCS_DPUM = 8, /* Disconnect Provider Ultimatum */ 00042 MCS_AURQ = 10, /* Attach User Request */ 00043 MCS_AUCF = 11, /* Attach User Confirm */ 00044 MCS_CJRQ = 14, /* Channel Join Request */ 00045 MCS_CJCF = 15, /* Channel Join Confirm */ 00046 MCS_SDRQ = 25, /* Send Data Request */ 00047 MCS_SDIN = 26 /* Send Data Indication */ 00048 }; 00049 00050 #define MCS_CONNECT_INITIAL 0x7f65 00051 #define MCS_CONNECT_RESPONSE 0x7f66 00052 00053 #define BER_TAG_BOOLEAN 1 00054 #define BER_TAG_INTEGER 2 00055 #define BER_TAG_OCTET_STRING 4 00056 #define BER_TAG_RESULT 10 00057 #define MCS_TAG_DOMAIN_PARAMS 0x30 00058 00059 #define MCS_GLOBAL_CHANNEL 1003 00060 #define MCS_USERCHANNEL_BASE 1001 00061 00062 /* RDP secure transport constants */ 00063 #define SEC_RANDOM_SIZE 32 00064 #define SEC_MODULUS_SIZE 64 00065 #define SEC_PADDING_SIZE 8 00066 #define SEC_EXPONENT_SIZE 4 00067 00068 #define SEC_CLIENT_RANDOM 0x0001 00069 #define SEC_ENCRYPT 0x0008 00070 #define SEC_LOGON_INFO 0x0040 00071 #define SEC_LICENCE_NEG 0x0080 00072 #define SEC_REDIRECT_ENCRYPT 0x0C00 00073 00074 #define SEC_TAG_SRV_INFO 0x0c01 00075 #define SEC_TAG_SRV_CRYPT 0x0c02 00076 #define SEC_TAG_SRV_CHANNELS 0x0c03 00077 00078 #define SEC_TAG_CLI_INFO 0xc001 00079 #define SEC_TAG_CLI_CRYPT 0xc002 00080 #define SEC_TAG_CLI_CHANNELS 0xc003 00081 #define SEC_TAG_CLI_4 0xc004 00082 00083 #define SEC_TAG_PUBKEY 0x0006 00084 #define SEC_TAG_KEYSIG 0x0008 00085 00086 #define SEC_RSA_MAGIC 0x31415352 /* RSA1 */ 00087 00088 /* RDP licensing constants */ 00089 #define LICENCE_TOKEN_SIZE 10 00090 #define LICENCE_HWID_SIZE 20 00091 #define LICENCE_SIGNATURE_SIZE 16 00092 00093 #define LICENCE_TAG_DEMAND 0x01 00094 #define LICENCE_TAG_AUTHREQ 0x02 00095 #define LICENCE_TAG_ISSUE 0x03 00096 #define LICENCE_TAG_REISSUE 0x04 00097 #define LICENCE_TAG_PRESENT 0x12 00098 #define LICENCE_TAG_REQUEST 0x13 00099 #define LICENCE_TAG_AUTHRESP 0x15 00100 #define LICENCE_TAG_RESULT 0xff 00101 00102 #define LICENCE_TAG_USER 0x000f 00103 #define LICENCE_TAG_HOST 0x0010 00104 00105 /* RDP PDU codes */ 00106 enum RDP_PDU_TYPE 00107 { 00108 RDP_PDU_DEMAND_ACTIVE = 1, 00109 RDP_PDU_CONFIRM_ACTIVE = 3, 00110 RDP_PDU_REDIRECT = 4, /* MS Server 2003 Session Redirect */ 00111 RDP_PDU_DEACTIVATE = 6, 00112 RDP_PDU_DATA = 7 00113 }; 00114 00115 enum RDP_DATA_PDU_TYPE 00116 { 00117 RDP_DATA_PDU_UPDATE = 2, 00118 RDP_DATA_PDU_CONTROL = 20, 00119 RDP_DATA_PDU_POINTER = 27, 00120 RDP_DATA_PDU_INPUT = 28, 00121 RDP_DATA_PDU_SYNCHRONISE = 31, 00122 RDP_DATA_PDU_BELL = 34, 00123 RDP_DATA_PDU_CLIENT_WINDOW_STATUS = 35, 00124 RDP_DATA_PDU_LOGON = 38, 00125 RDP_DATA_PDU_FONT2 = 39, 00126 RDP_DATA_PDU_KEYBOARD_INDICATORS = 41, 00127 RDP_DATA_PDU_DISCONNECT = 47 00128 }; 00129 00130 enum RDP_CONTROL_PDU_TYPE 00131 { 00132 RDP_CTL_REQUEST_CONTROL = 1, 00133 RDP_CTL_GRANT_CONTROL = 2, 00134 RDP_CTL_DETACH = 3, 00135 RDP_CTL_COOPERATE = 4 00136 }; 00137 00138 enum RDP_UPDATE_PDU_TYPE 00139 { 00140 RDP_UPDATE_ORDERS = 0, 00141 RDP_UPDATE_BITMAP = 1, 00142 RDP_UPDATE_PALETTE = 2, 00143 RDP_UPDATE_SYNCHRONIZE = 3 00144 }; 00145 00146 enum RDP_POINTER_PDU_TYPE 00147 { 00148 RDP_POINTER_SYSTEM = 1, 00149 RDP_POINTER_MOVE = 3, 00150 RDP_POINTER_COLOR = 6, 00151 RDP_POINTER_CACHED = 7 00152 }; 00153 00154 enum RDP_SYSTEM_POINTER_TYPE 00155 { 00156 RDP_NULL_POINTER = 0, 00157 RDP_DEFAULT_POINTER = 0x7F00 00158 }; 00159 00160 enum RDP_INPUT_DEVICE 00161 { 00162 RDP_INPUT_SYNCHRONIZE = 0, 00163 RDP_INPUT_CODEPOINT = 1, 00164 RDP_INPUT_VIRTKEY = 2, 00165 RDP_INPUT_SCANCODE = 4, 00166 RDP_INPUT_MOUSE = 0x8001 00167 }; 00168 00169 /* Device flags */ 00170 #define KBD_FLAG_RIGHT 0x0001 00171 #define KBD_FLAG_EXT 0x0100 00172 #define KBD_FLAG_QUIET 0x1000 00173 #define KBD_FLAG_DOWN 0x4000 00174 #define KBD_FLAG_UP 0x8000 00175 00176 /* These are for synchronization; not for keystrokes */ 00177 #define KBD_FLAG_SCROLL 0x0001 00178 #define KBD_FLAG_NUMLOCK 0x0002 00179 #define KBD_FLAG_CAPITAL 0x0004 00180 00181 /* See T.128 */ 00182 #define RDP_KEYPRESS 0 00183 #define RDP_KEYRELEASE (KBD_FLAG_DOWN | KBD_FLAG_UP) 00184 00185 #define MOUSE_FLAG_MOVE 0x0800 00186 #define MOUSE_FLAG_BUTTON1 0x1000 00187 #define MOUSE_FLAG_BUTTON2 0x2000 00188 #define MOUSE_FLAG_BUTTON3 0x4000 00189 #define MOUSE_FLAG_BUTTON4 0x0280 00190 #define MOUSE_FLAG_BUTTON5 0x0380 00191 #define MOUSE_FLAG_DOWN 0x8000 00192 00193 /* Raster operation masks */ 00194 #define ROP2_S(rop3) ((uint8) (rop3 & 0xf)) 00195 #define ROP2_P(rop3) ((uint8) ((rop3 & 0x3) | ((rop3 & 0x30) >> 2))) 00196 #define ROP_MINUS_1(rop) ((uint8) (rop - 1)) 00197 00198 #define ROP2_COPY 0xc 00199 #define ROP2_XOR 0x6 00200 #define ROP2_AND 0x8 00201 #define ROP2_NXOR 0x9 00202 #define ROP2_OR 0xe 00203 00204 #define MIX_TRANSPARENT 0 00205 #define MIX_OPAQUE 1 00206 00207 #define TEXT2_VERTICAL 0x04 00208 #define TEXT2_IMPLICIT_X 0x20 00209 00210 #define ALTERNATE 1 00211 #define WINDING 2 00212 00213 /* RDP bitmap cache (version 2) constants */ 00214 #define BMPCACHE2_C0_CELLS 0x78 00215 #define BMPCACHE2_C1_CELLS 0x78 00216 #define BMPCACHE2_C2_CELLS 0x150 00217 #define BMPCACHE2_NUM_PSTCELLS 0x9f6 00218 00219 #define PDU_FLAG_FIRST 0x01 00220 #define PDU_FLAG_LAST 0x02 00221 00222 /* RDP capabilities */ 00223 #define RDP_CAPSET_GENERAL 1 /* Maps to generalCapabilitySet in T.128 page 138 */ 00224 #define RDP_CAPLEN_GENERAL 0x18 00225 #define OS_MAJOR_TYPE_UNIX 4 00226 #define OS_MINOR_TYPE_XSERVER 7 00227 00228 #define RDP_CAPSET_BITMAP 2 00229 #define RDP_CAPLEN_BITMAP 0x1C 00230 00231 #define RDP_CAPSET_ORDER 3 00232 #define RDP_CAPLEN_ORDER 0x58 00233 #define ORDER_CAP_NEGOTIATE 2 00234 #define ORDER_CAP_NOSUPPORT 4 00235 00236 #define RDP_CAPSET_BMPCACHE 4 00237 #define RDP_CAPLEN_BMPCACHE 0x28 00238 00239 #define RDP_CAPSET_CONTROL 5 00240 #define RDP_CAPLEN_CONTROL 0x0C 00241 00242 #define RDP_CAPSET_ACTIVATE 7 00243 #define RDP_CAPLEN_ACTIVATE 0x0C 00244 00245 #define RDP_CAPSET_POINTER 8 00246 #define RDP_CAPLEN_POINTER 0x08 00247 00248 #define RDP_CAPSET_SHARE 9 00249 #define RDP_CAPLEN_SHARE 0x08 00250 00251 #define RDP_CAPSET_COLCACHE 10 00252 #define RDP_CAPLEN_COLCACHE 0x08 00253 00254 #define RDP_CAPSET_BMPCACHE2 19 00255 #define RDP_CAPLEN_BMPCACHE2 0x28 00256 #define BMPCACHE2_FLAG_PERSIST ((uint32)1<<31) 00257 00258 #define RDP_SOURCE "MSTSC" 00259 00260 /* Logon flags */ 00261 #define RDP_LOGON_AUTO 0x0008 00262 #define RDP_LOGON_NORMAL 0x0033 00263 #define RDP_LOGON_COMPRESSION 0x0080 /* mppc compression with 8kB histroy buffer */ 00264 #define RDP_LOGON_BLOB 0x0100 00265 #define RDP_LOGON_COMPRESSION2 0x0200 /* rdp5 mppc compression with 64kB history buffer */ 00266 #define RDP_LOGON_LEAVE_AUDIO 0x2000 00267 00268 #define RDP5_DISABLE_NOTHING 0x00 00269 #define RDP5_NO_WALLPAPER 0x01 00270 #define RDP5_NO_FULLWINDOWDRAG 0x02 00271 #define RDP5_NO_MENUANIMATIONS 0x04 00272 #define RDP5_NO_THEMING 0x08 00273 #define RDP5_NO_CURSOR_SHADOW 0x20 00274 #define RDP5_NO_CURSORSETTINGS 0x40 /* disables cursor blinking */ 00275 00276 /* compression types */ 00277 #define RDP_MPPC_BIG 0x01 00278 #define RDP_MPPC_COMPRESSED 0x20 00279 #define RDP_MPPC_RESET 0x40 00280 #define RDP_MPPC_FLUSH 0x80 00281 #define RDP_MPPC_DICT_SIZE 65536 00282 00283 #define RDP5_COMPRESSED 0x80 00284 00285 /* Keymap flags */ 00286 #define MapRightShiftMask (1<<0) 00287 #define MapLeftShiftMask (1<<1) 00288 #define MapShiftMask (MapRightShiftMask | MapLeftShiftMask) 00289 00290 #define MapRightAltMask (1<<2) 00291 #define MapLeftAltMask (1<<3) 00292 #define MapAltGrMask MapRightAltMask 00293 00294 #define MapRightCtrlMask (1<<4) 00295 #define MapLeftCtrlMask (1<<5) 00296 #define MapCtrlMask (MapRightCtrlMask | MapLeftCtrlMask) 00297 00298 #define MapRightWinMask (1<<6) 00299 #define MapLeftWinMask (1<<7) 00300 #define MapWinMask (MapRightWinMask | MapLeftWinMask) 00301 00302 #define MapNumLockMask (1<<8) 00303 #define MapCapsLockMask (1<<9) 00304 00305 #define MapLocalStateMask (1<<10) 00306 00307 #define MapInhibitMask (1<<11) 00308 00309 #define MASK_ADD_BITS(var, mask) (var |= mask) 00310 #define MASK_REMOVE_BITS(var, mask) (var &= ~mask) 00311 #define MASK_HAS_BITS(var, mask) ((var & mask)>0) 00312 #define MASK_CHANGE_BIT(var, mask, active) (var = ((var & ~mask) | (active ? mask : 0))) 00313 00314 /* Clipboard constants, "borrowed" from GCC system headers in 00315 the w32 cross compiler */ 00316 00317 #ifndef CF_TEXT 00318 #define CF_TEXT 1 00319 #define CF_BITMAP 2 00320 #define CF_METAFILEPICT 3 00321 #define CF_SYLK 4 00322 #define CF_DIF 5 00323 #define CF_TIFF 6 00324 #define CF_OEMTEXT 7 00325 #define CF_DIB 8 00326 #define CF_PALETTE 9 00327 #define CF_PENDATA 10 00328 #define CF_RIFF 11 00329 #define CF_WAVE 12 00330 #define CF_UNICODETEXT 13 00331 #define CF_ENHMETAFILE 14 00332 #define CF_HDROP 15 00333 #define CF_LOCALE 16 00334 #define CF_MAX 17 00335 #define CF_OWNERDISPLAY 128 00336 #define CF_DSPTEXT 129 00337 #define CF_DSPBITMAP 130 00338 #define CF_DSPMETAFILEPICT 131 00339 #define CF_DSPENHMETAFILE 142 00340 #define CF_PRIVATEFIRST 512 00341 #define CF_PRIVATELAST 767 00342 #define CF_GDIOBJFIRST 768 00343 #define CF_GDIOBJLAST 1023 00344 #endif 00345 00346 /* Sound format constants */ 00347 #define WAVE_FORMAT_PCM 1 00348 #define WAVE_FORMAT_ADPCM 2 00349 #define WAVE_FORMAT_ALAW 6 00350 #define WAVE_FORMAT_MULAW 7 00351 00352 /* Virtual channel options */ 00353 #define CHANNEL_OPTION_INITIALIZED 0x80000000 00354 #define CHANNEL_OPTION_ENCRYPT_RDP 0x40000000 00355 #define CHANNEL_OPTION_COMPRESS_RDP 0x00800000 00356 #define CHANNEL_OPTION_SHOW_PROTOCOL 0x00200000 00357 00358 /* NT status codes for RDPDR */ 00359 #undef STATUS_SUCCESS 00360 #define STATUS_SUCCESS 0x00000000 00361 #undef STATUS_NOT_IMPLEMENTED 00362 #define STATUS_NOT_IMPLEMENTED 0x00000001 00363 #undef STATUS_PENDING 00364 #define STATUS_PENDING 0x00000103 00365 00366 #ifndef STATUS_NO_MORE_FILES 00367 #define STATUS_NO_MORE_FILES 0x80000006 00368 #define STATUS_DEVICE_PAPER_EMPTY 0x8000000e 00369 #define STATUS_DEVICE_POWERED_OFF 0x8000000f 00370 #define STATUS_DEVICE_OFF_LINE 0x80000010 00371 #define STATUS_DEVICE_BUSY 0x80000011 00372 #endif 00373 00374 #ifndef STATUS_INVALID_HANDLE 00375 #define STATUS_INVALID_HANDLE 0xc0000008 00376 #define STATUS_INVALID_PARAMETER 0xc000000d 00377 #define STATUS_NO_SUCH_FILE 0xc000000f 00378 #define STATUS_INVALID_DEVICE_REQUEST 0xc0000010 00379 #define STATUS_ACCESS_DENIED 0xc0000022 00380 #define STATUS_OBJECT_NAME_COLLISION 0xc0000035 00381 #define STATUS_DISK_FULL 0xc000007f 00382 #define STATUS_FILE_IS_A_DIRECTORY 0xc00000ba 00383 #define STATUS_NOT_SUPPORTED 0xc00000bb 00384 #define STATUS_TIMEOUT 0xc0000102 00385 #define STATUS_NOTIFY_ENUM_DIR 0xc000010c 00386 #define STATUS_CANCELLED 0xc0000120 00387 #endif 00388 00389 /* RDPDR constants */ 00390 #define RDPDR_MAX_DEVICES 0x10 00391 #define DEVICE_TYPE_SERIAL 0x01 00392 #define DEVICE_TYPE_PARALLEL 0x02 00393 #define DEVICE_TYPE_PRINTER 0x04 00394 #define DEVICE_TYPE_DISK 0x08 00395 #define DEVICE_TYPE_SCARD 0x20 00396 00397 #define FILE_DIRECTORY_FILE 0x00000001 00398 #define FILE_NON_DIRECTORY_FILE 0x00000040 00399 #define FILE_COMPLETE_IF_OPLOCKED 0x00000100 00400 #define FILE_DELETE_ON_CLOSE 0x00001000 00401 #define FILE_OPEN_FOR_FREE_SPACE_QUERY 0x00800000 00402 00403 /* RDP5 disconnect PDU */ 00404 #define exDiscReasonNoInfo 0x0000 00405 #define exDiscReasonAPIInitiatedDisconnect 0x0001 00406 #define exDiscReasonAPIInitiatedLogoff 0x0002 00407 #define exDiscReasonServerIdleTimeout 0x0003 00408 #define exDiscReasonServerLogonTimeout 0x0004 00409 #define exDiscReasonReplacedByOtherConnection 0x0005 00410 #define exDiscReasonOutOfMemory 0x0006 00411 #define exDiscReasonServerDeniedConnection 0x0007 00412 #define exDiscReasonServerDeniedConnectionFips 0x0008 00413 #define exDiscReasonLicenseInternal 0x0100 00414 #define exDiscReasonLicenseNoLicenseServer 0x0101 00415 #define exDiscReasonLicenseNoLicense 0x0102 00416 #define exDiscReasonLicenseErrClientMsg 0x0103 00417 #define exDiscReasonLicenseHwidDoesntMatchLicense 0x0104 00418 #define exDiscReasonLicenseErrClientLicense 0x0105 00419 #define exDiscReasonLicenseCantFinishProtocol 0x0106 00420 #define exDiscReasonLicenseClientEndedProtocol 0x0107 00421 #define exDiscReasonLicenseErrClientEncryption 0x0108 00422 #define exDiscReasonLicenseCantUpgradeLicense 0x0109 00423 #define exDiscReasonLicenseNoRemoteConnections 0x010a 00424 00425 /* SeamlessRDP constants */ 00426 #define SEAMLESSRDP_NOTYETMAPPED -1 00427 #define SEAMLESSRDP_NORMAL 0 00428 #define SEAMLESSRDP_MINIMIZED 1 00429 #define SEAMLESSRDP_MAXIMIZED 2 00430 #define SEAMLESSRDP_POSITION_TIMER 200000 00431 00432 #define SEAMLESSRDP_CREATE_MODAL 0x0001 00433 00434 #define SEAMLESSRDP_HELLO_RECONNECT 0x0001 00435 #define SEAMLESSRDP_HELLO_HIDDEN 0x0002 Generated on Fri May 25 2012 04:15:27 for ReactOS by
1.7.6.1
|