GUACAMOLE-249: Remove RDP constant definitions which are defined within FreeRDP headers.

This commit is contained in:
Michael Jumper 2019-12-22 21:24:07 -08:00
parent 875d51c1ed
commit 827951dcf6
9 changed files with 14 additions and 227 deletions

View File

@ -28,6 +28,7 @@
#include "rdpdr_messages.h"
#include "rdpdr_printer.h"
#include <freerdp/channels/rdpdr.h>
#include <freerdp/freerdp.h>
#include <guacamole/client.h>
#include <guacamole/protocol.h>

View File

@ -28,6 +28,7 @@
#include "rdp_status.h"
#include "unicode.h"
#include <freerdp/channels/rdpdr.h>
#include <guacamole/client.h>
#include <winpr/stream.h>
#include <winpr/wtypes.h>

View File

@ -24,6 +24,7 @@
#include "rdpdr_fs_messages.h"
#include "rdpdr_messages.h"
#include <freerdp/channels/rdpdr.h>
#include <guacamole/client.h>
#include <guacamole/protocol.h>
#include <guacamole/socket.h>

View File

@ -23,6 +23,7 @@
#include "rdpdr_messages.h"
#include "unicode.h"
#include <freerdp/channels/rdpdr.h>
#include <guacamole/client.h>
#include <guacamole/unicode.h>
#include <winpr/stream.h>
@ -87,15 +88,15 @@ static void guac_rdpdr_send_client_capability(guac_rdp_common_svc* svc) {
Stream_Write_UINT32(output_stream, GENERAL_CAPABILITY_VERSION_02);
/* General capability data */
Stream_Write_UINT32(output_stream, GUAC_OS_TYPE); /* osType - required to be ignored */
Stream_Write_UINT32(output_stream, 0); /* osVersion */
Stream_Write_UINT16(output_stream, RDP_CLIENT_MAJOR_ALL); /* protocolMajor */
Stream_Write_UINT16(output_stream, RDP_CLIENT_MINOR_5_2); /* protocolMinor */
Stream_Write_UINT32(output_stream, 0xFFFF); /* ioCode1 */
Stream_Write_UINT32(output_stream, 0); /* ioCode2 */
Stream_Write_UINT32(output_stream, GUAC_OS_TYPE); /* osType - required to be ignored */
Stream_Write_UINT32(output_stream, 0); /* osVersion */
Stream_Write_UINT16(output_stream, 1); /* protocolMajor - must be set to 1 */
Stream_Write_UINT16(output_stream, RDPDR_MINOR_RDP_VERSION_5_2); /* protocolMinor */
Stream_Write_UINT32(output_stream, 0xFFFF); /* ioCode1 */
Stream_Write_UINT32(output_stream, 0); /* ioCode2 */
Stream_Write_UINT32(output_stream,
RDPDR_DEVICE_REMOVE_PDUS
| RDPDR_CLIENT_DISPLAY_NAME
| RDPDR_CLIENT_DISPLAY_NAME_PDU
| RDPDR_USER_LOGGEDON_PDU); /* extendedPDU */
Stream_Write_UINT32(output_stream, 0); /* extraFlags1 */
Stream_Write_UINT32(output_stream, 0); /* extraFlags2 */

View File

@ -28,36 +28,6 @@
#include <stdint.h>
/**
* Identifies the "core" component of RDPDR as the destination of the received
* packet.
*/
#define RDPDR_CTYP_CORE 0x4472
/**
* Identifies the printing component of RDPDR as the destination of the
* received packet.
*/
#define RDPDR_CTYP_PRN 0x5052
/*
* Packet IDs as required by the RDP spec (see: [MS-RDPEFS].pdf)
*/
#define PAKID_CORE_SERVER_ANNOUNCE 0x496E
#define PAKID_CORE_CLIENTID_CONFIRM 0x4343
#define PAKID_CORE_CLIENT_NAME 0x434E
#define PAKID_CORE_DEVICELIST_ANNOUNCE 0x4441
#define PAKID_CORE_DEVICE_REPLY 0x6472
#define PAKID_CORE_DEVICE_IOREQUEST 0x4952
#define PAKID_CORE_DEVICE_IOCOMPLETION 0x4943
#define PAKID_CORE_SERVER_CAPABILITY 0x5350
#define PAKID_CORE_CLIENT_CAPABILITY 0x4350
#define PAKID_CORE_DEVICELIST_REMOVE 0x444D
#define PAKID_PRN_CACHE_DATA 0x5043
#define PAKID_CORE_USER_LOGGEDON 0x554C
#define PAKID_PRN_USING_XPS 0x5543
/**
* A 32-bit arbitrary value for the osType field of certain requests. As this
* value is defined as completely arbitrary and required to be ignored by the
@ -77,128 +47,6 @@
#define GUAC_FILESYSTEM_LABEL "G\0U\0A\0C\0F\0I\0L\0E\0"
#define GUAC_FILESYSTEM_LABEL_LENGTH 16
/*
* Capability types
*/
#define CAP_GENERAL_TYPE 1
#define CAP_PRINTER_TYPE 2
#define CAP_PORT_TYPE 3
#define CAP_DRIVE_TYPE 4
#define CAP_SMARTCARD_TYPE 5
/*
* General capability header versions.
*/
#define GENERAL_CAPABILITY_VERSION_01 1
#define GENERAL_CAPABILITY_VERSION_02 2
/*
* Print capability header versions.
*/
#define PRINT_CAPABILITY_VERSION_01 1
/*
* Drive capability header versions.
*/
#define DRIVE_CAPABILITY_VERSION_01 1
#define DRIVE_CAPABILITY_VERSION_02 2
/*
* Legal client major version numbers.
*/
#define RDP_CLIENT_MAJOR_ALL 1
/*
* Legal client minor version numbers.
*/
#define RDP_CLIENT_MINOR_6_1 0xC
#define RDP_CLIENT_MINOR_5_2 0xA
#define RDP_CLIENT_MINOR_5_1 0x5
#define RDP_CLIENT_MINOR_5_0 0x2
/*
* PDU flags used by the extendedPDU field.
*/
#define RDPDR_DEVICE_REMOVE_PDUS 0x1
#define RDPDR_CLIENT_DISPLAY_NAME 0x2
#define RDPDR_USER_LOGGEDON_PDU 0x4
/*
* Device types.
*/
#define RDPDR_DTYP_SERIAL 0x00000001
#define RDPDR_DTYP_PARALLEL 0x00000002
#define RDPDR_DTYP_PRINT 0x00000004
#define RDPDR_DTYP_FILESYSTEM 0x00000008
#define RDPDR_DTYP_SMARTCARD 0x00000020
/*
* Printer flags.
*/
#define RDPDR_PRINTER_ANNOUNCE_FLAG_ASCII 0x00000001
#define RDPDR_PRINTER_ANNOUNCE_FLAG_DEFAULTPRINTER 0x00000002
#define RDPDR_PRINTER_ANNOUNCE_FLAG_NETWORKPRINTER 0x00000004
#define RDPDR_PRINTER_ANNOUNCE_FLAG_TSPRINTER 0x00000008
#define RDPDR_PRINTER_ANNOUNCE_FLAG_XPSFORMAT 0x00000010
/*
* I/O requests.
*/
#define IRP_MJ_CREATE 0x00000000
#define IRP_MJ_CLOSE 0x00000002
#define IRP_MJ_READ 0x00000003
#define IRP_MJ_WRITE 0x00000004
#define IRP_MJ_DEVICE_CONTROL 0x0000000E
#define IRP_MJ_QUERY_VOLUME_INFORMATION 0x0000000A
#define IRP_MJ_SET_VOLUME_INFORMATION 0x0000000B
#define IRP_MJ_QUERY_INFORMATION 0x00000005
#define IRP_MJ_SET_INFORMATION 0x00000006
#define IRP_MJ_DIRECTORY_CONTROL 0x0000000C
#define IRP_MJ_LOCK_CONTROL 0x00000011
#define IRP_MN_QUERY_DIRECTORY 0x00000001
#define IRP_MN_NOTIFY_CHANGE_DIRECTORY 0x00000002
/*
* Volume information constants.
*/
#define FileFsVolumeInformation 0x00000001
#define FileFsSizeInformation 0x00000003
#define FileFsDeviceInformation 0x00000004
#define FileFsAttributeInformation 0x00000005
#define FileFsFullSizeInformation 0x00000007
/*
* File information constants.
*/
#define FileBasicInformation 0x00000004
#define FileStandardInformation 0x00000005
#define FileRenameInformation 0x0000000A
#define FileDispositionInformation 0x0000000D
#define FileAllocationInformation 0x00000013
#define FileEndOfFileInformation 0x00000014
#define FileAttributeTagInformation 0x00000023
/*
* Directory information constants.
*/
#define FileDirectoryInformation 0x00000001
#define FileFullDirectoryInformation 0x00000002
#define FileBothDirectoryInformation 0x00000003
#define FileNamesInformation 0x0000000C
/*
* Message handlers.
*/

View File

@ -26,6 +26,7 @@
#include "rdp_status.h"
#include "unicode.h"
#include <freerdp/channels/rdpdr.h>
#include <guacamole/client.h>
#include <guacamole/protocol.h>
#include <guacamole/socket.h>

View File

@ -23,6 +23,7 @@
#include "rdpsnd.h"
#include "rdpsnd_messages.h"
#include <freerdp/codec/audio.h>
#include <freerdp/freerdp.h>
#include <guacamole/client.h>
#include <guacamole/client.h>

View File

@ -26,6 +26,7 @@
#include <pthread.h>
#include <stdlib.h>
#include <freerdp/codec/audio.h>
#include <guacamole/audio.h>
#include <guacamole/client.h>
#include <winpr/stream.h>

View File

@ -26,74 +26,6 @@
#include <winpr/stream.h>
/*
* PDU Message Types
*/
/**
* Close PDU
*/
#define SNDC_CLOSE 1
/**
* WaveInfo PDU. This PDU is sent just before wave data is sent.
*/
#define SNDC_WAVE 2
/**
* Wave Confirm PDU. This PDU is sent in response to the WaveInfo PDU,
* confirming it has been received and played.
*/
#define SNDC_WAVECONFIRM 5
/**
* Training PDU. This PDU is sent by the server occasionally and must be
* responded to with another training PDU, similar to Guac's sync message.
*/
#define SNDC_TRAINING 6
/**
* Server Audio Formats and Version PDU. This PDU is sent by the server to
* advertise to the client which audio formats are supported.
*/
#define SNDC_FORMATS 7
/**
* Quality Mode PDU. This PDU must be sent by the client to select an audio
* quality mode if the server is at least version 6.
*/
#define SNDC_QUALITYMODE 12
/*
* Quality Modes
*/
/**
* Dynamic Quality. The server will choose the audio quality based on its
* perception of latency.
*/
#define DYNAMIC_QUALITY 0x0000
/**
* Medium Quality. The server prioritizes bandwidth over quality.
*/
#define MEDIUM_QUALITY 0x0001
/**
* High Quality. The server prioritizes quality over bandwidth.
*/
#define HIGH_QUALITY 0x0002
/*
* Capabilities
*/
#define TSSNDCAPS_ALIVE 1
/*
* Sound Formats
*/
#define WAVE_FORMAT_PCM 1
/**
* The header common to all RDPSND PDUs.
*/