libfreerdp-core: rdpSettings refactoring (part 3)
This commit is contained in:
parent
6427c9dd90
commit
8544716104
@ -1241,7 +1241,7 @@ int freerdp_channels_post_connect(rdpChannels* channels, freerdp* instance)
|
||||
struct lib_data* llib;
|
||||
|
||||
channels->is_connected = 1;
|
||||
hostname = instance->settings->Hostname;
|
||||
hostname = instance->settings->ServerHostname;
|
||||
hostname_len = strlen(hostname);
|
||||
|
||||
DEBUG_CHANNELS("hostname [%s] channels->num_libs [%d]", Hostname, channels->num_libs_data);
|
||||
|
@ -1051,7 +1051,7 @@ BOOL mac_pre_connect(freerdp *inst)
|
||||
inst->settings->order_support[NEG_MULTIOPAQUERECT_INDEX] = FALSE;
|
||||
inst->settings->order_support[NEG_POLYLINE_INDEX] = FALSE;
|
||||
inst->settings->color_depth = 24;
|
||||
inst->settings->sw_gdi = 1;
|
||||
inst->settings->SoftwareGdi = 1;
|
||||
|
||||
// setup callbacks
|
||||
inst->update->BeginPaint = mac_begin_paint;
|
||||
|
@ -198,9 +198,9 @@ BOOL wf_pre_connect(freerdp* instance)
|
||||
|
||||
wfi->cursor = g_default_cursor;
|
||||
|
||||
wfi->fullscreen = settings->fullscreen;
|
||||
wfi->fullscreen = settings->Fullscreen;
|
||||
wfi->fs_toggle = wfi->fullscreen;
|
||||
wfi->sw_gdi = settings->sw_gdi;
|
||||
wfi->sw_gdi = settings->SoftwareGdi;
|
||||
|
||||
wfi->clrconv = (HCLRCONV) xzalloc(sizeof(CLRCONV));
|
||||
wfi->clrconv->palette = NULL;
|
||||
@ -341,12 +341,12 @@ BOOL wf_post_connect(freerdp* instance)
|
||||
wfi->nsc_context = nsc_context_new();
|
||||
}
|
||||
|
||||
if (settings->window_title != NULL)
|
||||
_snwprintf(win_title, ARRAY_SIZE(win_title), L"%S", settings->window_title);
|
||||
if (settings->WindowTitle != NULL)
|
||||
_snwprintf(win_title, ARRAY_SIZE(win_title), L"%S", settings->WindowTitle);
|
||||
else if (settings->ServerPort == 3389)
|
||||
_snwprintf(win_title, ARRAY_SIZE(win_title), L"FreeRDP: %S", settings->Hostname);
|
||||
_snwprintf(win_title, ARRAY_SIZE(win_title), L"FreeRDP: %S", settings->ServerHostname);
|
||||
else
|
||||
_snwprintf(win_title, ARRAY_SIZE(win_title), L"FreeRDP: %S:%d", settings->Hostname, settings->ServerPort);
|
||||
_snwprintf(win_title, ARRAY_SIZE(win_title), L"FreeRDP: %S:%d", settings->ServerHostname, settings->ServerPort);
|
||||
|
||||
if (wfi->hwnd == 0)
|
||||
{
|
||||
|
@ -55,23 +55,23 @@ BOOL xf_detect_monitors(xfInfo* xfi, rdpSettings* settings)
|
||||
xfi->workArea.height = HeightOfScreen(xfi->screen);
|
||||
}
|
||||
|
||||
if (settings->fullscreen)
|
||||
if (settings->Fullscreen)
|
||||
{
|
||||
settings->DesktopWidth = WidthOfScreen(xfi->screen);
|
||||
settings->DesktopHeight = HeightOfScreen(xfi->screen);
|
||||
}
|
||||
else if (settings->workarea)
|
||||
else if (settings->Workarea)
|
||||
{
|
||||
settings->DesktopWidth = xfi->workArea.width;
|
||||
settings->DesktopHeight = xfi->workArea.height;
|
||||
}
|
||||
else if (settings->percent_screen)
|
||||
else if (settings->PercentScreen)
|
||||
{
|
||||
settings->DesktopWidth = (xfi->workArea.width * settings->percent_screen) / 100;
|
||||
settings->DesktopHeight = (xfi->workArea.height * settings->percent_screen) / 100;
|
||||
settings->DesktopWidth = (xfi->workArea.width * settings->PercentScreen) / 100;
|
||||
settings->DesktopHeight = (xfi->workArea.height * settings->PercentScreen) / 100;
|
||||
}
|
||||
|
||||
if (settings->fullscreen != TRUE && settings->workarea != TRUE)
|
||||
if (settings->Fullscreen != TRUE && settings->Workarea != TRUE)
|
||||
return TRUE;
|
||||
|
||||
#ifdef WITH_XINERAMA
|
||||
|
@ -312,19 +312,19 @@ void xf_create_window(xfInfo* xfi)
|
||||
xfi->attribs.bit_gravity = NorthWestGravity;
|
||||
xfi->attribs.win_gravity = NorthWestGravity;
|
||||
|
||||
if (xfi->instance->settings->window_title != NULL)
|
||||
if (xfi->instance->settings->WindowTitle != NULL)
|
||||
{
|
||||
win_title = _strdup(xfi->instance->settings->window_title);
|
||||
win_title = _strdup(xfi->instance->settings->WindowTitle);
|
||||
}
|
||||
else if (xfi->instance->settings->ServerPort == 3389)
|
||||
{
|
||||
win_title = malloc(1 + sizeof("FreeRDP: ") + strlen(xfi->instance->settings->Hostname));
|
||||
sprintf(win_title, "FreeRDP: %s", xfi->instance->settings->Hostname);
|
||||
win_title = malloc(1 + sizeof("FreeRDP: ") + strlen(xfi->instance->settings->ServerHostname));
|
||||
sprintf(win_title, "FreeRDP: %s", xfi->instance->settings->ServerHostname);
|
||||
}
|
||||
else
|
||||
{
|
||||
win_title = malloc(1 + sizeof("FreeRDP: ") + strlen(xfi->instance->settings->Hostname) + sizeof(":00000"));
|
||||
sprintf(win_title, "FreeRDP: %s:%i", xfi->instance->settings->Hostname, xfi->instance->settings->ServerPort);
|
||||
win_title = malloc(1 + sizeof("FreeRDP: ") + strlen(xfi->instance->settings->ServerHostname) + sizeof(":00000"));
|
||||
sprintf(win_title, "FreeRDP: %s:%i", xfi->instance->settings->ServerHostname, xfi->instance->settings->ServerPort);
|
||||
}
|
||||
|
||||
xfi->window = xf_CreateDesktopWindow(xfi, win_title, width, height, xfi->decorations);
|
||||
@ -563,7 +563,7 @@ BOOL xf_pre_connect(freerdp* instance)
|
||||
settings->OrderSupport[NEG_POLYLINE_INDEX] = TRUE;
|
||||
settings->OrderSupport[NEG_MEMBLT_INDEX] = bitmap_cache;
|
||||
|
||||
settings->OrderSupport[NEG_MEM3BLT_INDEX] = (settings->sw_gdi) ? TRUE : FALSE;
|
||||
settings->OrderSupport[NEG_MEM3BLT_INDEX] = (settings->SoftwareGdi) ? TRUE : FALSE;
|
||||
|
||||
settings->OrderSupport[NEG_MEMBLT_V2_INDEX] = bitmap_cache;
|
||||
settings->OrderSupport[NEG_MEM3BLT_V2_INDEX] = FALSE;
|
||||
@ -572,15 +572,15 @@ BOOL xf_pre_connect(freerdp* instance)
|
||||
settings->OrderSupport[NEG_FAST_INDEX_INDEX] = TRUE;
|
||||
settings->OrderSupport[NEG_FAST_GLYPH_INDEX] = TRUE;
|
||||
|
||||
settings->OrderSupport[NEG_POLYGON_SC_INDEX] = (settings->sw_gdi) ? FALSE : TRUE;
|
||||
settings->OrderSupport[NEG_POLYGON_CB_INDEX] = (settings->sw_gdi) ? FALSE : TRUE;
|
||||
settings->OrderSupport[NEG_POLYGON_SC_INDEX] = (settings->SoftwareGdi) ? FALSE : TRUE;
|
||||
settings->OrderSupport[NEG_POLYGON_CB_INDEX] = (settings->SoftwareGdi) ? FALSE : TRUE;
|
||||
|
||||
settings->OrderSupport[NEG_ELLIPSE_SC_INDEX] = FALSE;
|
||||
settings->OrderSupport[NEG_ELLIPSE_CB_INDEX] = FALSE;
|
||||
|
||||
freerdp_channels_pre_connect(xfi->_context->channels, instance);
|
||||
|
||||
if (settings->authentication_only)
|
||||
if (settings->AuthenticationOnly)
|
||||
{
|
||||
/* Check --authonly has a username and password. */
|
||||
if (settings->Username == NULL )
|
||||
@ -648,14 +648,14 @@ BOOL xf_pre_connect(freerdp* instance)
|
||||
xfi->depth = DefaultDepthOfScreen(xfi->screen);
|
||||
xfi->big_endian = (ImageByteOrder(xfi->display) == MSBFirst);
|
||||
|
||||
xfi->mouse_motion = settings->mouse_motion;
|
||||
xfi->mouse_motion = settings->MouseMotion;
|
||||
xfi->complex_regions = TRUE;
|
||||
xfi->decorations = settings->decorations;
|
||||
xfi->fullscreen = settings->fullscreen;
|
||||
xfi->grab_keyboard = settings->grab_keyboard;
|
||||
xfi->decorations = settings->Decorations;
|
||||
xfi->fullscreen = settings->Fullscreen;
|
||||
xfi->grab_keyboard = settings->GrabKeyboard;
|
||||
xfi->fullscreen_toggle = TRUE;
|
||||
xfi->sw_gdi = settings->sw_gdi;
|
||||
xfi->parent_window = (Window) settings->parent_window_xid;
|
||||
xfi->sw_gdi = settings->SoftwareGdi;
|
||||
xfi->parent_window = (Window) settings->ParentWindowId;
|
||||
|
||||
xf_detect_monitors(xfi, settings);
|
||||
|
||||
@ -856,7 +856,7 @@ BOOL xf_authenticate(freerdp* instance, char** username, char** password, char**
|
||||
// But it doesn't do anything to fix it...
|
||||
*password = malloc(password_size * sizeof(char));
|
||||
|
||||
if (freerdp_passphrase_read("Password: ", *password, password_size, instance->settings->from_stdin) == NULL)
|
||||
if (freerdp_passphrase_read("Password: ", *password, password_size, instance->settings->CredentialsFromStdin) == NULL)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
@ -891,7 +891,7 @@ BOOL xf_verify_certificate(freerdp* instance, char* subject, char* issuer, char*
|
||||
if (feof(stdin))
|
||||
{
|
||||
printf("\nError: Could not read answer from stdin.");
|
||||
if (instance->settings->from_stdin)
|
||||
if (instance->settings->CredentialsFromStdin)
|
||||
printf(" - Run without parameter \"--from-stdin\" to set trust.");
|
||||
printf("\n");
|
||||
return FALSE;
|
||||
@ -1167,7 +1167,7 @@ int xfreerdp_run(freerdp* instance)
|
||||
|
||||
BOOL status = freerdp_connect(instance);
|
||||
/* Connection succeeded. --authonly ? */
|
||||
if (instance->settings->authentication_only) {
|
||||
if (instance->settings->AuthenticationOnly) {
|
||||
freerdp_disconnect(instance);
|
||||
fprintf(stderr, "%s:%d: Authentication only, exit status %d\n", __FILE__, __LINE__, !status);
|
||||
exit(!status);
|
||||
@ -1369,7 +1369,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
instance->context->argc = argc;
|
||||
instance->context->argv = argv;
|
||||
instance->settings->sw_gdi = FALSE;
|
||||
instance->settings->SoftwareGdi = FALSE;
|
||||
|
||||
data = (struct thread_data*) xzalloc(sizeof(struct thread_data));
|
||||
data->instance = instance;
|
||||
|
@ -244,13 +244,13 @@ int freerdp_client_parse_command_line_arguments(int argc, char** argv, rdpSettin
|
||||
{
|
||||
length = p - arg->Value;
|
||||
settings->ServerPort = atoi(&p[1]);
|
||||
settings->Hostname = (char*) malloc(length + 1);
|
||||
strncpy(settings->Hostname, arg->Value, length);
|
||||
settings->Hostname[length] = '\0';
|
||||
settings->ServerHostname = (char*) malloc(length + 1);
|
||||
strncpy(settings->ServerHostname, arg->Value, length);
|
||||
settings->ServerHostname[length] = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
settings->Hostname = _strdup(arg->Value);
|
||||
settings->ServerHostname = _strdup(arg->Value);
|
||||
}
|
||||
}
|
||||
CommandLineSwitchCase(arg, "port")
|
||||
@ -282,19 +282,19 @@ int freerdp_client_parse_command_line_arguments(int argc, char** argv, rdpSettin
|
||||
}
|
||||
CommandLineSwitchCase(arg, "f")
|
||||
{
|
||||
settings->fullscreen = TRUE;
|
||||
settings->Fullscreen = TRUE;
|
||||
}
|
||||
CommandLineSwitchCase(arg, "workarea")
|
||||
{
|
||||
settings->workarea = TRUE;
|
||||
settings->Workarea = TRUE;
|
||||
}
|
||||
CommandLineSwitchCase(arg, "t")
|
||||
{
|
||||
settings->window_title = _strdup(arg->Value);
|
||||
settings->WindowTitle = _strdup(arg->Value);
|
||||
}
|
||||
CommandLineSwitchCase(arg, "decorations")
|
||||
{
|
||||
settings->decorations = arg->Value ? TRUE : FALSE;
|
||||
settings->Decorations = arg->Value ? TRUE : FALSE;
|
||||
}
|
||||
CommandLineSwitchCase(arg, "bpp")
|
||||
{
|
||||
@ -381,7 +381,7 @@ int freerdp_client_parse_command_line_arguments(int argc, char** argv, rdpSettin
|
||||
}
|
||||
CommandLineSwitchCase(arg, "z")
|
||||
{
|
||||
settings->compression = arg->Value ? TRUE : FALSE;
|
||||
settings->CompressionEnabled = arg->Value ? TRUE : FALSE;
|
||||
}
|
||||
CommandLineSwitchCase(arg, "shell")
|
||||
{
|
||||
@ -418,17 +418,17 @@ int freerdp_client_parse_command_line_arguments(int argc, char** argv, rdpSettin
|
||||
CommandLineSwitchCase(arg, "gdi")
|
||||
{
|
||||
if (strcmp(arg->Value, "sw") == 0)
|
||||
settings->sw_gdi = TRUE;
|
||||
settings->SoftwareGdi = TRUE;
|
||||
else if (strcmp(arg->Value, "hw") == 0)
|
||||
settings->sw_gdi = FALSE;
|
||||
settings->SoftwareGdi = FALSE;
|
||||
}
|
||||
CommandLineSwitchCase(arg, "rfx")
|
||||
{
|
||||
settings->RemoteFxCodec = TRUE;
|
||||
settings->FastpathOutput = TRUE;
|
||||
settings->FastPathOutput = TRUE;
|
||||
settings->ColorDepth = 32;
|
||||
settings->PerformanceFlags = PERF_FLAG_NONE;
|
||||
settings->LargePointer = TRUE;
|
||||
settings->LargePointerFlag = TRUE;
|
||||
}
|
||||
CommandLineSwitchCase(arg, "rfx-mode")
|
||||
{
|
||||
|
@ -508,7 +508,7 @@ BOOL freerdp_client_populate_settings_from_rdp_file(rdpFile* file, rdpSettings*
|
||||
if (~file->ServerPort)
|
||||
settings->ServerPort = file->ServerPort;
|
||||
if (~((size_t) file->FullAddress))
|
||||
settings->Hostname = file->FullAddress;
|
||||
settings->ServerHostname = file->FullAddress;
|
||||
if (~file->DesktopWidth)
|
||||
settings->DesktopWidth = file->DesktopWidth;
|
||||
if (~file->DesktopHeight)
|
||||
|
@ -3,6 +3,7 @@
|
||||
* RDP Settings
|
||||
*
|
||||
* Copyright 2009-2011 Jay Sorg
|
||||
* Copyright 2010-2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@ -277,159 +278,248 @@ struct rdp_settings
|
||||
ALIGN64 void* instance; /* 0 */
|
||||
UINT64 padding001[16 - 1]; /* 1 */
|
||||
|
||||
/* Core Protocol Parameters */
|
||||
ALIGN64 UINT32 RdpVersion; /* 16 */
|
||||
ALIGN64 UINT32 DesktopWidth; /* 17 */
|
||||
ALIGN64 UINT32 DesktopHeight; /* 18 */
|
||||
ALIGN64 UINT32 ColorDepth; /* 19 */
|
||||
ALIGN64 UINT32 KeyboardLayout; /* 20 */
|
||||
ALIGN64 UINT32 KeyboardType; /* 21 */
|
||||
ALIGN64 UINT32 KeyboardSubType; /* 22 */
|
||||
ALIGN64 UINT32 KeyboardFunctionKey; /* 23 */
|
||||
ALIGN64 char* ImeFileName; /* 24 */
|
||||
ALIGN64 UINT32 ClientBuild; /* 25 */
|
||||
ALIGN64 char* ClientName; /* 26 */
|
||||
ALIGN64 char* ClientDigProductId; /* 27 */
|
||||
/**
|
||||
* Section: Core
|
||||
*/
|
||||
|
||||
/* Protocol Security Negotiation */
|
||||
ALIGN64 UINT32 RequestedProtocols; /* 28 */
|
||||
ALIGN64 UINT32 SelectedProtocol; /* 29 */
|
||||
ALIGN64 UINT32 EncryptionMethod; /* 30 */
|
||||
ALIGN64 UINT32 EncryptionLevel; /* 31 */
|
||||
ALIGN64 BOOL Authentication; /* 32 */
|
||||
ALIGN64 UINT32 NegotiationFlags; /* 33 */
|
||||
ALIGN64 BOOL NegotiateSecurityLayer; /* 34 */
|
||||
UINT64 padding002[48 - 35]; /* 35 */
|
||||
/* Core Parameters */
|
||||
ALIGN64 BOOL ServerMode; /* 16 */
|
||||
ALIGN64 UINT32 ShareId; /* 17 */
|
||||
ALIGN64 UINT32 PduSource; /* 18 */
|
||||
ALIGN64 UINT32 RdpVersion; /* 19 */
|
||||
ALIGN64 UINT32 DesktopWidth; /* 20 */
|
||||
ALIGN64 UINT32 DesktopHeight; /* 21 */
|
||||
ALIGN64 UINT32 ColorDepth; /* 22 */
|
||||
ALIGN64 UINT32 ClientBuild; /* 28 */
|
||||
ALIGN64 char* ClientName; /* 29 */
|
||||
ALIGN64 char* ClientDigProductId; /* 30 */
|
||||
UINT64 padding0064[64 - 31]; /* 31 */
|
||||
|
||||
/* Connection Settings */
|
||||
ALIGN64 BOOL IPv6; /* 48 */
|
||||
ALIGN64 UINT32 ServerPort; /* 49 */
|
||||
ALIGN64 char* Hostname; /* 50 */
|
||||
ALIGN64 char* Username; /* 51 */
|
||||
ALIGN64 char* Password; /* 52 */
|
||||
ALIGN64 char* Domain; /* 53 */
|
||||
/* Server Info */
|
||||
ALIGN64 UINT32 ServerPort; /* 65 */
|
||||
ALIGN64 char* ServerHostname; /* 66 */
|
||||
|
||||
/* Client Info */
|
||||
ALIGN64 char* Username; /* 67 */
|
||||
ALIGN64 char* Password; /* 68 */
|
||||
ALIGN64 char* Domain; /* 69 */
|
||||
ALIGN64 char* AlternateShell; /* 54 */
|
||||
ALIGN64 char* ShellWorkingDirectory; /* 55 */
|
||||
ALIGN64 char* ip_address; /* 56 */
|
||||
ALIGN64 char* client_dir; /* 57 */
|
||||
ALIGN64 BOOL autologon; /* 58 */
|
||||
ALIGN64 BOOL compression; /* 59 */
|
||||
ALIGN64 BYTE* Password51; /* 60 */
|
||||
ALIGN64 DWORD Password51Length; /* 61 */
|
||||
ALIGN64 BYTE* PasswordCookie; /* 62 */
|
||||
ALIGN64 DWORD PasswordCookieLength; /* 63 */
|
||||
ALIGN64 char* kerberos_kdc; /* 64 */
|
||||
ALIGN64 char* kerberos_realm; /* 65 */
|
||||
UINT64 padding0128[128 - 70]; /* 70 */
|
||||
|
||||
ALIGN64 BOOL local; /* 69 */
|
||||
ALIGN64 BOOL authentication_only; /* 70 */
|
||||
ALIGN64 BOOL from_stdin; /* 71 */
|
||||
ALIGN64 BOOL SendPreconnectionPdu; /* 72 */
|
||||
ALIGN64 UINT32 PreconnectionId; /* 73 */
|
||||
ALIGN64 char* PreconnectionBlob; /* 74 */
|
||||
ALIGN64 char* ComputerName; /* 75 */
|
||||
ALIGN64 char* ConnectionFile; /* 76 */
|
||||
UINT64 padding003[80 - 77]; /* 77 */
|
||||
|
||||
/* User Interface Parameters */
|
||||
ALIGN64 BOOL sw_gdi; /* 80 */
|
||||
ALIGN64 BOOL workarea; /* 81 */
|
||||
ALIGN64 BOOL fullscreen; /* 82 */
|
||||
ALIGN64 BOOL grab_keyboard; /* 83 */
|
||||
ALIGN64 BOOL decorations; /* 84 */
|
||||
ALIGN64 UINT32 percent_screen; /* 85 */
|
||||
ALIGN64 BOOL mouse_motion; /* 86 */
|
||||
ALIGN64 char* window_title; /* 87 */
|
||||
ALIGN64 UINT64 parent_window_xid; /* 88 */
|
||||
UINT64 padding004[112 - 89]; /* 89 */
|
||||
|
||||
/* Internal Parameters */
|
||||
ALIGN64 char* home_path; /* 112 */
|
||||
ALIGN64 UINT32 share_id; /* 113 */
|
||||
ALIGN64 UINT32 pdu_source; /* 114 */
|
||||
ALIGN64 BOOL server_mode; /* 116 */
|
||||
ALIGN64 char* config_path; /* 117 */
|
||||
ALIGN64 char* current_path; /* 118 */
|
||||
ALIGN64 char* development_path; /* 119 */
|
||||
ALIGN64 BOOL development_mode; /* 120 */
|
||||
UINT64 padding005[144 - 121]; /* 121 */
|
||||
|
||||
/* Security */
|
||||
ALIGN64 BOOL Encryption; /* 144 */
|
||||
ALIGN64 BOOL TlsSecurity; /* 145 */
|
||||
ALIGN64 BOOL NlaSecurity; /* 146 */
|
||||
ALIGN64 BOOL RdpSecurity; /* 147 */
|
||||
ALIGN64 BOOL ExtSecurity; /* 148 */
|
||||
ALIGN64 BOOL SaltedChecksum; /* 149 */
|
||||
ALIGN64 BOOL MstscCookieMode; /* 150 */
|
||||
ALIGN64 UINT32 CookieMaxLength; /* 151 */
|
||||
UINT64 padding006[160 - 152]; /* 152 */
|
||||
|
||||
/* Session */
|
||||
ALIGN64 BOOL ConsoleAudio; /* 160 */
|
||||
ALIGN64 BOOL ConsoleSession; /* 161 */
|
||||
ALIGN64 UINT32 RedirectedSessionId; /* 162 */
|
||||
/* Client Info Flags */
|
||||
ALIGN64 BOOL AutoLogonEnabled; /* 58 */
|
||||
ALIGN64 BOOL CompressionEnabled; /* 59 */
|
||||
ALIGN64 BOOL DisableCtrlAltDel;
|
||||
ALIGN64 BOOL EnableWindowsKey;
|
||||
ALIGN64 BOOL MaximizeShell;
|
||||
ALIGN64 BOOL LogonNotify;
|
||||
ALIGN64 BOOL LogonErrors;
|
||||
ALIGN64 BOOL MouseAttached;
|
||||
ALIGN64 BOOL MouseHasWheel;
|
||||
ALIGN64 BOOL RemoteConsoleAudio;
|
||||
ALIGN64 BOOL AudioPlayback; /* 163 */
|
||||
ALIGN64 BOOL AudioCapture; /* 164 */
|
||||
UINT64 padding007[176 - 165]; /* 165 */
|
||||
ALIGN64 BOOL VideoDisable; /* 164 */
|
||||
ALIGN64 BOOL PasswordIsSmartcardPin;
|
||||
ALIGN64 BOOL UsingSavedCredentials;
|
||||
ALIGN64 BOOL ForceEncryptedCsPdu;
|
||||
|
||||
/* Output Control */
|
||||
ALIGN64 BOOL RefreshRect; /* 176 */
|
||||
ALIGN64 BOOL SuppressOutput; /* 177 */
|
||||
ALIGN64 BOOL DesktopResize; /* 178 */
|
||||
UINT64 padding008[192 - 179]; /* 179 */
|
||||
/* Client Info (Extra) */
|
||||
ALIGN64 BOOL IPv6Enabled; /* 64 */
|
||||
ALIGN64 char* ClientAddress; /* 56 */
|
||||
ALIGN64 char* ClientDir; /* 57 */
|
||||
|
||||
/* Client Info (Time Zone) */
|
||||
ALIGN64 TIME_ZONE_INFO* ClientTimeZone; /* 208 */
|
||||
ALIGN64 char* DynamicDSTTimeZoneKeyName; /* */
|
||||
ALIGN64 BOOL DynamicDaylightTimeDisabled; /* */
|
||||
|
||||
/* Reconnection */
|
||||
ALIGN64 BOOL AutoReconnectionEnabled; /* 192 */
|
||||
ALIGN64 UINT32 AutoReconnectMaxRetries; /* 193 */
|
||||
ALIGN64 ARC_CS_PRIVATE_PACKET* ClientAutoReconnectCookie; /* 194 */
|
||||
ALIGN64 ARC_SC_PRIVATE_PACKET* ServerAutoReconnectCookie; /* 195 */
|
||||
UINT64 padding009[208 - 196]; /* 196 */
|
||||
ALIGN64 BYTE* ReceivedCapabilities; /* 224 */
|
||||
ALIGN64 BOOL AutoReconnectionEnabled; /* 768 */
|
||||
ALIGN64 UINT32 AutoReconnectMaxRetries; /* 769 */
|
||||
ALIGN64 ARC_CS_PRIVATE_PACKET* ClientAutoReconnectCookie; /* 770 */
|
||||
ALIGN64 ARC_SC_PRIVATE_PACKET* ServerAutoReconnectCookie; /* 771 */
|
||||
ALIGN64 BYTE* PasswordCookie; /* 772 */
|
||||
ALIGN64 DWORD PasswordCookieLength; /* 773 */
|
||||
ALIGN64 BYTE* Password51; /* 774 */
|
||||
ALIGN64 DWORD Password51Length; /* 775 */
|
||||
UINT64 padding0832[832 - 776]; /* 776 */
|
||||
|
||||
/* Time Zone */
|
||||
ALIGN64 TIME_ZONE_INFO* ClientTimeZone; /* 208 */
|
||||
UINT64 padding010[216 - 209]; /* 209 */
|
||||
/* Performance Flags */
|
||||
ALIGN64 UINT32 PerformanceFlags; /* 128 */
|
||||
ALIGN64 UINT32 ConnectionType; /* 129 */
|
||||
ALIGN64 BOOL AllowFontSmoothing; /* 130 */
|
||||
ALIGN64 BOOL DisableWallpaper; /* 131 */
|
||||
ALIGN64 BOOL DisableFullWindowDrag; /* 132 */
|
||||
ALIGN64 BOOL DisableMenuAnims; /* 133 */
|
||||
ALIGN64 BOOL DisableThemes; /* 134 */
|
||||
ALIGN64 BOOL DisableCursorShadow; /* 135 */
|
||||
ALIGN64 BOOL DisableCursorBlinking; /* 136 */
|
||||
ALIGN64 BOOL AllowDesktopComposition; /* 137 */
|
||||
UINT64 padding0192[192 - 138]; /* 138 */
|
||||
|
||||
/* Capabilities */
|
||||
/* Protocol Security */
|
||||
ALIGN64 BOOL TlsSecurity; /* 192 */
|
||||
ALIGN64 BOOL NlaSecurity; /* 193 */
|
||||
ALIGN64 BOOL RdpSecurity; /* 194 */
|
||||
ALIGN64 BOOL ExtSecurity; /* 195 */
|
||||
ALIGN64 BOOL Encryption; /* 196 */
|
||||
ALIGN64 BOOL Authentication; /* 197 */
|
||||
UINT64 padding0256[256 - 198]; /* 198 */
|
||||
|
||||
/* Connection Cookie */
|
||||
ALIGN64 BOOL MstscCookieMode; /* 256 */
|
||||
ALIGN64 UINT32 CookieMaxLength; /* 257 */
|
||||
ALIGN64 UINT32 PreconnectionId; /* 258 */
|
||||
ALIGN64 char* PreconnectionBlob; /* 259 */
|
||||
ALIGN64 BOOL SendPreconnectionPdu; /* 260 */
|
||||
UINT64 padding0320[320 - 261]; /* 261 */
|
||||
|
||||
/* Protocol Security Negotiation */
|
||||
ALIGN64 UINT32 RequestedProtocols; /* 320 */
|
||||
ALIGN64 UINT32 SelectedProtocol; /* 321 */
|
||||
ALIGN64 UINT32 EncryptionMethod; /* 322 */
|
||||
ALIGN64 UINT32 EncryptionLevel; /* 323 */
|
||||
ALIGN64 UINT32 NegotiationFlags; /* 324 */
|
||||
ALIGN64 BOOL NegotiateSecurityLayer; /* 325 */
|
||||
UINT64 padding0384[384 - 326]; /* 326 */
|
||||
|
||||
UINT64 padding0448[448 - 384]; /* 384 */
|
||||
UINT64 padding0512[512 - 448]; /* 448 */
|
||||
|
||||
/**
|
||||
* Section: Gateway
|
||||
*/
|
||||
|
||||
/* Gateway */
|
||||
ALIGN64 BOOL GatewayUsageMethod; /* 512 */
|
||||
ALIGN64 UINT32 GatewayPort; /* 513 */
|
||||
ALIGN64 char* GatewayHostname; /* 514 */
|
||||
ALIGN64 char* GatewayUsername; /* 515 */
|
||||
ALIGN64 char* GatewayPassword; /* 516 */
|
||||
ALIGN64 char* GatewayDomain; /* 517 */
|
||||
ALIGN64 UINT32 GatewayCredentialsSource; /* 518 */
|
||||
ALIGN64 BOOL GatewayUseSameCredentials; /* 519 */
|
||||
UINT64 padding0576[576 - 520]; /* 520 */
|
||||
|
||||
UINT64 padding0640[640 - 576]; /* 576 */
|
||||
|
||||
/**
|
||||
* Section: RemoteApp
|
||||
*/
|
||||
|
||||
/* RemoteApp */
|
||||
ALIGN64 BOOL RemoteApplicationMode; /* 640 */
|
||||
ALIGN64 char* RemoteApplicationName; /* 641 */
|
||||
ALIGN64 char* RemoteApplicationIcon; /* 642 */
|
||||
ALIGN64 char* RemoteApplicationProgram; /* 643 */
|
||||
ALIGN64 char* RemoteApplicationFile; /* 644 */
|
||||
ALIGN64 char* RemoteApplicationCmdLine; /* 645 */
|
||||
ALIGN64 DWORD RemoteApplicationExpandCmdLine; /* 646 */
|
||||
ALIGN64 DWORD RemoteApplicationExpandWorkingDir; /* 647 */
|
||||
ALIGN64 DWORD DisableRemoteAppCapsCheck; /* 648 */
|
||||
ALIGN64 UINT32 RemoteAppNumIconCaches; /* 649 */
|
||||
ALIGN64 UINT32 RemoteAppNumIconCacheEntries; /* 650 */
|
||||
ALIGN64 BOOL RemoteAppLanguageBarSupported; /* 651 */
|
||||
UINT64 padding0704[704 - 652]; /* 652 */
|
||||
|
||||
UINT64 padding0768[768 - 704]; /* 704 */
|
||||
|
||||
/**
|
||||
* Section: Mandatory Capabilities
|
||||
*/
|
||||
|
||||
/* General Capabilities */
|
||||
ALIGN64 UINT32 OsMajorType; /* 216 */
|
||||
ALIGN64 UINT32 OsMinorType; /* 217 */
|
||||
ALIGN64 UINT32 VirtualChannelChunkSize; /* 218 */
|
||||
ALIGN64 BOOL SoundBeepsEnabled; /* 219 */
|
||||
ALIGN64 BOOL FrameMarkerEnabled; /* 221 */
|
||||
ALIGN64 BOOL FastpathInput; /* 222 */
|
||||
ALIGN64 BOOL FastpathOutput; /* 223 */
|
||||
ALIGN64 BYTE* ReceivedCapabilities; /* 224 */
|
||||
ALIGN64 BOOL RefreshRect; /* 176 */
|
||||
ALIGN64 BOOL SuppressOutput; /* 177 */
|
||||
ALIGN64 BOOL FastPathOutput; /* 223 */
|
||||
ALIGN64 BOOL SaltedChecksum; /* 197 */
|
||||
ALIGN64 BOOL LongCredentialsSupported; /* 197 */
|
||||
ALIGN64 BOOL NoBitmapCompressionHeader; /* 197 */
|
||||
|
||||
/* Bitmap Capabilities */
|
||||
ALIGN64 BOOL DesktopResize; /* 178 */
|
||||
ALIGN64 BOOL DrawAllowDynamicColorFidelity; /* */
|
||||
ALIGN64 BOOL DrawAllowColorSubsampling; /* */
|
||||
ALIGN64 BOOL DrawAllowSkipAlpha; /* */
|
||||
|
||||
/* Order Capabilities */
|
||||
ALIGN64 BYTE* OrderSupport; /* 225 */
|
||||
ALIGN64 BOOL AltSecFrameMarkerSupport; /* 221 */
|
||||
|
||||
/* Bitmap Cache Capabilities */
|
||||
ALIGN64 UINT32 BitmapCacheVersion; /* 328 */
|
||||
ALIGN64 BOOL BitmapCacheEnabled; /* 328 */
|
||||
ALIGN64 BOOL AllowCacheWaitingList; /* 333 */
|
||||
ALIGN64 BOOL BitmapCachePersistEnabled; /* 330 */
|
||||
ALIGN64 UINT32 BitmapCacheV2NumCells; /* 331 */
|
||||
ALIGN64 BITMAP_CACHE_V2_CELL_INFO* BitmapCacheV2CellInfo; /* 332 */
|
||||
UINT64 padding017[344 - 334]; /* 334 */
|
||||
|
||||
/* Pointer Capabilities */
|
||||
ALIGN64 BOOL ColorPointerFlag; /* 321 */
|
||||
ALIGN64 UINT32 PointerCacheSize; /* 322 */
|
||||
UINT64 padding016[328 - 323]; /* 323 */
|
||||
|
||||
/* Input Capabilities */
|
||||
ALIGN64 UINT32 KeyboardLayout; /* */
|
||||
ALIGN64 UINT32 KeyboardType; /* */
|
||||
ALIGN64 UINT32 KeyboardSubType; /* */
|
||||
ALIGN64 UINT32 KeyboardFunctionKey; /* */
|
||||
ALIGN64 char* ImeFileName; /* */
|
||||
ALIGN64 BOOL UnicodeInput; /* */
|
||||
ALIGN64 BOOL FastPathInput; /* */
|
||||
|
||||
/* Brush Capabilities */
|
||||
ALIGN64 UINT32 BrushSupportLevel; /* */
|
||||
|
||||
/* Glyph Cache Capabilities */
|
||||
ALIGN64 UINT32 GlyphSupportLevel; /* */
|
||||
ALIGN64 GLYPH_CACHE_DEFINITION* GlyphCache; /* */
|
||||
ALIGN64 GLYPH_CACHE_DEFINITION* FragCache; /* */
|
||||
|
||||
/* Offscreen Bitmap Cache */
|
||||
ALIGN64 UINT32 OffscreenSupportLevel; /* */
|
||||
ALIGN64 UINT32 OffscreenCacheSize; /* */
|
||||
ALIGN64 UINT32 OffscreenCacheEntries; /* */
|
||||
|
||||
/* Virtual Channel Capabilities */
|
||||
ALIGN64 UINT32 VirtualChannelCompressionFlags; /* */
|
||||
ALIGN64 UINT32 VirtualChannelChunkSize; /* */
|
||||
|
||||
/* Sound Capabilities */
|
||||
ALIGN64 BOOL SoundBeepsEnabled; /* 219 */
|
||||
|
||||
/**
|
||||
* Section: Optional Capabilities
|
||||
*/
|
||||
|
||||
/* Bitmap Cache Host Capabilities */
|
||||
|
||||
/* Control Capabilities */
|
||||
|
||||
/* Window Activation Capabilities */
|
||||
|
||||
/* Font Capabilities */
|
||||
|
||||
/* Multifragment Update Capabilities */
|
||||
ALIGN64 UINT32 MultifragMaxRequestSize; /* */
|
||||
|
||||
/* Large Pointer Update Capabilities */
|
||||
ALIGN64 UINT32 LargePointerFlag; /* */
|
||||
|
||||
/* Desktop Composition Capabilities */
|
||||
ALIGN64 UINT32 CompDeskSupportLevel; /* */
|
||||
|
||||
/* Surface Commands Capabilities */
|
||||
ALIGN64 BOOL SurfaceCommandsEnabled; /* 226 */
|
||||
ALIGN64 UINT32 MultifragMaxRequestSize; /* 227 */
|
||||
ALIGN64 BOOL FrameMarkerCommandEnabled; /* 226 */
|
||||
|
||||
ALIGN64 UINT32 PerformanceFlags; /* 220 */
|
||||
ALIGN64 UINT32 ConnectionType; /* 221 */
|
||||
ALIGN64 BOOL AllowFontSmoothing; /* 222 */
|
||||
ALIGN64 BOOL DisableWallpaper; /* 222 */
|
||||
ALIGN64 BOOL DisableFullWindowDrag; /* 228 */
|
||||
ALIGN64 BOOL DisableMenuAnims; /* 229 */
|
||||
ALIGN64 BOOL DisableThemes; /* 230 */
|
||||
ALIGN64 BOOL DisableCursorShadow; /* 231 */
|
||||
ALIGN64 BOOL DisableCursorBlinking; /* 232 */
|
||||
ALIGN64 BOOL AllowDesktopComposition; /* 233 */
|
||||
UINT64 padding011[248 - 233]; /* 235 */
|
||||
|
||||
/* Certificate */
|
||||
ALIGN64 char* CertificateFile; /* 248 */
|
||||
ALIGN64 char* PrivateKeyFile; /* 249 */
|
||||
ALIGN64 char* ClientHostname; /* 250 */
|
||||
ALIGN64 char* ClientProductId; /* 251 */
|
||||
ALIGN64 BYTE* ServerRandom; /* 252 */
|
||||
ALIGN64 DWORD ServerRandomLength; /* 253 */
|
||||
ALIGN64 BYTE* ServerCertificate; /* 254 */
|
||||
ALIGN64 DWORD ServerCertificateLength; /* 255 */
|
||||
ALIGN64 BOOL IgnoreCertificate; /* 256 */
|
||||
ALIGN64 rdpCertificate* ServerCert; /* 257 */
|
||||
ALIGN64 char* RdpKeyFile; /* 258 */
|
||||
ALIGN64 rdpKey* ServerKey; /* 259 */
|
||||
ALIGN64 char* CertificateName; /* 260 */
|
||||
UINT64 padding012[280 - 261]; /* 261 */
|
||||
/* Bitmap Codecs Capabilities */
|
||||
|
||||
/* RemoteFX */
|
||||
ALIGN64 BOOL RemoteFxOnly; /* 290 */
|
||||
@ -446,61 +536,65 @@ struct rdp_settings
|
||||
ALIGN64 BOOL JpegCodec; /* 286 */
|
||||
ALIGN64 UINT32 JpegCodecId; /* 287 */
|
||||
ALIGN64 UINT32 JpegQuality; /* 288 */
|
||||
|
||||
UINT64 padding013[296 - 291]; /* 291 */
|
||||
|
||||
/* Recording */
|
||||
ALIGN64 BOOL DumpRemoteFx; /* 296 */
|
||||
ALIGN64 BOOL PlayRemoteFx; /* 297 */
|
||||
ALIGN64 char* DumpRemoteFxFile; /* 298 */
|
||||
ALIGN64 char* PlayRemoteFxFile; /* 299 */
|
||||
UINT64 padding014[312 - 300]; /* 300 */
|
||||
/* Session */
|
||||
ALIGN64 BOOL ConsoleSession; /* 161 */
|
||||
ALIGN64 UINT32 RedirectedSessionId; /* 162 */
|
||||
UINT64 padding007[176 - 165]; /* 165 */
|
||||
|
||||
/* RemoteApp */
|
||||
ALIGN64 BOOL RemoteApplicationMode; /* 312 */
|
||||
ALIGN64 char* RemoteApplicationName;
|
||||
ALIGN64 char* RemoteApplicationIcon;
|
||||
ALIGN64 char* RemoteApplicationProgram;
|
||||
ALIGN64 char* RemoteApplicationFile;
|
||||
ALIGN64 char* RemoteApplicationCmdLine;
|
||||
ALIGN64 DWORD RemoteApplicationExpandCmdLine;
|
||||
ALIGN64 DWORD RemoteApplicationExpandWorkingDir;
|
||||
ALIGN64 DWORD DisableRemoteAppCapsCheck;
|
||||
ALIGN64 UINT32 RemoteAppNumIconCaches; /* 313 */
|
||||
ALIGN64 UINT32 RemoteAppNumIconCacheEntries; /* 314 */
|
||||
ALIGN64 BOOL RemoteAppLanguageBarSupported; /* 315 */
|
||||
UINT64 padding015[320 - 316]; /* 316 */
|
||||
/* Kerberos Authentication */
|
||||
ALIGN64 char* KerberosKdc; /* 64 */
|
||||
ALIGN64 char* KerberosRealm; /* 65 */
|
||||
|
||||
/* Pointer */
|
||||
ALIGN64 BOOL LargePointer; /* 320 */
|
||||
ALIGN64 BOOL ColorPointer; /* 321 */
|
||||
ALIGN64 UINT32 PointerCacheSize; /* 322 */
|
||||
UINT64 padding016[328 - 323]; /* 323 */
|
||||
/* Certificate */
|
||||
ALIGN64 char* ClientHostname; /* 250 */
|
||||
ALIGN64 char* ClientProductId; /* 251 */
|
||||
ALIGN64 BYTE* ServerRandom; /* 252 */
|
||||
ALIGN64 DWORD ServerRandomLength; /* 253 */
|
||||
ALIGN64 BYTE* ServerCertificate; /* 254 */
|
||||
ALIGN64 DWORD ServerCertificateLength; /* 255 */
|
||||
ALIGN64 BOOL IgnoreCertificate; /* 256 */
|
||||
ALIGN64 char* CertificateName; /* 260 */
|
||||
|
||||
/* Bitmap Cache */
|
||||
ALIGN64 BOOL BitmapCacheEnabled; /* 328 */
|
||||
ALIGN64 BOOL AllowCacheWaitingList; /* 333 */
|
||||
ALIGN64 BOOL BitmapCachePersistEnabled; /* 330 */
|
||||
ALIGN64 UINT32 BitmapCacheV2NumCells; /* 331 */
|
||||
ALIGN64 BITMAP_CACHE_V2_CELL_INFO* BitmapCacheV2CellInfo; /* 332 */
|
||||
UINT64 padding017[344 - 334]; /* 334 */
|
||||
ALIGN64 char* CertificateFile; /* 248 */
|
||||
ALIGN64 char* PrivateKeyFile; /* 249 */
|
||||
ALIGN64 rdpCertificate* ServerCert; /* 257 */
|
||||
ALIGN64 char* RdpKeyFile; /* 258 */
|
||||
ALIGN64 rdpKey* ServerKey; /* 259 */
|
||||
|
||||
ALIGN64 BOOL LocalConnection; /* 69 */
|
||||
ALIGN64 BOOL AuthenticationOnly; /* 70 */
|
||||
ALIGN64 BOOL CredentialsFromStdin; /* 71 */
|
||||
ALIGN64 char* ComputerName; /* 75 */
|
||||
ALIGN64 char* ConnectionFile; /* 76 */
|
||||
|
||||
/* User Interface Parameters */
|
||||
ALIGN64 BOOL SoftwareGdi; /* 80 */
|
||||
ALIGN64 BOOL Workarea; /* 81 */
|
||||
ALIGN64 BOOL Fullscreen; /* 82 */
|
||||
ALIGN64 BOOL GrabKeyboard; /* 83 */
|
||||
ALIGN64 BOOL Decorations; /* 84 */
|
||||
ALIGN64 UINT32 PercentScreen; /* 85 */
|
||||
ALIGN64 BOOL MouseMotion; /* 86 */
|
||||
ALIGN64 char* WindowTitle; /* 87 */
|
||||
ALIGN64 UINT64 ParentWindowId; /* 88 */
|
||||
UINT64 padding004[112 - 89]; /* 89 */
|
||||
|
||||
/* Paths */
|
||||
ALIGN64 char* HomePath; /* 112 */
|
||||
ALIGN64 char* ConfigPath; /* 117 */
|
||||
ALIGN64 char* CurrentPath; /* 118 */
|
||||
UINT64 padding005[144 - 121]; /* 121 */
|
||||
|
||||
/**
|
||||
* Section: Caches
|
||||
*/
|
||||
|
||||
/* Bitmap Cache V3 */
|
||||
ALIGN64 BOOL BitmapCacheV3Enabled; /* 329 */
|
||||
ALIGN64 UINT32 BitmapCacheV3CodecId; /* 289 */
|
||||
|
||||
/* Offscreen Bitmap Cache */
|
||||
ALIGN64 BOOL OffscreenBitmapCacheEnabled; /* 344 */
|
||||
ALIGN64 UINT32 OffscreenBitmapCacheSize; /* 345 */
|
||||
ALIGN64 UINT32 OffscreenBitmapCacheEntries; /* 346 */
|
||||
UINT64 padding018[352 - 347]; /* 347 */
|
||||
|
||||
/* Glyph Cache */
|
||||
ALIGN64 UINT32 GlyphSupportLevel; /* 353 */
|
||||
ALIGN64 GLYPH_CACHE_DEFINITION* GlyphCache; /* 354 */
|
||||
ALIGN64 GLYPH_CACHE_DEFINITION* FragCache; /* 355 */
|
||||
UINT64 padding019[360 - 356]; /* 356 */
|
||||
|
||||
/* Draw Nine Grid */
|
||||
ALIGN64 BOOL DrawNineGridEnabled; /* 360 */
|
||||
ALIGN64 UINT32 DrawNineGridCacheSize; /* 361 */
|
||||
@ -512,19 +606,9 @@ struct rdp_settings
|
||||
ALIGN64 BOOL DrawGdiPlusCacheEnabled; /* 369 */
|
||||
UINT64 padding021[376 - 370]; /* 370 */
|
||||
|
||||
/* Desktop Composition */
|
||||
UINT64 padding022[384 - 377]; /* 377 */
|
||||
|
||||
/* Gateway */
|
||||
ALIGN64 BOOL GatewayUsageMethod; /* 384 */
|
||||
ALIGN64 UINT32 GatewayPort; /* 385 */
|
||||
ALIGN64 char* GatewayHostname; /* 386 */
|
||||
ALIGN64 char* GatewayUsername; /* 387 */
|
||||
ALIGN64 char* GatewayPassword; /* 388 */
|
||||
ALIGN64 char* GatewayDomain; /* 389 */
|
||||
ALIGN64 UINT32 GatewayCredentialsSource; /* 390 */
|
||||
ALIGN64 BOOL GatewayUseSameCredentials; /* 391 */
|
||||
UINT64 padding023[400 - 391]; /* 392 */
|
||||
/**
|
||||
* Section: Device Redirection
|
||||
*/
|
||||
|
||||
/* Device Redirection */
|
||||
ALIGN64 BOOL DeviceRedirection;
|
||||
@ -544,6 +628,18 @@ struct rdp_settings
|
||||
/* Parallel Port Redirection */
|
||||
ALIGN64 BOOL RedirectParallelPorts;
|
||||
|
||||
/**
|
||||
* Section: Unstable
|
||||
* Anything below this point is subject to ABI breakage
|
||||
*/
|
||||
|
||||
/* Recording */
|
||||
ALIGN64 BOOL DumpRemoteFx; /* 296 */
|
||||
ALIGN64 BOOL PlayRemoteFx; /* 297 */
|
||||
ALIGN64 char* DumpRemoteFxFile; /* 298 */
|
||||
ALIGN64 char* PlayRemoteFxFile; /* 299 */
|
||||
UINT64 padding014[312 - 300]; /* 300 */
|
||||
|
||||
/* Channels */
|
||||
ALIGN64 int num_channels;
|
||||
ALIGN64 rdpChannel channels[16];
|
||||
|
@ -33,7 +33,6 @@ FREERDP_API char* freerdp_construct_path(char* base_path, char* relative_path);
|
||||
FREERDP_API char* freerdp_append_shared_library_suffix(char* file_path);
|
||||
FREERDP_API char* freerdp_get_parent_path(char* base_path, int depth);
|
||||
FREERDP_API BOOL freerdp_path_contains_separator(char* path);
|
||||
FREERDP_API BOOL freerdp_detect_development_mode(rdpSettings* settings);
|
||||
FREERDP_API void freerdp_detect_paths(rdpSettings* settings);
|
||||
|
||||
#endif /* __FILE_UTILS_H */
|
||||
|
4
libfreerdp/cache/offscreen.c
vendored
4
libfreerdp/cache/offscreen.c
vendored
@ -145,8 +145,8 @@ rdpOffscreenCache* offscreen_cache_new(rdpSettings* settings)
|
||||
offscreen_cache->maxSize = 7680;
|
||||
offscreen_cache->maxEntries = 2000;
|
||||
|
||||
settings->OffscreenBitmapCacheSize = offscreen_cache->maxSize;
|
||||
settings->OffscreenBitmapCacheEntries = offscreen_cache->maxEntries;
|
||||
settings->OffscreenCacheSize = offscreen_cache->maxSize;
|
||||
settings->OffscreenCacheEntries = offscreen_cache->maxEntries;
|
||||
|
||||
offscreen_cache->entries = (rdpBitmap**) xzalloc(sizeof(rdpBitmap*) * offscreen_cache->maxEntries);
|
||||
}
|
||||
|
@ -37,12 +37,12 @@ static const char* const CTRLACTION_STRINGS[] =
|
||||
void rdp_write_synchronize_pdu(STREAM* s, rdpSettings* settings)
|
||||
{
|
||||
stream_write_UINT16(s, SYNCMSGTYPE_SYNC); /* messageType (2 bytes) */
|
||||
stream_write_UINT16(s, settings->pdu_source); /* targetUser (2 bytes) */
|
||||
stream_write_UINT16(s, settings->PduSource); /* targetUser (2 bytes) */
|
||||
}
|
||||
|
||||
BOOL rdp_recv_synchronize_pdu(rdpRdp* rdp, STREAM* s)
|
||||
{
|
||||
if (rdp->settings->server_mode)
|
||||
if (rdp->settings->ServerMode)
|
||||
return rdp_recv_server_synchronize_pdu(rdp, s);
|
||||
else
|
||||
return rdp_recv_client_synchronize_pdu(rdp, s);
|
||||
@ -239,7 +239,7 @@ BOOL rdp_send_client_font_list_pdu(rdpRdp* rdp, UINT16 flags)
|
||||
|
||||
BOOL rdp_recv_font_map_pdu(rdpRdp* rdp, STREAM* s)
|
||||
{
|
||||
if (rdp->settings->server_mode)
|
||||
if (rdp->settings->ServerMode)
|
||||
return rdp_recv_server_font_map_pdu(rdp, s);
|
||||
else
|
||||
return rdp_recv_client_font_map_pdu(rdp, s);
|
||||
@ -287,7 +287,7 @@ BOOL rdp_recv_deactivate_all(rdpRdp* rdp, STREAM* s)
|
||||
*/
|
||||
if (stream_get_left(s) > 0)
|
||||
{
|
||||
stream_read_UINT32(s, rdp->settings->share_id); /* shareId (4 bytes) */
|
||||
stream_read_UINT32(s, rdp->settings->ShareId); /* shareId (4 bytes) */
|
||||
stream_read_UINT16(s, lengthSourceDescriptor); /* lengthSourceDescriptor (2 bytes) */
|
||||
stream_seek(s, lengthSourceDescriptor); /* sourceDescriptor (should be 0x00) */
|
||||
}
|
||||
@ -311,7 +311,7 @@ BOOL rdp_send_deactivate_all(rdpRdp* rdp)
|
||||
|
||||
s = rdp_pdu_init(rdp);
|
||||
|
||||
stream_write_UINT32(s, rdp->settings->share_id); /* shareId (4 bytes) */
|
||||
stream_write_UINT32(s, rdp->settings->ShareId); /* shareId (4 bytes) */
|
||||
stream_write_UINT16(s, 1); /* lengthSourceDescriptor (2 bytes) */
|
||||
stream_write_BYTE(s, 0); /* sourceDescriptor (should be 0x00) */
|
||||
|
||||
|
@ -117,7 +117,7 @@ void rdp_read_general_capability_set(STREAM* s, UINT16 length, rdpSettings* sett
|
||||
BYTE refreshRectSupport;
|
||||
BYTE suppressOutputSupport;
|
||||
|
||||
if (settings->server_mode)
|
||||
if (settings->ServerMode)
|
||||
{
|
||||
stream_read_UINT16(s, settings->OsMajorType); /* osMajorType (2 bytes) */
|
||||
stream_read_UINT16(s, settings->OsMinorType); /* osMinorType (2 bytes) */
|
||||
@ -138,7 +138,7 @@ void rdp_read_general_capability_set(STREAM* s, UINT16 length, rdpSettings* sett
|
||||
stream_read_BYTE(s, suppressOutputSupport); /* suppressOutputSupport (1 byte) */
|
||||
|
||||
if (!(extraFlags & FASTPATH_OUTPUT_SUPPORTED))
|
||||
settings->FastpathOutput = FALSE;
|
||||
settings->FastPathOutput = FALSE;
|
||||
|
||||
if (refreshRectSupport == FALSE)
|
||||
settings->RefreshRect = FALSE;
|
||||
@ -166,7 +166,7 @@ void rdp_write_general_capability_set(STREAM* s, rdpSettings* settings)
|
||||
if (settings->AutoReconnectionEnabled)
|
||||
extraFlags |= AUTORECONNECT_SUPPORTED;
|
||||
|
||||
if (settings->FastpathOutput)
|
||||
if (settings->FastPathOutput)
|
||||
extraFlags |= FASTPATH_OUTPUT_SUPPORTED;
|
||||
|
||||
if (settings->SaltedChecksum)
|
||||
@ -216,7 +216,7 @@ void rdp_read_bitmap_capability_set(STREAM* s, UINT16 length, rdpSettings* setti
|
||||
stream_seek_UINT16(s); /* multipleRectangleSupport (2 bytes) */
|
||||
stream_seek_UINT16(s); /* pad2OctetsB (2 bytes) */
|
||||
|
||||
if (!settings->server_mode && preferredBitsPerPixel != settings->ColorDepth)
|
||||
if (!settings->ServerMode && preferredBitsPerPixel != settings->ColorDepth)
|
||||
{
|
||||
/* The client must respect the actual color depth used by the server */
|
||||
settings->ColorDepth = preferredBitsPerPixel;
|
||||
@ -225,7 +225,7 @@ void rdp_read_bitmap_capability_set(STREAM* s, UINT16 length, rdpSettings* setti
|
||||
if (desktopResizeFlag == FALSE)
|
||||
settings->DesktopResize = FALSE;
|
||||
|
||||
if (!settings->server_mode && settings->DesktopResize)
|
||||
if (!settings->ServerMode && settings->DesktopResize)
|
||||
{
|
||||
/* The server may request a different desktop size during Deactivation-Reactivation sequence */
|
||||
settings->DesktopWidth = desktopWidth;
|
||||
@ -342,7 +342,7 @@ void rdp_write_order_capability_set(STREAM* s, rdpSettings* settings)
|
||||
orderFlags |= ORDER_FLAGS_EXTRA_SUPPORT;
|
||||
}
|
||||
|
||||
if (settings->FrameMarkerEnabled)
|
||||
if (settings->FrameMarkerCommandEnabled)
|
||||
{
|
||||
orderSupportExFlags |= ALTSEC_FRAME_MARKER_SUPPORT;
|
||||
orderFlags |= ORDER_FLAGS_EXTRA_SUPPORT;
|
||||
@ -521,9 +521,9 @@ void rdp_read_pointer_capability_set(STREAM* s, UINT16 length, rdpSettings* sett
|
||||
stream_read_UINT16(s, pointerCacheSize); /* pointerCacheSize (2 bytes) */
|
||||
|
||||
if (colorPointerFlag == FALSE)
|
||||
settings->ColorPointer = FALSE;
|
||||
settings->ColorPointerFlag = FALSE;
|
||||
|
||||
if (settings->server_mode)
|
||||
if (settings->ServerMode)
|
||||
{
|
||||
settings->PointerCacheSize = pointerCacheSize;
|
||||
}
|
||||
@ -543,12 +543,12 @@ void rdp_write_pointer_capability_set(STREAM* s, rdpSettings* settings)
|
||||
|
||||
header = rdp_capability_set_start(s);
|
||||
|
||||
colorPointerFlag = (settings->ColorPointer) ? 1 : 0;
|
||||
colorPointerFlag = (settings->ColorPointerFlag) ? 1 : 0;
|
||||
|
||||
stream_write_UINT16(s, colorPointerFlag); /* colorPointerFlag (2 bytes) */
|
||||
stream_write_UINT16(s, settings->PointerCacheSize); /* colorPointerCacheSize (2 bytes) */
|
||||
|
||||
if (settings->LargePointer)
|
||||
if (settings->LargePointerFlag)
|
||||
{
|
||||
stream_write_UINT16(s, settings->PointerCacheSize); /* pointerCacheSize (2 bytes) */
|
||||
}
|
||||
@ -583,7 +583,7 @@ void rdp_write_share_capability_set(STREAM* s, rdpSettings* settings)
|
||||
|
||||
header = rdp_capability_set_start(s);
|
||||
|
||||
nodeId = (settings->server_mode) ? 0x03EA : 0;
|
||||
nodeId = (settings->ServerMode) ? 0x03EA : 0;
|
||||
|
||||
stream_write_UINT16(s, nodeId); /* nodeId (2 bytes) */
|
||||
stream_write_UINT16(s, 0); /* pad2Octets (2 bytes) */
|
||||
@ -676,7 +676,7 @@ void rdp_read_input_capability_set(STREAM* s, UINT16 length, rdpSettings* settin
|
||||
stream_read_UINT16(s, inputFlags); /* inputFlags (2 bytes) */
|
||||
stream_seek_UINT16(s); /* pad2OctetsA (2 bytes) */
|
||||
|
||||
if (settings->server_mode)
|
||||
if (settings->ServerMode)
|
||||
{
|
||||
stream_read_UINT32(s, settings->KeyboardLayout); /* keyboardLayout (4 bytes) */
|
||||
stream_read_UINT32(s, settings->KeyboardType); /* keyboardType (4 bytes) */
|
||||
@ -693,7 +693,7 @@ void rdp_read_input_capability_set(STREAM* s, UINT16 length, rdpSettings* settin
|
||||
|
||||
stream_seek(s, 64); /* imeFileName (64 bytes) */
|
||||
|
||||
if (settings->server_mode != TRUE)
|
||||
if (settings->ServerMode != TRUE)
|
||||
{
|
||||
if (inputFlags & INPUT_FLAG_FASTPATH_INPUT)
|
||||
{
|
||||
@ -706,7 +706,7 @@ void rdp_read_input_capability_set(STREAM* s, UINT16 length, rdpSettings* settin
|
||||
else
|
||||
{
|
||||
/* server does not support fastpath input */
|
||||
settings->FastpathInput = FALSE;
|
||||
settings->FastPathInput = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -727,7 +727,7 @@ void rdp_write_input_capability_set(STREAM* s, rdpSettings* settings)
|
||||
|
||||
inputFlags = INPUT_FLAG_SCANCODES | INPUT_FLAG_MOUSEX | INPUT_FLAG_UNICODE;
|
||||
|
||||
if (settings->FastpathInput)
|
||||
if (settings->FastPathInput)
|
||||
{
|
||||
inputFlags |= INPUT_FLAG_FASTPATH_INPUT;
|
||||
inputFlags |= INPUT_FLAG_FASTPATH_INPUT2;
|
||||
@ -896,11 +896,11 @@ void rdp_read_offscreen_bitmap_cache_capability_set(STREAM* s, UINT16 length, rd
|
||||
UINT32 offscreenSupportLevel;
|
||||
|
||||
stream_read_UINT32(s, offscreenSupportLevel); /* offscreenSupportLevel (4 bytes) */
|
||||
stream_read_UINT16(s, settings->OffscreenBitmapCacheSize); /* offscreenCacheSize (2 bytes) */
|
||||
stream_read_UINT16(s, settings->OffscreenBitmapCacheEntries); /* offscreenCacheEntries (2 bytes) */
|
||||
stream_read_UINT16(s, settings->OffscreenCacheSize); /* offscreenCacheSize (2 bytes) */
|
||||
stream_read_UINT16(s, settings->OffscreenCacheEntries); /* offscreenCacheEntries (2 bytes) */
|
||||
|
||||
if (offscreenSupportLevel & TRUE)
|
||||
settings->OffscreenBitmapCacheEnabled = TRUE;
|
||||
settings->OffscreenSupportLevel = TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -917,12 +917,12 @@ void rdp_write_offscreen_bitmap_cache_capability_set(STREAM* s, rdpSettings* set
|
||||
|
||||
header = rdp_capability_set_start(s);
|
||||
|
||||
if (settings->OffscreenBitmapCacheEnabled)
|
||||
if (settings->OffscreenSupportLevel)
|
||||
offscreenSupportLevel = TRUE;
|
||||
|
||||
stream_write_UINT32(s, offscreenSupportLevel); /* offscreenSupportLevel (4 bytes) */
|
||||
stream_write_UINT16(s, settings->OffscreenBitmapCacheSize); /* offscreenCacheSize (2 bytes) */
|
||||
stream_write_UINT16(s, settings->OffscreenBitmapCacheEntries); /* offscreenCacheEntries (2 bytes) */
|
||||
stream_write_UINT16(s, settings->OffscreenCacheSize); /* offscreenCacheSize (2 bytes) */
|
||||
stream_write_UINT16(s, settings->OffscreenCacheEntries); /* offscreenCacheEntries (2 bytes) */
|
||||
|
||||
rdp_capability_set_finish(s, header, CAPSET_TYPE_OFFSCREEN_CACHE);
|
||||
}
|
||||
@ -1050,7 +1050,7 @@ void rdp_read_virtual_channel_capability_set(STREAM* s, UINT16 length, rdpSettin
|
||||
else
|
||||
VCChunkSize = 1600;
|
||||
|
||||
if (settings->server_mode != TRUE)
|
||||
if (settings->ServerMode != TRUE)
|
||||
settings->VirtualChannelChunkSize = VCChunkSize;
|
||||
}
|
||||
|
||||
@ -1370,7 +1370,7 @@ void rdp_write_large_pointer_capability_set(STREAM* s, rdpSettings* settings)
|
||||
|
||||
header = rdp_capability_set_start(s);
|
||||
|
||||
largePointerSupportFlags = (settings->LargePointer) ? LARGE_POINTER_FLAG_96x96 : 0;
|
||||
largePointerSupportFlags = (settings->LargePointerFlag) ? LARGE_POINTER_FLAG_96x96 : 0;
|
||||
|
||||
stream_write_UINT16(s, largePointerSupportFlags); /* largePointerSupportFlags (2 bytes) */
|
||||
|
||||
@ -1430,7 +1430,7 @@ void rdp_read_bitmap_codecs_capability_set(STREAM* s, UINT16 length, rdpSettings
|
||||
|
||||
stream_read_BYTE(s, bitmapCodecCount); /* bitmapCodecCount (1 byte) */
|
||||
|
||||
if (settings->server_mode)
|
||||
if (settings->ServerMode)
|
||||
{
|
||||
settings->RemoteFxCodec = FALSE;
|
||||
settings->NSCodec = FALSE;
|
||||
@ -1439,13 +1439,13 @@ void rdp_read_bitmap_codecs_capability_set(STREAM* s, UINT16 length, rdpSettings
|
||||
|
||||
while (bitmapCodecCount > 0)
|
||||
{
|
||||
if (settings->server_mode && strncmp((char*)stream_get_tail(s), CODEC_GUID_REMOTEFX, 16) == 0)
|
||||
if (settings->ServerMode && strncmp((char*)stream_get_tail(s), CODEC_GUID_REMOTEFX, 16) == 0)
|
||||
{
|
||||
stream_seek(s, 16); /* codecGUID (16 bytes) */
|
||||
stream_read_BYTE(s, settings->RemoteFxCodecId);
|
||||
settings->RemoteFxCodec = TRUE;
|
||||
}
|
||||
else if (settings->server_mode && strncmp((char*)stream_get_tail(s), CODEC_GUID_NSCODEC, 16) == 0)
|
||||
else if (settings->ServerMode && strncmp((char*)stream_get_tail(s), CODEC_GUID_NSCODEC, 16) == 0)
|
||||
{
|
||||
stream_seek(s, 16); /*codec GUID (16 bytes) */
|
||||
stream_read_BYTE(s, settings->NSCodecId);
|
||||
@ -1592,7 +1592,7 @@ void rdp_write_bitmap_codecs_capability_set(STREAM* s, rdpSettings* settings)
|
||||
{
|
||||
stream_write(s, CODEC_GUID_REMOTEFX, 16); /* codecGUID */
|
||||
|
||||
if (settings->server_mode)
|
||||
if (settings->ServerMode)
|
||||
{
|
||||
stream_write_BYTE(s, 0); /* codecID is defined by the client */
|
||||
rdp_write_rfx_server_capability_container(s, settings);
|
||||
@ -1606,7 +1606,7 @@ void rdp_write_bitmap_codecs_capability_set(STREAM* s, rdpSettings* settings)
|
||||
if (settings->NSCodec)
|
||||
{
|
||||
stream_write(s, CODEC_GUID_NSCODEC, 16);
|
||||
if (settings->server_mode)
|
||||
if (settings->ServerMode)
|
||||
{
|
||||
stream_write_BYTE(s, 0); /* codecID is defined by the client */
|
||||
rdp_write_nsc_server_capability_container(s, settings);
|
||||
@ -1620,7 +1620,7 @@ void rdp_write_bitmap_codecs_capability_set(STREAM* s, rdpSettings* settings)
|
||||
if (settings->JpegCodec)
|
||||
{
|
||||
stream_write(s, CODEC_GUID_JPEG, 16);
|
||||
if (settings->server_mode)
|
||||
if (settings->ServerMode)
|
||||
{
|
||||
stream_write_BYTE(s, 0); /* codecID is defined by the client */
|
||||
rdp_write_jpeg_server_capability_container(s, settings);
|
||||
@ -1642,7 +1642,7 @@ void rdp_write_bitmap_codecs_capability_set(STREAM* s, rdpSettings* settings)
|
||||
|
||||
void rdp_read_frame_acknowledge_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
|
||||
{
|
||||
if (settings->server_mode)
|
||||
if (settings->ServerMode)
|
||||
{
|
||||
stream_read_UINT32(s, settings->FrameAcknowledge); /* (4 bytes) */
|
||||
}
|
||||
@ -1886,7 +1886,7 @@ BOOL rdp_recv_demand_active(rdpRdp* rdp, STREAM* s)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
rdp->settings->pdu_source = pduSource;
|
||||
rdp->settings->PduSource = pduSource;
|
||||
|
||||
if (pduType != PDU_TYPE_DEMAND_ACTIVE)
|
||||
{
|
||||
@ -1894,7 +1894,7 @@ BOOL rdp_recv_demand_active(rdpRdp* rdp, STREAM* s)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
stream_read_UINT32(s, rdp->settings->share_id); /* shareId (4 bytes) */
|
||||
stream_read_UINT32(s, rdp->settings->ShareId); /* shareId (4 bytes) */
|
||||
stream_read_UINT16(s, lengthSourceDescriptor); /* lengthSourceDescriptor (2 bytes) */
|
||||
stream_read_UINT16(s, lengthCombinedCapabilities); /* lengthCombinedCapabilities (2 bytes) */
|
||||
stream_seek(s, lengthSourceDescriptor); /* sourceDescriptor */
|
||||
@ -1919,7 +1919,7 @@ void rdp_write_demand_active(STREAM* s, rdpSettings* settings)
|
||||
UINT16 numberCapabilities;
|
||||
UINT16 lengthCombinedCapabilities;
|
||||
|
||||
stream_write_UINT32(s, settings->share_id); /* shareId (4 bytes) */
|
||||
stream_write_UINT32(s, settings->ShareId); /* shareId (4 bytes) */
|
||||
stream_write_UINT16(s, 4); /* lengthSourceDescriptor (2 bytes) */
|
||||
|
||||
stream_get_mark(s, lm);
|
||||
@ -1972,7 +1972,7 @@ BOOL rdp_send_demand_active(rdpRdp* rdp)
|
||||
|
||||
s = rdp_pdu_init(rdp);
|
||||
|
||||
rdp->settings->share_id = 0x10000 + rdp->mcs->user_id;
|
||||
rdp->settings->ShareId = 0x10000 + rdp->mcs->user_id;
|
||||
|
||||
rdp_write_demand_active(s, rdp->settings);
|
||||
|
||||
@ -2015,7 +2015,7 @@ BOOL rdp_recv_confirm_active(rdpRdp* rdp, STREAM* s)
|
||||
if (!rdp_read_share_control_header(s, &pduLength, &pduType, &pduSource))
|
||||
return FALSE;
|
||||
|
||||
rdp->settings->pdu_source = pduSource;
|
||||
rdp->settings->PduSource = pduSource;
|
||||
|
||||
if (pduType != PDU_TYPE_CONFIRM_ACTIVE)
|
||||
return FALSE;
|
||||
@ -2043,7 +2043,7 @@ void rdp_write_confirm_active(STREAM* s, rdpSettings* settings)
|
||||
|
||||
lengthSourceDescriptor = sizeof(SOURCE_DESCRIPTOR);
|
||||
|
||||
stream_write_UINT32(s, settings->share_id); /* shareId (4 bytes) */
|
||||
stream_write_UINT32(s, settings->ShareId); /* shareId (4 bytes) */
|
||||
stream_write_UINT16(s, 0x03EA); /* originatorId (2 bytes) */
|
||||
stream_write_UINT16(s, lengthSourceDescriptor);/* lengthSourceDescriptor (2 bytes) */
|
||||
|
||||
@ -2078,7 +2078,7 @@ void rdp_write_confirm_active(STREAM* s, rdpSettings* settings)
|
||||
rdp_write_color_cache_capability_set(s, settings);
|
||||
rdp_write_window_activation_capability_set(s, settings);
|
||||
|
||||
if (settings->OffscreenBitmapCacheEnabled)
|
||||
if (settings->OffscreenSupportLevel)
|
||||
{
|
||||
numberCapabilities++;
|
||||
rdp_write_offscreen_bitmap_cache_capability_set(s, settings);
|
||||
@ -2092,7 +2092,7 @@ void rdp_write_confirm_active(STREAM* s, rdpSettings* settings)
|
||||
|
||||
if (settings->ReceivedCapabilities[CAPSET_TYPE_LARGE_POINTER])
|
||||
{
|
||||
if (settings->LargePointer)
|
||||
if (settings->LargePointerFlag)
|
||||
{
|
||||
numberCapabilities++;
|
||||
rdp_write_large_pointer_capability_set(s, settings);
|
||||
|
@ -73,7 +73,7 @@ BOOL rdp_client_connect(rdpRdp* rdp)
|
||||
rdpSettings* settings = rdp->settings;
|
||||
|
||||
nego_init(rdp->nego);
|
||||
nego_set_target(rdp->nego, settings->Hostname, settings->ServerPort);
|
||||
nego_set_target(rdp->nego, settings->ServerHostname, settings->ServerPort);
|
||||
|
||||
if (settings->GatewayUsageMethod)
|
||||
{
|
||||
@ -136,7 +136,7 @@ BOOL rdp_client_connect(rdpRdp* rdp)
|
||||
{
|
||||
if ((settings->Username != NULL) && ((settings->Password != NULL) ||
|
||||
(settings->PasswordCookie != NULL && settings->PasswordCookieLength > 0)))
|
||||
settings->autologon = TRUE;
|
||||
settings->AutoLogonEnabled = TRUE;
|
||||
}
|
||||
|
||||
rdp_set_blocking_mode(rdp, FALSE);
|
||||
@ -191,7 +191,7 @@ BOOL rdp_client_redirect(rdpRdp* rdp)
|
||||
|
||||
free(settings->ServerRandom);
|
||||
free(settings->ServerCertificate);
|
||||
free(settings->ip_address);
|
||||
free(settings->ClientAddress);
|
||||
|
||||
rdp->transport = transport_new(settings);
|
||||
rdp->license = license_new(rdp);
|
||||
@ -209,18 +209,18 @@ BOOL rdp_client_redirect(rdpRdp* rdp)
|
||||
{
|
||||
if (redirection->flags & LB_TARGET_NET_ADDRESS)
|
||||
{
|
||||
free(settings->Hostname);
|
||||
settings->Hostname = _strdup(redirection->targetNetAddress.ascii);
|
||||
free(settings->ServerHostname);
|
||||
settings->ServerHostname = _strdup(redirection->targetNetAddress.ascii);
|
||||
}
|
||||
else if (redirection->flags & LB_TARGET_FQDN)
|
||||
{
|
||||
free(settings->Hostname);
|
||||
settings->Hostname = _strdup(redirection->targetFQDN.ascii);
|
||||
free(settings->ServerHostname);
|
||||
settings->ServerHostname = _strdup(redirection->targetFQDN.ascii);
|
||||
}
|
||||
else if (redirection->flags & LB_TARGET_NETBIOS_NAME)
|
||||
{
|
||||
free(settings->Hostname);
|
||||
settings->Hostname = _strdup(redirection->targetNetBiosName.ascii);
|
||||
free(settings->ServerHostname);
|
||||
settings->ServerHostname = _strdup(redirection->targetNetBiosName.ascii);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -664,7 +664,7 @@ BOOL fastpath_send_update_pdu(rdpFastPath* fastpath, BYTE updateCode, STREAM* s)
|
||||
totalLength = stream_get_length(s) - (6 + sec_bytes);
|
||||
stream_set_pos(s, 0);
|
||||
update = stream_new(0);
|
||||
try_comp = rdp->settings->compression;
|
||||
try_comp = rdp->settings->CompressionEnabled;
|
||||
comp_update = stream_new(0);
|
||||
|
||||
for (fragment = 0; totalLength > 0 || fragment == 0; fragment++)
|
||||
|
@ -83,7 +83,7 @@ BOOL freerdp_connect(freerdp* instance)
|
||||
|
||||
status = rdp_client_connect(rdp);
|
||||
/* --authonly tests the connection without a UI */
|
||||
if (instance->settings->authentication_only)
|
||||
if (instance->settings->AuthenticationOnly)
|
||||
{
|
||||
fprintf(stderr, "%s:%d: Authentication only, exit status %d\n", __FILE__, __LINE__, !status);
|
||||
return status;
|
||||
|
@ -618,7 +618,7 @@ BOOL gcc_read_client_core_data(STREAM* s, rdpSettings* settings, UINT16 blockLen
|
||||
* If we are in server mode, accept client's color depth only if
|
||||
* it is smaller than ours. This is what Windows server does.
|
||||
*/
|
||||
if (color_depth < settings->ColorDepth || !settings->server_mode)
|
||||
if (color_depth < settings->ColorDepth || !settings->ServerMode)
|
||||
settings->ColorDepth = color_depth;
|
||||
|
||||
return TRUE;
|
||||
|
@ -118,12 +118,12 @@ BOOL rdp_read_extended_info_packet(STREAM* s, rdpSettings* settings)
|
||||
stream_read_UINT16(s, clientAddressFamily); /* clientAddressFamily */
|
||||
stream_read_UINT16(s, cbClientAddress); /* cbClientAddress */
|
||||
|
||||
settings->IPv6 = (clientAddressFamily == ADDRESS_FAMILY_INET6 ? TRUE : FALSE);
|
||||
settings->IPv6Enabled = (clientAddressFamily == ADDRESS_FAMILY_INET6 ? TRUE : FALSE);
|
||||
|
||||
if (stream_get_left(s) < cbClientAddress)
|
||||
return FALSE;
|
||||
|
||||
freerdp_UnicodeToAsciiAlloc((WCHAR*) stream_get_tail(s), &settings->ip_address, cbClientAddress / 2);
|
||||
freerdp_UnicodeToAsciiAlloc((WCHAR*) stream_get_tail(s), &settings->ClientAddress, cbClientAddress / 2);
|
||||
stream_seek(s, cbClientAddress);
|
||||
|
||||
stream_read_UINT16(s, cbClientDir); /* cbClientDir */
|
||||
@ -131,10 +131,10 @@ BOOL rdp_read_extended_info_packet(STREAM* s, rdpSettings* settings)
|
||||
if (stream_get_left(s) < cbClientDir)
|
||||
return FALSE;
|
||||
|
||||
if (settings->client_dir)
|
||||
free(settings->client_dir);
|
||||
if (settings->ClientDir)
|
||||
free(settings->ClientDir);
|
||||
|
||||
freerdp_UnicodeToAsciiAlloc((WCHAR*) stream_get_tail(s), &settings->client_dir, cbClientDir / 2);
|
||||
freerdp_UnicodeToAsciiAlloc((WCHAR*) stream_get_tail(s), &settings->ClientDir, cbClientDir / 2);
|
||||
stream_seek(s, cbClientDir);
|
||||
|
||||
if (!rdp_read_client_time_zone(s, settings))
|
||||
@ -170,11 +170,11 @@ void rdp_write_extended_info_packet(STREAM* s, rdpSettings* settings)
|
||||
int cbClientDir;
|
||||
int cbAutoReconnectLen;
|
||||
|
||||
clientAddressFamily = settings->IPv6 ? ADDRESS_FAMILY_INET6 : ADDRESS_FAMILY_INET;
|
||||
clientAddressFamily = settings->IPv6Enabled ? ADDRESS_FAMILY_INET6 : ADDRESS_FAMILY_INET;
|
||||
|
||||
cbClientAddress = freerdp_AsciiToUnicodeAlloc(settings->ip_address, &clientAddress, 0) * 2;
|
||||
cbClientAddress = freerdp_AsciiToUnicodeAlloc(settings->ClientAddress, &clientAddress, 0) * 2;
|
||||
|
||||
cbClientDir = freerdp_AsciiToUnicodeAlloc(settings->client_dir, &clientDir, 0) * 2;
|
||||
cbClientDir = freerdp_AsciiToUnicodeAlloc(settings->ClientDir, &clientDir, 0) * 2;
|
||||
|
||||
cbAutoReconnectLen = (int) settings->ClientAutoReconnectCookie->cbLen;
|
||||
|
||||
@ -228,10 +228,10 @@ BOOL rdp_read_info_packet(STREAM* s, rdpSettings* settings)
|
||||
stream_seek_UINT32(s); /* CodePage */
|
||||
stream_read_UINT32(s, flags); /* flags */
|
||||
|
||||
settings->autologon = ((flags & INFO_AUTOLOGON) ? TRUE : FALSE);
|
||||
settings->AutoLogonEnabled = ((flags & INFO_AUTOLOGON) ? TRUE : FALSE);
|
||||
settings->RemoteApplicationMode = ((flags & INFO_RAIL) ? TRUE : FALSE);
|
||||
settings->ConsoleAudio = ((flags & INFO_REMOTECONSOLEAUDIO) ? TRUE : FALSE);
|
||||
settings->compression = ((flags & INFO_COMPRESSION) ? TRUE : FALSE);
|
||||
settings->RemoteConsoleAudio = ((flags & INFO_REMOTECONSOLEAUDIO) ? TRUE : FALSE);
|
||||
settings->CompressionEnabled = ((flags & INFO_COMPRESSION) ? TRUE : FALSE);
|
||||
|
||||
stream_read_UINT16(s, cbDomain); /* cbDomain */
|
||||
stream_read_UINT16(s, cbUserName); /* cbUserName */
|
||||
@ -331,16 +331,16 @@ void rdp_write_info_packet(STREAM* s, rdpSettings* settings)
|
||||
if (!settings->AudioPlayback)
|
||||
flags |= INFO_NOAUDIOPLAYBACK;
|
||||
|
||||
if (settings->autologon)
|
||||
if (settings->AutoLogonEnabled)
|
||||
flags |= INFO_AUTOLOGON;
|
||||
|
||||
if (settings->RemoteApplicationMode)
|
||||
flags |= INFO_RAIL;
|
||||
|
||||
if (settings->ConsoleAudio)
|
||||
if (settings->RemoteConsoleAudio)
|
||||
flags |= INFO_REMOTECONSOLEAUDIO;
|
||||
|
||||
if (settings->compression)
|
||||
if (settings->CompressionEnabled)
|
||||
flags |= INFO_COMPRESSION | INFO_PACKET_COMPR_TYPE_RDP6;
|
||||
|
||||
if (settings->Domain)
|
||||
|
@ -368,7 +368,7 @@ void input_register_client_callbacks(rdpInput* input)
|
||||
{
|
||||
rdpRdp* rdp = input->context->rdp;
|
||||
|
||||
if (rdp->settings->FastpathInput)
|
||||
if (rdp->settings->FastPathInput)
|
||||
{
|
||||
input->SynchronizeEvent = input_send_fastpath_synchronize_event;
|
||||
input->KeyboardEvent = input_send_fastpath_keyboard_event;
|
||||
|
@ -836,7 +836,7 @@ BOOL nego_send_negotiation_response(rdpNego* nego)
|
||||
settings->NlaSecurity = FALSE;
|
||||
settings->RdpSecurity = TRUE;
|
||||
|
||||
if (!settings->local)
|
||||
if (!settings->LocalConnection)
|
||||
{
|
||||
settings->Encryption = TRUE;
|
||||
settings->EncryptionMethod = ENCRYPTION_METHOD_40BIT | ENCRYPTION_METHOD_128BIT | ENCRYPTION_METHOD_FIPS;
|
||||
|
@ -28,9 +28,9 @@
|
||||
|
||||
static BOOL freerdp_peer_initialize(freerdp_peer* client)
|
||||
{
|
||||
client->context->rdp->settings->server_mode = TRUE;
|
||||
client->context->rdp->settings->ServerMode = TRUE;
|
||||
client->context->rdp->settings->FrameAcknowledge = 0;
|
||||
client->context->rdp->settings->local = client->local;
|
||||
client->context->rdp->settings->LocalConnection = client->local;
|
||||
client->context->rdp->state = CONNECTION_STATE_INITIAL;
|
||||
|
||||
if (client->context->rdp->settings->RdpKeyFile != NULL)
|
||||
@ -194,7 +194,7 @@ static BOOL peer_recv_tpkt_pdu(freerdp_peer* client, STREAM* s)
|
||||
if (!rdp_read_share_control_header(s, &pduLength, &pduType, &pduSource))
|
||||
return FALSE;
|
||||
|
||||
client->settings->pdu_source = pduSource;
|
||||
client->settings->PduSource = pduSource;
|
||||
|
||||
switch (pduType)
|
||||
{
|
||||
|
@ -227,7 +227,7 @@ BOOL rdp_read_header(rdpRdp* rdp, STREAM* s, UINT16* length, UINT16* channel_id)
|
||||
UINT16 initiator;
|
||||
enum DomainMCSPDU MCSPDU;
|
||||
|
||||
MCSPDU = (rdp->settings->server_mode) ? DomainMCSPDU_SendDataRequest : DomainMCSPDU_SendDataIndication;
|
||||
MCSPDU = (rdp->settings->ServerMode) ? DomainMCSPDU_SendDataRequest : DomainMCSPDU_SendDataIndication;
|
||||
|
||||
if (!mcs_read_domain_mcspdu_header(s, &MCSPDU, length))
|
||||
{
|
||||
@ -274,7 +274,7 @@ void rdp_write_header(rdpRdp* rdp, STREAM* s, UINT16 length, UINT16 channel_id)
|
||||
int body_length;
|
||||
enum DomainMCSPDU MCSPDU;
|
||||
|
||||
MCSPDU = (rdp->settings->server_mode) ? DomainMCSPDU_SendDataIndication : DomainMCSPDU_SendDataRequest;
|
||||
MCSPDU = (rdp->settings->ServerMode) ? DomainMCSPDU_SendDataIndication : DomainMCSPDU_SendDataRequest;
|
||||
|
||||
if ((rdp->sec_flags & SEC_ENCRYPT) && (rdp->settings->EncryptionMethod == ENCRYPTION_METHOD_FIPS))
|
||||
{
|
||||
@ -453,7 +453,7 @@ BOOL rdp_send_data_pdu(rdpRdp* rdp, STREAM* s, BYTE type, UINT16 channel_id)
|
||||
stream_seek(s, sec_bytes);
|
||||
|
||||
rdp_write_share_control_header(s, length - sec_bytes, PDU_TYPE_DATA, channel_id);
|
||||
rdp_write_share_data_header(s, length - sec_bytes, type, rdp->settings->share_id);
|
||||
rdp_write_share_data_header(s, length - sec_bytes, type, rdp->settings->ShareId);
|
||||
|
||||
s->p = sec_hold;
|
||||
length += RdpSecurity_stream_out(rdp, s, length);
|
||||
@ -752,7 +752,7 @@ static BOOL rdp_recv_tpkt_pdu(rdpRdp* rdp, STREAM* s)
|
||||
rdp_read_share_control_header(s, &pduLength, &pduType, &pduSource);
|
||||
nextp += pduLength;
|
||||
|
||||
rdp->settings->pdu_source = pduSource;
|
||||
rdp->settings->PduSource = pduSource;
|
||||
|
||||
switch (pduType)
|
||||
{
|
||||
|
@ -366,7 +366,7 @@ BOOL security_establish_keys(BYTE* client_random, rdpRdp* rdp)
|
||||
printf("FIPS Compliant encryption level.\n");
|
||||
|
||||
/* disable fastpath input; it doesnt handle FIPS encryption yet */
|
||||
rdp->settings->FastpathInput = FALSE;
|
||||
rdp->settings->FastPathInput = FALSE;
|
||||
|
||||
sha1 = crypto_sha1_init();
|
||||
crypto_sha1_update(sha1, client_random + 16, 16);
|
||||
@ -398,7 +398,7 @@ BOOL security_establish_keys(BYTE* client_random, rdpRdp* rdp)
|
||||
|
||||
memcpy(rdp->sign_key, session_key_blob, 16);
|
||||
|
||||
if (rdp->settings->server_mode)
|
||||
if (rdp->settings->ServerMode)
|
||||
{
|
||||
security_md5_16_32_32(&session_key_blob[16], client_random,
|
||||
server_random, rdp->encrypt_key);
|
||||
|
@ -69,7 +69,7 @@ void settings_client_load_hkey_local_machine(rdpSettings* settings)
|
||||
REG_QUERY_DWORD_VALUE(hKey, _T("DesktopWidth"), dwType, dwValue, dwSize, settings->DesktopWidth);
|
||||
REG_QUERY_DWORD_VALUE(hKey, _T("DesktopHeight"), dwType, dwValue, dwSize, settings->DesktopHeight);
|
||||
|
||||
REG_QUERY_BOOL_VALUE(hKey, _T("Fullscreen"), dwType, dwValue, dwSize, settings->fullscreen);
|
||||
REG_QUERY_BOOL_VALUE(hKey, _T("Fullscreen"), dwType, dwValue, dwSize, settings->Fullscreen);
|
||||
REG_QUERY_DWORD_VALUE(hKey, _T("ColorDepth"), dwType, dwValue, dwSize, settings->ColorDepth);
|
||||
|
||||
REG_QUERY_DWORD_VALUE(hKey, _T("KeyboardType"), dwType, dwValue, dwSize, settings->KeyboardType);
|
||||
@ -87,9 +87,9 @@ void settings_client_load_hkey_local_machine(rdpSettings* settings)
|
||||
|
||||
REG_QUERY_BOOL_VALUE(hKey, _T("BitmapCache"), dwType, dwValue, dwSize, settings->BitmapCacheEnabled);
|
||||
|
||||
REG_QUERY_BOOL_VALUE(hKey, _T("OffscreenBitmapCache"), dwType, dwValue, dwSize, settings->OffscreenBitmapCacheEnabled);
|
||||
REG_QUERY_DWORD_VALUE(hKey, _T("OffscreenBitmapCacheSize"), dwType, dwValue, dwSize, settings->OffscreenBitmapCacheSize);
|
||||
REG_QUERY_DWORD_VALUE(hKey, _T("OffscreenBitmapCacheEntries"), dwType, dwValue, dwSize, settings->OffscreenBitmapCacheEntries);
|
||||
REG_QUERY_BOOL_VALUE(hKey, _T("OffscreenBitmapCache"), dwType, dwValue, dwSize, settings->OffscreenSupportLevel);
|
||||
REG_QUERY_DWORD_VALUE(hKey, _T("OffscreenBitmapCacheSize"), dwType, dwValue, dwSize, settings->OffscreenCacheSize);
|
||||
REG_QUERY_DWORD_VALUE(hKey, _T("OffscreenBitmapCacheEntries"), dwType, dwValue, dwSize, settings->OffscreenCacheEntries);
|
||||
|
||||
RegCloseKey(hKey);
|
||||
}
|
||||
@ -153,8 +153,8 @@ void settings_client_load_hkey_local_machine(rdpSettings* settings)
|
||||
|
||||
if (status == ERROR_SUCCESS)
|
||||
{
|
||||
REG_QUERY_BOOL_VALUE(hKey, _T("LargePointer"), dwType, dwValue, dwSize, settings->LargePointer);
|
||||
REG_QUERY_BOOL_VALUE(hKey, _T("ColorPointer"), dwType, dwValue, dwSize, settings->ColorPointer);
|
||||
REG_QUERY_BOOL_VALUE(hKey, _T("LargePointer"), dwType, dwValue, dwSize, settings->LargePointerFlag);
|
||||
REG_QUERY_BOOL_VALUE(hKey, _T("ColorPointer"), dwType, dwValue, dwSize, settings->ColorPointerFlag);
|
||||
REG_QUERY_DWORD_VALUE(hKey, _T("PointerCacheSize"), dwType, dwValue, dwSize, settings->PointerCacheSize);
|
||||
|
||||
RegCloseKey(hKey);
|
||||
@ -184,7 +184,7 @@ void settings_server_load_hkey_local_machine(rdpSettings* settings)
|
||||
|
||||
void settings_load_hkey_local_machine(rdpSettings* settings)
|
||||
{
|
||||
if (settings->server_mode)
|
||||
if (settings->ServerMode)
|
||||
settings_server_load_hkey_local_machine(settings);
|
||||
else
|
||||
settings_client_load_hkey_local_machine(settings);
|
||||
@ -214,14 +214,14 @@ rdpSettings* settings_new(void* instance)
|
||||
/* Server instances are NULL */
|
||||
|
||||
if (!settings->instance)
|
||||
settings->server_mode = TRUE;
|
||||
settings->ServerMode = TRUE;
|
||||
|
||||
settings->DesktopWidth = 1024;
|
||||
settings->DesktopHeight = 768;
|
||||
settings->workarea = FALSE;
|
||||
settings->fullscreen = FALSE;
|
||||
settings->grab_keyboard = TRUE;
|
||||
settings->decorations = TRUE;
|
||||
settings->Workarea = FALSE;
|
||||
settings->Fullscreen = FALSE;
|
||||
settings->GrabKeyboard = TRUE;
|
||||
settings->Decorations = TRUE;
|
||||
settings->RdpVersion = 7;
|
||||
settings->ColorDepth = 16;
|
||||
settings->ExtSecurity = FALSE;
|
||||
@ -252,8 +252,8 @@ rdpSettings* settings_new(void* instance)
|
||||
settings->EncryptionLevel = ENCRYPTION_LEVEL_NONE;
|
||||
|
||||
settings->Authentication = TRUE;
|
||||
settings->authentication_only = FALSE;
|
||||
settings->from_stdin = FALSE;
|
||||
settings->AuthenticationOnly = FALSE;
|
||||
settings->CredentialsFromStdin = FALSE;
|
||||
|
||||
settings_get_computer_name(settings);
|
||||
|
||||
@ -290,8 +290,8 @@ rdpSettings* settings_new(void* instance)
|
||||
ZeroMemory(settings->ClientHostname, 32);
|
||||
ZeroMemory(settings->ClientProductId, 32);
|
||||
|
||||
settings->ColorPointer = TRUE;
|
||||
settings->LargePointer = TRUE;
|
||||
settings->ColorPointerFlag = TRUE;
|
||||
settings->LargePointerFlag = TRUE;
|
||||
settings->PointerCacheSize = 20;
|
||||
settings->SoundBeepsEnabled = TRUE;
|
||||
settings->DisableWallpaper = FALSE;
|
||||
@ -302,7 +302,7 @@ rdpSettings* settings_new(void* instance)
|
||||
|
||||
settings->DrawGdiPlusEnabled = FALSE;
|
||||
|
||||
settings->FrameMarkerEnabled = FALSE;
|
||||
settings->FrameMarkerCommandEnabled = FALSE;
|
||||
settings->BitmapCacheV3Enabled = FALSE;
|
||||
|
||||
settings->BitmapCacheEnabled = TRUE;
|
||||
@ -351,14 +351,14 @@ rdpSettings* settings_new(void* instance)
|
||||
settings->FragCache->cacheEntries = 256;
|
||||
settings->FragCache->cacheMaximumCellSize = 256;
|
||||
|
||||
settings->OffscreenBitmapCacheEnabled = TRUE;
|
||||
settings->OffscreenBitmapCacheSize = 7680;
|
||||
settings->OffscreenBitmapCacheEntries = 2000;
|
||||
settings->OffscreenSupportLevel = TRUE;
|
||||
settings->OffscreenCacheSize = 7680;
|
||||
settings->OffscreenCacheEntries = 2000;
|
||||
|
||||
settings->DrawNineGridCacheSize = 2560;
|
||||
settings->DrawNineGridCacheEntries = 256;
|
||||
|
||||
settings->client_dir = _strdup(client_dll);
|
||||
settings->ClientDir = _strdup(client_dll);
|
||||
|
||||
settings->RemoteAppNumIconCaches = 3;
|
||||
settings->RemoteAppNumIconCacheEntries = 12;
|
||||
@ -367,14 +367,14 @@ rdpSettings* settings_new(void* instance)
|
||||
|
||||
settings->MultifragMaxRequestSize = 0x200000;
|
||||
|
||||
settings->FastpathInput = TRUE;
|
||||
settings->FastpathOutput = TRUE;
|
||||
settings->FastPathInput = TRUE;
|
||||
settings->FastPathOutput = TRUE;
|
||||
|
||||
settings->FrameAcknowledge = 2;
|
||||
|
||||
gethostname(settings->ClientHostname, 31);
|
||||
settings->ClientHostname[31] = 0;
|
||||
settings->mouse_motion = TRUE;
|
||||
settings->MouseMotion = TRUE;
|
||||
|
||||
settings->ClientAutoReconnectCookie = (ARC_CS_PRIVATE_PACKET*) malloc(sizeof(ARC_CS_PRIVATE_PACKET));
|
||||
settings->ServerAutoReconnectCookie = (ARC_SC_PRIVATE_PACKET*) malloc(sizeof(ARC_SC_PRIVATE_PACKET));
|
||||
@ -396,14 +396,14 @@ void settings_free(rdpSettings* settings)
|
||||
{
|
||||
if (settings != NULL)
|
||||
{
|
||||
free(settings->Hostname);
|
||||
free(settings->ServerHostname);
|
||||
free(settings->Username);
|
||||
free(settings->Password);
|
||||
free(settings->Domain);
|
||||
free(settings->AlternateShell);
|
||||
free(settings->ShellWorkingDirectory);
|
||||
free(settings->ip_address);
|
||||
free(settings->client_dir);
|
||||
free(settings->ClientAddress);
|
||||
free(settings->ClientDir);
|
||||
free(settings->CertificateFile);
|
||||
free(settings->PrivateKeyFile);
|
||||
free(settings->ReceivedCapabilities);
|
||||
@ -421,9 +421,8 @@ void settings_free(rdpSettings* settings)
|
||||
free(settings->GlyphCache);
|
||||
free(settings->FragCache);
|
||||
key_free(settings->ServerKey);
|
||||
free(settings->config_path);
|
||||
free(settings->current_path);
|
||||
free(settings->development_path);
|
||||
free(settings->ConfigPath);
|
||||
free(settings->CurrentPath);
|
||||
free(settings);
|
||||
}
|
||||
}
|
||||
|
@ -80,8 +80,8 @@ void tcp_get_ip_address(rdpTcp * tcp)
|
||||
|
||||
tcp->ip_address[sizeof(tcp->ip_address) - 1] = 0;
|
||||
|
||||
tcp->settings->IPv6 = 0;
|
||||
tcp->settings->ip_address = _strdup(tcp->ip_address);
|
||||
tcp->settings->IPv6Enabled = 0;
|
||||
tcp->settings->ClientAddress = _strdup(tcp->ip_address);
|
||||
}
|
||||
|
||||
void tcp_get_mac_address(rdpTcp * tcp)
|
||||
|
@ -136,10 +136,10 @@ int credssp_ntlm_client_init(rdpCredssp* credssp)
|
||||
sspi_SecBufferAlloc(&credssp->PublicKey, credssp->tls->PublicKeyLength);
|
||||
CopyMemory(credssp->PublicKey.pvBuffer, credssp->tls->PublicKey, credssp->tls->PublicKeyLength);
|
||||
|
||||
length = sizeof(TERMSRV_SPN_PREFIX) + strlen(settings->Hostname);
|
||||
length = sizeof(TERMSRV_SPN_PREFIX) + strlen(settings->ServerHostname);
|
||||
|
||||
spn = (SEC_CHAR*) malloc(length + 1);
|
||||
sprintf(spn, "%s%s", TERMSRV_SPN_PREFIX, settings->Hostname);
|
||||
sprintf(spn, "%s%s", TERMSRV_SPN_PREFIX, settings->ServerHostname);
|
||||
|
||||
#ifdef UNICODE
|
||||
credssp->ServicePrincipalName = (LPTSTR) malloc(length * 2 + 2);
|
||||
@ -1251,7 +1251,7 @@ rdpCredssp* credssp_new(freerdp* instance, rdpTls* tls, rdpSettings* settings)
|
||||
|
||||
credssp->instance = instance;
|
||||
credssp->settings = settings;
|
||||
credssp->server = settings->server_mode;
|
||||
credssp->server = settings->ServerMode;
|
||||
credssp->tls = tls;
|
||||
credssp->send_seq_num = 0;
|
||||
credssp->recv_seq_num = 0;
|
||||
|
@ -140,7 +140,7 @@ BOOL tls_connect(rdpTls* tls)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!tls_verify_certificate(tls, cert, tls->settings->Hostname))
|
||||
if (!tls_verify_certificate(tls, cert, tls->settings->ServerHostname))
|
||||
{
|
||||
printf("tls_connect: certificate not trusted, aborting.\n");
|
||||
tls_disconnect(tls);
|
||||
|
@ -53,9 +53,9 @@ void freerdp_parse_hostname(rdpSettings* settings, char* hostname)
|
||||
&& (p[1] == 0 || (p[1] == ':' && !strchr(p + 2, ':'))))
|
||||
{
|
||||
/* Either "[...]" or "[...]:..." with at most one : after the brackets */
|
||||
settings->Hostname = _strdup(hostname + 1);
|
||||
settings->ServerHostname = _strdup(hostname + 1);
|
||||
|
||||
if ((p = strchr((char*)settings->Hostname, ']')))
|
||||
if ((p = strchr((char*) settings->ServerHostname, ']')))
|
||||
{
|
||||
*p = 0;
|
||||
|
||||
@ -66,9 +66,9 @@ void freerdp_parse_hostname(rdpSettings* settings, char* hostname)
|
||||
else
|
||||
{
|
||||
/* Port number is cut off and used if exactly one : in the string */
|
||||
settings->Hostname = _strdup(hostname);
|
||||
settings->ServerHostname = _strdup(hostname);
|
||||
|
||||
if ((p = strchr((char*)settings->Hostname, ':')) && !strchr(p + 1, ':'))
|
||||
if ((p = strchr((char*)settings->ServerHostname, ':')) && !strchr(p + 1, ':'))
|
||||
{
|
||||
*p = 0;
|
||||
settings->ServerPort = atoi(p + 1);
|
||||
@ -213,7 +213,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
|
||||
return FREERDP_ARGS_PARSE_FAILURE;
|
||||
}
|
||||
settings->Password = _strdup(argv[index]);
|
||||
settings->autologon = 1;
|
||||
settings->AutoLogonEnabled = TRUE;
|
||||
|
||||
/*
|
||||
* Overwrite original password which could be revealed by a simple "ps aux" command.
|
||||
@ -263,7 +263,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
|
||||
|
||||
if (strncmp("workarea", argv[index], 1) == 0)
|
||||
{
|
||||
settings->workarea = TRUE;
|
||||
settings->Workarea = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -275,9 +275,9 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
|
||||
}
|
||||
if (*p == '%')
|
||||
{
|
||||
settings->percent_screen = settings->DesktopWidth;
|
||||
settings->PercentScreen = settings->DesktopWidth;
|
||||
|
||||
if (settings->percent_screen <= 0 || settings->percent_screen > 100)
|
||||
if (settings->PercentScreen <= 0 || settings->PercentScreen > 100)
|
||||
{
|
||||
printf("invalid geometry percentage\n");
|
||||
return FREERDP_ARGS_PARSE_FAILURE;
|
||||
@ -292,11 +292,11 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
|
||||
}
|
||||
else if (strcmp("-f", argv[index]) == 0)
|
||||
{
|
||||
settings->fullscreen = TRUE;
|
||||
settings->Fullscreen = TRUE;
|
||||
}
|
||||
else if (strcmp("-D", argv[index]) == 0)
|
||||
{
|
||||
settings->decorations = FALSE;
|
||||
settings->Decorations = FALSE;
|
||||
}
|
||||
else if (strcmp("-T", argv[index]) == 0)
|
||||
{
|
||||
@ -307,7 +307,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
|
||||
return FREERDP_ARGS_PARSE_FAILURE;
|
||||
}
|
||||
|
||||
settings->window_title = _strdup(argv[index]);
|
||||
settings->WindowTitle = _strdup(argv[index]);
|
||||
}
|
||||
else if (strcmp("-t", argv[index]) == 0)
|
||||
{
|
||||
@ -331,7 +331,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
|
||||
}
|
||||
else if (strcmp("-K", argv[index]) == 0)
|
||||
{
|
||||
settings->grab_keyboard = FALSE;
|
||||
settings->GrabKeyboard = FALSE;
|
||||
}
|
||||
else if (strcmp("-n", argv[index]) == 0)
|
||||
{
|
||||
@ -346,7 +346,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
|
||||
}
|
||||
else if (strcmp("-o", argv[index]) == 0)
|
||||
{
|
||||
settings->ConsoleAudio = TRUE;
|
||||
settings->RemoteConsoleAudio = TRUE;
|
||||
}
|
||||
else if (strcmp("-0", argv[index]) == 0)
|
||||
{
|
||||
@ -354,7 +354,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
|
||||
}
|
||||
else if (strcmp("-z", argv[index]) == 0)
|
||||
{
|
||||
settings->compression = TRUE;
|
||||
settings->CompressionEnabled = TRUE;
|
||||
}
|
||||
else if (strcmp("--no-glyph-cache", argv[index]) == 0)
|
||||
{
|
||||
@ -362,7 +362,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
|
||||
}
|
||||
else if (strcmp("--no-osb", argv[index]) == 0)
|
||||
{
|
||||
settings->OffscreenBitmapCacheEnabled = FALSE;
|
||||
settings->OffscreenSupportLevel = FALSE;
|
||||
}
|
||||
else if (strcmp("--no-bmp-cache", argv[index]) == 0)
|
||||
{
|
||||
@ -374,11 +374,11 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
|
||||
}
|
||||
else if (strcmp("--authonly", argv[index]) == 0)
|
||||
{
|
||||
settings->authentication_only = TRUE;
|
||||
settings->AuthenticationOnly = TRUE;
|
||||
}
|
||||
else if (strcmp("--from-stdin", argv[index]) == 0)
|
||||
{
|
||||
settings->from_stdin = TRUE;
|
||||
settings->CredentialsFromStdin = TRUE;
|
||||
}
|
||||
else if (strcmp("--ignore-certificate", argv[index]) == 0)
|
||||
{
|
||||
@ -397,8 +397,8 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
|
||||
}
|
||||
else if (strcmp("--no-fastpath", argv[index]) == 0)
|
||||
{
|
||||
settings->FastpathInput = FALSE;
|
||||
settings->FastpathOutput = FALSE;
|
||||
settings->FastPathInput = FALSE;
|
||||
settings->FastPathOutput = FALSE;
|
||||
}
|
||||
else if (strcmp("--gdi", argv[index]) == 0)
|
||||
{
|
||||
@ -410,11 +410,11 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
|
||||
}
|
||||
if (strncmp("sw", argv[index], 1) == 0) /* software */
|
||||
{
|
||||
settings->sw_gdi = TRUE;
|
||||
settings->SoftwareGdi = TRUE;
|
||||
}
|
||||
else if (strncmp("hw", argv[index], 1) == 0) /* hardware */
|
||||
{
|
||||
settings->sw_gdi = FALSE;
|
||||
settings->SoftwareGdi = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -480,10 +480,10 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
|
||||
else if (strcmp("--rfx", argv[index]) == 0)
|
||||
{
|
||||
settings->RemoteFxCodec = TRUE;
|
||||
settings->FastpathOutput = TRUE;
|
||||
settings->FastPathOutput = TRUE;
|
||||
settings->ColorDepth = 32;
|
||||
settings->PerformanceFlags = PERF_FLAG_NONE;
|
||||
settings->LargePointer = TRUE;
|
||||
settings->LargePointerFlag = TRUE;
|
||||
}
|
||||
else if (strcmp("--rfx-mode", argv[index]) == 0)
|
||||
{
|
||||
@ -570,13 +570,13 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
|
||||
}
|
||||
else if (strcmp("--no-motion", argv[index]) == 0)
|
||||
{
|
||||
settings->mouse_motion = FALSE;
|
||||
settings->MouseMotion = FALSE;
|
||||
}
|
||||
else if (strcmp("--app", argv[index]) == 0)
|
||||
{
|
||||
settings->RemoteApplicationMode = TRUE;
|
||||
settings->RemoteAppLanguageBarSupported = TRUE;
|
||||
settings->workarea = TRUE;
|
||||
settings->Workarea = TRUE;
|
||||
settings->PerformanceFlags = PERF_DISABLE_WALLPAPER | PERF_DISABLE_FULLWINDOWDRAG;
|
||||
}
|
||||
else if (strcmp("-x", argv[index]) == 0)
|
||||
@ -620,9 +620,9 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
|
||||
return FREERDP_ARGS_PARSE_FAILURE;
|
||||
}
|
||||
|
||||
settings->parent_window_xid = strtol(argv[index], NULL, 0);
|
||||
settings->ParentWindowId = strtol(argv[index], NULL, 0);
|
||||
|
||||
if (settings->parent_window_xid == 0)
|
||||
if (settings->ParentWindowId == 0)
|
||||
{
|
||||
printf("invalid parent window XID\n");
|
||||
return FREERDP_ARGS_PARSE_FAILURE;
|
||||
@ -876,7 +876,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
|
||||
You can prompt for username, password, domain and hostname to avoid disclosing
|
||||
these settings to ps. */
|
||||
|
||||
if (settings->from_stdin)
|
||||
if (settings->CredentialsFromStdin)
|
||||
{
|
||||
/* username */
|
||||
if (NULL == settings->Username)
|
||||
@ -895,7 +895,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
|
||||
settings->Password = malloc(512 * sizeof(char));
|
||||
if (isatty(STDIN_FILENO))
|
||||
{
|
||||
freerdp_passphrase_read("password: ", settings->Password, 512, settings->from_stdin);
|
||||
freerdp_passphrase_read("password: ", settings->Password, 512, settings->CredentialsFromStdin);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -929,7 +929,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
|
||||
}
|
||||
}
|
||||
/* hostname */
|
||||
if (NULL == settings->Hostname)
|
||||
if (settings->ServerHostname == NULL)
|
||||
{
|
||||
char input[512];
|
||||
input[0] = '\0';
|
||||
@ -942,7 +942,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
|
||||
}
|
||||
|
||||
/* Must have a hostname. Do you? */
|
||||
if ((settings->Hostname == NULL) && (settings->ConnectionFile == NULL))
|
||||
if ((settings->ServerHostname == NULL) && (settings->ConnectionFile == NULL))
|
||||
{
|
||||
printf("missing server name\n");
|
||||
return FREERDP_ARGS_PARSE_FAILURE;
|
||||
|
@ -86,34 +86,34 @@ BOOL freerdp_check_file_exists(char* file)
|
||||
|
||||
char* freerdp_get_home_path(rdpSettings* settings)
|
||||
{
|
||||
if (settings->home_path == NULL)
|
||||
settings->home_path = getenv(HOME_ENV_VARIABLE);
|
||||
if (settings->home_path == NULL)
|
||||
settings->home_path = _strdup("/");
|
||||
if (settings->HomePath == NULL)
|
||||
settings->HomePath = getenv(HOME_ENV_VARIABLE);
|
||||
if (settings->HomePath == NULL)
|
||||
settings->HomePath = _strdup("/");
|
||||
|
||||
return settings->home_path;
|
||||
return settings->HomePath;
|
||||
}
|
||||
|
||||
char* freerdp_get_config_path(rdpSettings* settings)
|
||||
{
|
||||
if (settings->config_path != NULL)
|
||||
return settings->config_path;
|
||||
if (settings->ConfigPath != NULL)
|
||||
return settings->ConfigPath;
|
||||
|
||||
settings->config_path = (char*) malloc(strlen(settings->home_path) + sizeof(FREERDP_CONFIG_DIR) + 2);
|
||||
sprintf(settings->config_path, "%s" PATH_SEPARATOR_STR "%s", settings->home_path, FREERDP_CONFIG_DIR);
|
||||
settings->ConfigPath = (char*) malloc(strlen(settings->HomePath) + sizeof(FREERDP_CONFIG_DIR) + 2);
|
||||
sprintf(settings->ConfigPath, "%s" PATH_SEPARATOR_STR "%s", settings->HomePath, FREERDP_CONFIG_DIR);
|
||||
|
||||
if (!freerdp_check_file_exists(settings->config_path))
|
||||
freerdp_mkdir(settings->config_path);
|
||||
if (!freerdp_check_file_exists(settings->ConfigPath))
|
||||
freerdp_mkdir(settings->ConfigPath);
|
||||
|
||||
return settings->config_path;
|
||||
return settings->ConfigPath;
|
||||
}
|
||||
|
||||
char* freerdp_get_current_path(rdpSettings* settings)
|
||||
{
|
||||
if (settings->current_path == NULL)
|
||||
settings->current_path = getcwd(NULL, 0);
|
||||
if (settings->CurrentPath == NULL)
|
||||
settings->CurrentPath = getcwd(NULL, 0);
|
||||
|
||||
return settings->current_path;
|
||||
return settings->CurrentPath;
|
||||
}
|
||||
|
||||
char* freerdp_construct_path(char* base_path, char* relative_path)
|
||||
@ -216,54 +216,8 @@ BOOL freerdp_path_contains_separator(char* path)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* detects if we are running from the source tree */
|
||||
|
||||
BOOL freerdp_detect_development_mode(rdpSettings* settings)
|
||||
{
|
||||
int depth = 0;
|
||||
char* current_path;
|
||||
char* development_path = NULL;
|
||||
BOOL development_mode = FALSE;
|
||||
|
||||
if (freerdp_check_file_exists(".git"))
|
||||
{
|
||||
depth = 0;
|
||||
development_mode = TRUE;
|
||||
}
|
||||
else if (freerdp_check_file_exists(PARENT_PATH ".git"))
|
||||
{
|
||||
depth = 1;
|
||||
development_mode = TRUE;
|
||||
}
|
||||
else if (freerdp_check_file_exists(PARENT_PATH PARENT_PATH ".git"))
|
||||
{
|
||||
depth = 2;
|
||||
development_mode = TRUE;
|
||||
}
|
||||
|
||||
current_path = freerdp_get_current_path(settings);
|
||||
|
||||
if (development_mode)
|
||||
development_path = freerdp_get_parent_path(current_path, depth);
|
||||
|
||||
settings->development_mode = development_mode;
|
||||
settings->development_path = development_path;
|
||||
|
||||
return settings->development_mode;
|
||||
}
|
||||
|
||||
void freerdp_detect_paths(rdpSettings* settings)
|
||||
{
|
||||
freerdp_get_home_path(settings);
|
||||
freerdp_get_config_path(settings);
|
||||
freerdp_detect_development_mode(settings);
|
||||
|
||||
#if 0
|
||||
printf("home path: %s\n", settings->home_path);
|
||||
printf("config path: %s\n", settings->config_path);
|
||||
printf("current path: %s\n", settings->current_path);
|
||||
|
||||
if (settings->development_mode)
|
||||
printf("development path: %s\n", settings->development_path);
|
||||
#endif
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ BOOL mf_peer_post_connect(freerdp_peer* client)
|
||||
|
||||
printf("Client %s is activated\n", client->hostname);
|
||||
|
||||
if (client->settings->autologon)
|
||||
if (client->settings->AutoLogonEnabled)
|
||||
{
|
||||
printf(" and wants to login automatically as %s\\%s",
|
||||
client->settings->Domain ? client->settings->Domain : "",
|
||||
|
@ -467,7 +467,7 @@ BOOL tf_peer_post_connect(freerdp_peer* client)
|
||||
printf("Client %s is activated (osMajorType %d osMinorType %d)", client->local ? "(local)" : client->hostname,
|
||||
client->settings->OsMajorType, client->settings->OsMinorType);
|
||||
|
||||
if (client->settings->autologon)
|
||||
if (client->settings->AutoLogonEnabled)
|
||||
{
|
||||
printf(" and wants to login automatically as %s\\%s",
|
||||
client->settings->Domain ? client->settings->Domain : "",
|
||||
|
@ -547,7 +547,7 @@ BOOL xf_peer_post_connect(freerdp_peer* client)
|
||||
* callback returns.
|
||||
*/
|
||||
printf("Client %s is activated", client->hostname);
|
||||
if (client->settings->autologon)
|
||||
if (client->settings->AutoLogonEnabled)
|
||||
{
|
||||
printf(" and wants to login automatically as %s\\%s",
|
||||
client->settings->Domain ? client->settings->Domain : "",
|
||||
@ -623,17 +623,10 @@ void* xf_peer_main_loop(void* arg)
|
||||
|
||||
/* Initialize the real server settings here */
|
||||
|
||||
if (settings->development_mode)
|
||||
{
|
||||
server_file_path = freerdp_construct_path(settings->development_path, "server/X11");
|
||||
}
|
||||
else
|
||||
{
|
||||
server_file_path = freerdp_construct_path(settings->config_path, "server");
|
||||
server_file_path = freerdp_construct_path(settings->ConfigPath, "server");
|
||||
|
||||
if (!freerdp_check_file_exists(server_file_path))
|
||||
freerdp_mkdir(server_file_path);
|
||||
}
|
||||
if (!freerdp_check_file_exists(server_file_path))
|
||||
freerdp_mkdir(server_file_path);
|
||||
|
||||
settings->CertificateFile = freerdp_construct_path(server_file_path, "server.crt");
|
||||
settings->PrivateKeyFile = freerdp_construct_path(server_file_path, "server.key");
|
||||
|
Loading…
Reference in New Issue
Block a user