libfreerdp-core: rdpSettings refactoring (part 2)

This commit is contained in:
Marc-André Moreau 2012-11-07 15:13:14 -05:00
parent 1a2839a165
commit 6427c9dd90
48 changed files with 974 additions and 946 deletions

View File

@ -1241,10 +1241,10 @@ int freerdp_channels_post_connect(rdpChannels* channels, freerdp* instance)
struct lib_data* llib; struct lib_data* llib;
channels->is_connected = 1; channels->is_connected = 1;
hostname = instance->settings->hostname; hostname = instance->settings->Hostname;
hostname_len = strlen(hostname); hostname_len = strlen(hostname);
DEBUG_CHANNELS("hostname [%s] channels->num_libs [%d]", hostname, channels->num_libs_data); DEBUG_CHANNELS("hostname [%s] channels->num_libs [%d]", Hostname, channels->num_libs_data);
for (index = 0; index < channels->num_libs_data; index++) for (index = 0; index < channels->num_libs_data; index++)
{ {

View File

@ -539,7 +539,7 @@ void* WTSVirtualChannelOpenEx(
channel->vcm = vcm; channel->vcm = vcm;
channel->client = client; channel->client = client;
channel->channel_type = RDP_PEER_CHANNEL_TYPE_DVC; channel->channel_type = RDP_PEER_CHANNEL_TYPE_DVC;
channel->receive_data = stream_new(client->settings->vc_chunk_size); channel->receive_data = stream_new(client->settings->VirtualChannelChunkSize);
channel->receive_event = wait_obj_new(); channel->receive_event = wait_obj_new();
channel->receive_queue = list_new(); channel->receive_queue = list_new();
channel->mutex = CreateMutex(NULL, FALSE, NULL); channel->mutex = CreateMutex(NULL, FALSE, NULL);
@ -585,7 +585,7 @@ void* WTSVirtualChannelOpenEx(
channel->channel_id = client->settings->channels[i].channel_id; channel->channel_id = client->settings->channels[i].channel_id;
channel->index = i; channel->index = i;
channel->channel_type = RDP_PEER_CHANNEL_TYPE_SVC; channel->channel_type = RDP_PEER_CHANNEL_TYPE_SVC;
channel->receive_data = stream_new(client->settings->vc_chunk_size); channel->receive_data = stream_new(client->settings->VirtualChannelChunkSize);
channel->receive_event = wait_obj_new(); channel->receive_event = wait_obj_new();
channel->receive_queue = list_new(); channel->receive_queue = list_new();
channel->mutex = CreateMutex(NULL, FALSE, NULL); channel->mutex = CreateMutex(NULL, FALSE, NULL);
@ -738,8 +738,8 @@ BOOL WTSVirtualChannelWrite(
while (Length > 0) while (Length > 0)
{ {
item = xnew(wts_data_item); item = xnew(wts_data_item);
item->buffer = malloc(channel->client->settings->vc_chunk_size); item->buffer = malloc(channel->client->settings->VirtualChannelChunkSize);
stream_attach(s, item->buffer, channel->client->settings->vc_chunk_size); stream_attach(s, item->buffer, channel->client->settings->VirtualChannelChunkSize);
stream_seek_BYTE(s); stream_seek_BYTE(s);
cbChId = wts_write_variable_uint(s, channel->channel_id); cbChId = wts_write_variable_uint(s, channel->channel_id);

View File

@ -125,32 +125,32 @@ BOOL df_pre_connect(freerdp* instance)
context->dfi = dfi; context->dfi = dfi;
settings = instance->settings; settings = instance->settings;
bitmap_cache = settings->bitmap_cache; bitmap_cache = settings->BitmapCacheEnabled;
settings->order_support[NEG_DSTBLT_INDEX] = TRUE; settings->OrderSupport[NEG_DSTBLT_INDEX] = TRUE;
settings->order_support[NEG_PATBLT_INDEX] = TRUE; settings->OrderSupport[NEG_PATBLT_INDEX] = TRUE;
settings->order_support[NEG_SCRBLT_INDEX] = TRUE; settings->OrderSupport[NEG_SCRBLT_INDEX] = TRUE;
settings->order_support[NEG_OPAQUE_RECT_INDEX] = TRUE; settings->OrderSupport[NEG_OPAQUE_RECT_INDEX] = TRUE;
settings->order_support[NEG_DRAWNINEGRID_INDEX] = FALSE; settings->OrderSupport[NEG_DRAWNINEGRID_INDEX] = FALSE;
settings->order_support[NEG_MULTIDSTBLT_INDEX] = FALSE; settings->OrderSupport[NEG_MULTIDSTBLT_INDEX] = FALSE;
settings->order_support[NEG_MULTIPATBLT_INDEX] = FALSE; settings->OrderSupport[NEG_MULTIPATBLT_INDEX] = FALSE;
settings->order_support[NEG_MULTISCRBLT_INDEX] = FALSE; settings->OrderSupport[NEG_MULTISCRBLT_INDEX] = FALSE;
settings->order_support[NEG_MULTIOPAQUERECT_INDEX] = TRUE; settings->OrderSupport[NEG_MULTIOPAQUERECT_INDEX] = TRUE;
settings->order_support[NEG_MULTI_DRAWNINEGRID_INDEX] = FALSE; settings->OrderSupport[NEG_MULTI_DRAWNINEGRID_INDEX] = FALSE;
settings->order_support[NEG_LINETO_INDEX] = TRUE; settings->OrderSupport[NEG_LINETO_INDEX] = TRUE;
settings->order_support[NEG_POLYLINE_INDEX] = TRUE; settings->OrderSupport[NEG_POLYLINE_INDEX] = TRUE;
settings->order_support[NEG_MEMBLT_INDEX] = bitmap_cache; settings->OrderSupport[NEG_MEMBLT_INDEX] = bitmap_cache;
settings->order_support[NEG_MEM3BLT_INDEX] = FALSE; settings->OrderSupport[NEG_MEM3BLT_INDEX] = FALSE;
settings->order_support[NEG_MEMBLT_V2_INDEX] = bitmap_cache; settings->OrderSupport[NEG_MEMBLT_V2_INDEX] = bitmap_cache;
settings->order_support[NEG_MEM3BLT_V2_INDEX] = FALSE; settings->OrderSupport[NEG_MEM3BLT_V2_INDEX] = FALSE;
settings->order_support[NEG_SAVEBITMAP_INDEX] = FALSE; settings->OrderSupport[NEG_SAVEBITMAP_INDEX] = FALSE;
settings->order_support[NEG_GLYPH_INDEX_INDEX] = FALSE; settings->OrderSupport[NEG_GLYPH_INDEX_INDEX] = FALSE;
settings->order_support[NEG_FAST_INDEX_INDEX] = FALSE; settings->OrderSupport[NEG_FAST_INDEX_INDEX] = FALSE;
settings->order_support[NEG_FAST_GLYPH_INDEX] = FALSE; settings->OrderSupport[NEG_FAST_GLYPH_INDEX] = FALSE;
settings->order_support[NEG_POLYGON_SC_INDEX] = FALSE; settings->OrderSupport[NEG_POLYGON_SC_INDEX] = FALSE;
settings->order_support[NEG_POLYGON_CB_INDEX] = FALSE; settings->OrderSupport[NEG_POLYGON_CB_INDEX] = FALSE;
settings->order_support[NEG_ELLIPSE_SC_INDEX] = FALSE; settings->OrderSupport[NEG_ELLIPSE_SC_INDEX] = FALSE;
settings->order_support[NEG_ELLIPSE_CB_INDEX] = FALSE; settings->OrderSupport[NEG_ELLIPSE_CB_INDEX] = FALSE;
dfi->clrconv = xnew(CLRCONV); dfi->clrconv = xnew(CLRCONV);
dfi->clrconv->alpha = 1; dfi->clrconv->alpha = 1;

View File

@ -156,28 +156,28 @@ BOOL tf_pre_connect(freerdp* instance)
settings = instance->settings; settings = instance->settings;
settings->order_support[NEG_DSTBLT_INDEX] = TRUE; settings->OrderSupport[NEG_DSTBLT_INDEX] = TRUE;
settings->order_support[NEG_PATBLT_INDEX] = TRUE; settings->OrderSupport[NEG_PATBLT_INDEX] = TRUE;
settings->order_support[NEG_SCRBLT_INDEX] = TRUE; settings->OrderSupport[NEG_SCRBLT_INDEX] = TRUE;
settings->order_support[NEG_OPAQUE_RECT_INDEX] = TRUE; settings->OrderSupport[NEG_OPAQUE_RECT_INDEX] = TRUE;
settings->order_support[NEG_DRAWNINEGRID_INDEX] = TRUE; settings->OrderSupport[NEG_DRAWNINEGRID_INDEX] = TRUE;
settings->order_support[NEG_MULTIDSTBLT_INDEX] = TRUE; settings->OrderSupport[NEG_MULTIDSTBLT_INDEX] = TRUE;
settings->order_support[NEG_MULTIPATBLT_INDEX] = TRUE; settings->OrderSupport[NEG_MULTIPATBLT_INDEX] = TRUE;
settings->order_support[NEG_MULTISCRBLT_INDEX] = TRUE; settings->OrderSupport[NEG_MULTISCRBLT_INDEX] = TRUE;
settings->order_support[NEG_MULTIOPAQUERECT_INDEX] = TRUE; settings->OrderSupport[NEG_MULTIOPAQUERECT_INDEX] = TRUE;
settings->order_support[NEG_MULTI_DRAWNINEGRID_INDEX] = TRUE; settings->OrderSupport[NEG_MULTI_DRAWNINEGRID_INDEX] = TRUE;
settings->order_support[NEG_LINETO_INDEX] = TRUE; settings->OrderSupport[NEG_LINETO_INDEX] = TRUE;
settings->order_support[NEG_POLYLINE_INDEX] = TRUE; settings->OrderSupport[NEG_POLYLINE_INDEX] = TRUE;
settings->order_support[NEG_MEMBLT_INDEX] = TRUE; settings->OrderSupport[NEG_MEMBLT_INDEX] = TRUE;
settings->order_support[NEG_MEM3BLT_INDEX] = TRUE; settings->OrderSupport[NEG_MEM3BLT_INDEX] = TRUE;
settings->order_support[NEG_SAVEBITMAP_INDEX] = TRUE; settings->OrderSupport[NEG_SAVEBITMAP_INDEX] = TRUE;
settings->order_support[NEG_GLYPH_INDEX_INDEX] = TRUE; settings->OrderSupport[NEG_GLYPH_INDEX_INDEX] = TRUE;
settings->order_support[NEG_FAST_INDEX_INDEX] = TRUE; settings->OrderSupport[NEG_FAST_INDEX_INDEX] = TRUE;
settings->order_support[NEG_FAST_GLYPH_INDEX] = TRUE; settings->OrderSupport[NEG_FAST_GLYPH_INDEX] = TRUE;
settings->order_support[NEG_POLYGON_SC_INDEX] = TRUE; settings->OrderSupport[NEG_POLYGON_SC_INDEX] = TRUE;
settings->order_support[NEG_POLYGON_CB_INDEX] = TRUE; settings->OrderSupport[NEG_POLYGON_CB_INDEX] = TRUE;
settings->order_support[NEG_ELLIPSE_SC_INDEX] = TRUE; settings->OrderSupport[NEG_ELLIPSE_SC_INDEX] = TRUE;
settings->order_support[NEG_ELLIPSE_CB_INDEX] = TRUE; settings->OrderSupport[NEG_ELLIPSE_CB_INDEX] = TRUE;
freerdp_channels_pre_connect(instance->context->channels, instance); freerdp_channels_pre_connect(instance->context->channels, instance);

View File

@ -159,42 +159,42 @@ BOOL wf_pre_connect(freerdp* instance)
settings = instance->settings; settings = instance->settings;
if (settings->connection_file) if (settings->ConnectionFile)
{ {
file = freerdp_client_rdp_file_new(); file = freerdp_client_rdp_file_new();
printf("Using connection file: %s\n", settings->connection_file); printf("Using connection file: %s\n", settings->ConnectionFile);
freerdp_client_parse_rdp_file(file, settings->connection_file); freerdp_client_parse_rdp_file(file, settings->ConnectionFile);
freerdp_client_populate_settings_from_rdp_file(file, settings); freerdp_client_populate_settings_from_rdp_file(file, settings);
} }
settings->os_major_type = OSMAJORTYPE_WINDOWS; settings->OsMajorType = OSMAJORTYPE_WINDOWS;
settings->os_minor_type = OSMINORTYPE_WINDOWS_NT; settings->OsMinorType = OSMINORTYPE_WINDOWS_NT;
settings->order_support[NEG_DSTBLT_INDEX] = TRUE; settings->OrderSupport[NEG_DSTBLT_INDEX] = TRUE;
settings->order_support[NEG_PATBLT_INDEX] = TRUE; settings->OrderSupport[NEG_PATBLT_INDEX] = TRUE;
settings->order_support[NEG_SCRBLT_INDEX] = TRUE; settings->OrderSupport[NEG_SCRBLT_INDEX] = TRUE;
settings->order_support[NEG_OPAQUE_RECT_INDEX] = TRUE; settings->OrderSupport[NEG_OPAQUE_RECT_INDEX] = TRUE;
settings->order_support[NEG_DRAWNINEGRID_INDEX] = FALSE; settings->OrderSupport[NEG_DRAWNINEGRID_INDEX] = FALSE;
settings->order_support[NEG_MULTIDSTBLT_INDEX] = FALSE; settings->OrderSupport[NEG_MULTIDSTBLT_INDEX] = FALSE;
settings->order_support[NEG_MULTIPATBLT_INDEX] = FALSE; settings->OrderSupport[NEG_MULTIPATBLT_INDEX] = FALSE;
settings->order_support[NEG_MULTISCRBLT_INDEX] = FALSE; settings->OrderSupport[NEG_MULTISCRBLT_INDEX] = FALSE;
settings->order_support[NEG_MULTIOPAQUERECT_INDEX] = TRUE; settings->OrderSupport[NEG_MULTIOPAQUERECT_INDEX] = TRUE;
settings->order_support[NEG_MULTI_DRAWNINEGRID_INDEX] = FALSE; settings->OrderSupport[NEG_MULTI_DRAWNINEGRID_INDEX] = FALSE;
settings->order_support[NEG_LINETO_INDEX] = TRUE; settings->OrderSupport[NEG_LINETO_INDEX] = TRUE;
settings->order_support[NEG_POLYLINE_INDEX] = TRUE; settings->OrderSupport[NEG_POLYLINE_INDEX] = TRUE;
settings->order_support[NEG_MEMBLT_INDEX] = TRUE; settings->OrderSupport[NEG_MEMBLT_INDEX] = TRUE;
settings->order_support[NEG_MEM3BLT_INDEX] = FALSE; settings->OrderSupport[NEG_MEM3BLT_INDEX] = FALSE;
settings->order_support[NEG_SAVEBITMAP_INDEX] = FALSE; settings->OrderSupport[NEG_SAVEBITMAP_INDEX] = FALSE;
settings->order_support[NEG_GLYPH_INDEX_INDEX] = FALSE; settings->OrderSupport[NEG_GLYPH_INDEX_INDEX] = FALSE;
settings->order_support[NEG_FAST_INDEX_INDEX] = FALSE; settings->OrderSupport[NEG_FAST_INDEX_INDEX] = FALSE;
settings->order_support[NEG_FAST_GLYPH_INDEX] = FALSE; settings->OrderSupport[NEG_FAST_GLYPH_INDEX] = FALSE;
settings->order_support[NEG_POLYGON_SC_INDEX] = FALSE; settings->OrderSupport[NEG_POLYGON_SC_INDEX] = FALSE;
settings->order_support[NEG_POLYGON_CB_INDEX] = FALSE; settings->OrderSupport[NEG_POLYGON_CB_INDEX] = FALSE;
settings->order_support[NEG_ELLIPSE_SC_INDEX] = FALSE; settings->OrderSupport[NEG_ELLIPSE_SC_INDEX] = FALSE;
settings->order_support[NEG_ELLIPSE_CB_INDEX] = FALSE; settings->OrderSupport[NEG_ELLIPSE_CB_INDEX] = FALSE;
settings->glyphSupportLevel = GLYPH_SUPPORT_NONE; settings->GlyphSupportLevel = GLYPH_SUPPORT_NONE;
wfi->cursor = g_default_cursor; wfi->cursor = g_default_cursor;
@ -330,23 +330,23 @@ BOOL wf_post_connect(freerdp* instance)
wfi->image = wf_image_new(wfi, 64, 64, 32, NULL); wfi->image = wf_image_new(wfi, 64, 64, 32, NULL);
wfi->image->_bitmap.data = NULL; wfi->image->_bitmap.data = NULL;
if (settings->rfx_codec) if (settings->RemoteFxCodec)
{ {
wfi->tile = wf_image_new(wfi, 64, 64, 32, NULL); wfi->tile = wf_image_new(wfi, 64, 64, 32, NULL);
wfi->rfx_context = rfx_context_new(); wfi->rfx_context = rfx_context_new();
rfx_context_set_cpu_opt(wfi->rfx_context, wfi_detect_cpu()); rfx_context_set_cpu_opt(wfi->rfx_context, wfi_detect_cpu());
} }
if (settings->ns_codec) if (settings->NSCodec)
wfi->nsc_context = nsc_context_new(); wfi->nsc_context = nsc_context_new();
} }
if (settings->window_title != NULL) if (settings->window_title != NULL)
_snwprintf(win_title, ARRAY_SIZE(win_title), L"%S", settings->window_title); _snwprintf(win_title, ARRAY_SIZE(win_title), L"%S", settings->window_title);
else if (settings->port == 3389) 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->Hostname);
else else
_snwprintf(win_title, ARRAY_SIZE(win_title), L"FreeRDP: %S:%d", settings->hostname, settings->port); _snwprintf(win_title, ARRAY_SIZE(win_title), L"FreeRDP: %S:%d", settings->Hostname, settings->ServerPort);
if (wfi->hwnd == 0) if (wfi->hwnd == 0)
{ {

View File

@ -398,7 +398,7 @@ xfWindow* xf_CreateDesktopWindow(xfInfo* xfi, char* name, int width, int height,
* This extra call after the window is mapped will position the login window correctly * This extra call after the window is mapped will position the login window correctly
*/ */
if (xfi->instance->settings->remote_app) if (xfi->instance->settings->RemoteApplicationMode)
XMoveWindow(xfi->display, window->handle, 0, 0); XMoveWindow(xfi->display, window->handle, 0, 0);
} }

View File

@ -316,15 +316,15 @@ void xf_create_window(xfInfo* xfi)
{ {
win_title = _strdup(xfi->instance->settings->window_title); win_title = _strdup(xfi->instance->settings->window_title);
} }
else if (xfi->instance->settings->port == 3389) else if (xfi->instance->settings->ServerPort == 3389)
{ {
win_title = malloc(1 + sizeof("FreeRDP: ") + strlen(xfi->instance->settings->hostname)); win_title = malloc(1 + sizeof("FreeRDP: ") + strlen(xfi->instance->settings->Hostname));
sprintf(win_title, "FreeRDP: %s", xfi->instance->settings->hostname); sprintf(win_title, "FreeRDP: %s", xfi->instance->settings->Hostname);
} }
else else
{ {
win_title = malloc(1 + sizeof("FreeRDP: ") + strlen(xfi->instance->settings->hostname) + sizeof(":00000")); 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->port); sprintf(win_title, "FreeRDP: %s:%i", xfi->instance->settings->Hostname, xfi->instance->settings->ServerPort);
} }
xfi->window = xf_CreateDesktopWindow(xfi, win_title, width, height, xfi->decorations); xfi->window = xf_CreateDesktopWindow(xfi, win_title, width, height, xfi->decorations);
@ -534,61 +534,61 @@ BOOL xf_pre_connect(freerdp* instance)
settings = instance->settings; settings = instance->settings;
if (settings->connection_file) if (settings->ConnectionFile)
{ {
file = freerdp_client_rdp_file_new(); file = freerdp_client_rdp_file_new();
printf("Using connection file: %s\n", settings->connection_file); printf("Using connection file: %s\n", settings->ConnectionFile);
freerdp_client_parse_rdp_file(file, settings->connection_file); freerdp_client_parse_rdp_file(file, settings->ConnectionFile);
freerdp_client_populate_settings_from_rdp_file(file, settings); freerdp_client_populate_settings_from_rdp_file(file, settings);
} }
bitmap_cache = settings->bitmap_cache; bitmap_cache = settings->BitmapCacheEnabled;
settings->os_major_type = OSMAJORTYPE_UNIX; settings->OsMajorType = OSMAJORTYPE_UNIX;
settings->os_minor_type = OSMINORTYPE_NATIVE_XSERVER; settings->OsMinorType = OSMINORTYPE_NATIVE_XSERVER;
settings->order_support[NEG_DSTBLT_INDEX] = TRUE; settings->OrderSupport[NEG_DSTBLT_INDEX] = TRUE;
settings->order_support[NEG_PATBLT_INDEX] = TRUE; settings->OrderSupport[NEG_PATBLT_INDEX] = TRUE;
settings->order_support[NEG_SCRBLT_INDEX] = TRUE; settings->OrderSupport[NEG_SCRBLT_INDEX] = TRUE;
settings->order_support[NEG_OPAQUE_RECT_INDEX] = TRUE; settings->OrderSupport[NEG_OPAQUE_RECT_INDEX] = TRUE;
settings->order_support[NEG_DRAWNINEGRID_INDEX] = FALSE; settings->OrderSupport[NEG_DRAWNINEGRID_INDEX] = FALSE;
settings->order_support[NEG_MULTIDSTBLT_INDEX] = FALSE; settings->OrderSupport[NEG_MULTIDSTBLT_INDEX] = FALSE;
settings->order_support[NEG_MULTIPATBLT_INDEX] = FALSE; settings->OrderSupport[NEG_MULTIPATBLT_INDEX] = FALSE;
settings->order_support[NEG_MULTISCRBLT_INDEX] = FALSE; settings->OrderSupport[NEG_MULTISCRBLT_INDEX] = FALSE;
settings->order_support[NEG_MULTIOPAQUERECT_INDEX] = TRUE; settings->OrderSupport[NEG_MULTIOPAQUERECT_INDEX] = TRUE;
settings->order_support[NEG_MULTI_DRAWNINEGRID_INDEX] = FALSE; settings->OrderSupport[NEG_MULTI_DRAWNINEGRID_INDEX] = FALSE;
settings->order_support[NEG_LINETO_INDEX] = TRUE; settings->OrderSupport[NEG_LINETO_INDEX] = TRUE;
settings->order_support[NEG_POLYLINE_INDEX] = TRUE; settings->OrderSupport[NEG_POLYLINE_INDEX] = TRUE;
settings->order_support[NEG_MEMBLT_INDEX] = bitmap_cache; settings->OrderSupport[NEG_MEMBLT_INDEX] = bitmap_cache;
settings->order_support[NEG_MEM3BLT_INDEX] = (settings->sw_gdi) ? TRUE : FALSE; settings->OrderSupport[NEG_MEM3BLT_INDEX] = (settings->sw_gdi) ? TRUE : FALSE;
settings->order_support[NEG_MEMBLT_V2_INDEX] = bitmap_cache; settings->OrderSupport[NEG_MEMBLT_V2_INDEX] = bitmap_cache;
settings->order_support[NEG_MEM3BLT_V2_INDEX] = FALSE; settings->OrderSupport[NEG_MEM3BLT_V2_INDEX] = FALSE;
settings->order_support[NEG_SAVEBITMAP_INDEX] = FALSE; settings->OrderSupport[NEG_SAVEBITMAP_INDEX] = FALSE;
settings->order_support[NEG_GLYPH_INDEX_INDEX] = TRUE; settings->OrderSupport[NEG_GLYPH_INDEX_INDEX] = TRUE;
settings->order_support[NEG_FAST_INDEX_INDEX] = TRUE; settings->OrderSupport[NEG_FAST_INDEX_INDEX] = TRUE;
settings->order_support[NEG_FAST_GLYPH_INDEX] = TRUE; settings->OrderSupport[NEG_FAST_GLYPH_INDEX] = TRUE;
settings->order_support[NEG_POLYGON_SC_INDEX] = (settings->sw_gdi) ? FALSE : TRUE; settings->OrderSupport[NEG_POLYGON_SC_INDEX] = (settings->sw_gdi) ? FALSE : TRUE;
settings->order_support[NEG_POLYGON_CB_INDEX] = (settings->sw_gdi) ? FALSE : TRUE; settings->OrderSupport[NEG_POLYGON_CB_INDEX] = (settings->sw_gdi) ? FALSE : TRUE;
settings->order_support[NEG_ELLIPSE_SC_INDEX] = FALSE; settings->OrderSupport[NEG_ELLIPSE_SC_INDEX] = FALSE;
settings->order_support[NEG_ELLIPSE_CB_INDEX] = FALSE; settings->OrderSupport[NEG_ELLIPSE_CB_INDEX] = FALSE;
freerdp_channels_pre_connect(xfi->_context->channels, instance); freerdp_channels_pre_connect(xfi->_context->channels, instance);
if (settings->authentication_only) if (settings->authentication_only)
{ {
/* Check --authonly has a username and password. */ /* Check --authonly has a username and password. */
if (settings->username == NULL ) if (settings->Username == NULL )
{ {
fprintf(stderr, "--authonly, but no -u username. Please provide one.\n"); fprintf(stderr, "--authonly, but no -u username. Please provide one.\n");
exit(1); exit(1);
} }
if (settings->password == NULL ) if (settings->Password == NULL )
{ {
fprintf(stderr, "--authonly, but no -p password. Please provide one.\n"); fprintf(stderr, "--authonly, but no -p password. Please provide one.\n");
exit(1); exit(1);
@ -753,13 +753,13 @@ BOOL xf_post_connect(freerdp* instance)
xfi->hdc = gdi_CreateDC(xfi->clrconv, xfi->bpp); xfi->hdc = gdi_CreateDC(xfi->clrconv, xfi->bpp);
if (instance->settings->rfx_codec) if (instance->settings->RemoteFxCodec)
{ {
rfx_context = (void*) rfx_context_new(); rfx_context = (void*) rfx_context_new();
xfi->rfx_context = rfx_context; xfi->rfx_context = rfx_context;
} }
if (instance->settings->ns_codec) if (instance->settings->NSCodec)
{ {
nsc_context = (void*) nsc_context_new(); nsc_context = (void*) nsc_context_new();
xfi->nsc_context = nsc_context; xfi->nsc_context = nsc_context;

View File

@ -174,7 +174,7 @@ int freerdp_client_command_line_pre_filter(void* context, int index, LPCSTR arg)
if (_stricmp(&arg[length - 4], ".rdp") == 0) if (_stricmp(&arg[length - 4], ".rdp") == 0)
{ {
settings = (rdpSettings*) context; settings = (rdpSettings*) context;
settings->connection_file = _strdup(arg); settings->ConnectionFile = _strdup(arg);
} }
} }
} }
@ -243,19 +243,19 @@ int freerdp_client_parse_command_line_arguments(int argc, char** argv, rdpSettin
if (p) if (p)
{ {
length = p - arg->Value; length = p - arg->Value;
settings->port = atoi(&p[1]); settings->ServerPort = atoi(&p[1]);
settings->hostname = (char*) malloc(length + 1); settings->Hostname = (char*) malloc(length + 1);
strncpy(settings->hostname, arg->Value, length); strncpy(settings->Hostname, arg->Value, length);
settings->hostname[length] = '\0'; settings->Hostname[length] = '\0';
} }
else else
{ {
settings->hostname = _strdup(arg->Value); settings->Hostname = _strdup(arg->Value);
} }
} }
CommandLineSwitchCase(arg, "port") CommandLineSwitchCase(arg, "port")
{ {
settings->port = atoi(arg->Value); settings->ServerPort = atoi(arg->Value);
} }
CommandLineSwitchCase(arg, "w") CommandLineSwitchCase(arg, "w")
{ {
@ -310,23 +310,23 @@ int freerdp_client_parse_command_line_arguments(int argc, char** argv, rdpSettin
if (p) if (p)
{ {
length = p - arg->Value; length = p - arg->Value;
settings->domain = (char*) malloc(length + 1); settings->Domain = (char*) malloc(length + 1);
strncpy(settings->domain, arg->Value, length); strncpy(settings->Domain, arg->Value, length);
settings->domain[length] = '\0'; settings->Domain[length] = '\0';
settings->username = _strdup(&p[1]); settings->Username = _strdup(&p[1]);
} }
else else
{ {
settings->username = _strdup(arg->Value); settings->Username = _strdup(arg->Value);
} }
} }
CommandLineSwitchCase(arg, "d") CommandLineSwitchCase(arg, "d")
{ {
settings->domain = _strdup(arg->Value); settings->Domain = _strdup(arg->Value);
} }
CommandLineSwitchCase(arg, "p") CommandLineSwitchCase(arg, "p")
{ {
settings->password = _strdup(arg->Value); settings->Password = _strdup(arg->Value);
} }
CommandLineSwitchCase(arg, "g") CommandLineSwitchCase(arg, "g")
{ {
@ -335,17 +335,17 @@ int freerdp_client_parse_command_line_arguments(int argc, char** argv, rdpSettin
if (p) if (p)
{ {
length = p - arg->Value; length = p - arg->Value;
settings->tsg_port = atoi(&p[1]); settings->GatewayPort = atoi(&p[1]);
settings->tsg_hostname = (char*) malloc(length + 1); settings->GatewayHostname = (char*) malloc(length + 1);
strncpy(settings->tsg_hostname, arg->Value, length); strncpy(settings->GatewayHostname, arg->Value, length);
settings->tsg_hostname[length] = '\0'; settings->GatewayHostname[length] = '\0';
} }
else else
{ {
settings->tsg_hostname = _strdup(arg->Value); settings->GatewayHostname = _strdup(arg->Value);
} }
settings->ts_gateway = TRUE; settings->GatewayUsageMethod = TRUE;
} }
CommandLineSwitchCase(arg, "gu") CommandLineSwitchCase(arg, "gu")
{ {
@ -357,27 +357,27 @@ int freerdp_client_parse_command_line_arguments(int argc, char** argv, rdpSettin
if (p) if (p)
{ {
length = p - arg->Value; length = p - arg->Value;
settings->tsg_domain = (char*) malloc(length + 1); settings->GatewayDomain = (char*) malloc(length + 1);
strncpy(settings->tsg_domain, arg->Value, length); strncpy(settings->GatewayDomain, arg->Value, length);
settings->tsg_domain[length] = '\0'; settings->GatewayDomain[length] = '\0';
settings->tsg_username = _strdup(&p[1]); settings->GatewayUsername = _strdup(&p[1]);
} }
else else
{ {
settings->tsg_username = _strdup(arg->Value); settings->GatewayUsername = _strdup(arg->Value);
} }
settings->tsg_same_credentials = FALSE; settings->GatewayUseSameCredentials = FALSE;
} }
CommandLineSwitchCase(arg, "gd") CommandLineSwitchCase(arg, "gd")
{ {
settings->tsg_domain = _strdup(arg->Value); settings->GatewayDomain = _strdup(arg->Value);
settings->tsg_same_credentials = FALSE; settings->GatewayUseSameCredentials = FALSE;
} }
CommandLineSwitchCase(arg, "gp") CommandLineSwitchCase(arg, "gp")
{ {
settings->tsg_password = _strdup(arg->Value); settings->GatewayPassword = _strdup(arg->Value);
settings->tsg_same_credentials = FALSE; settings->GatewayUseSameCredentials = FALSE;
} }
CommandLineSwitchCase(arg, "z") CommandLineSwitchCase(arg, "z")
{ {
@ -385,35 +385,35 @@ int freerdp_client_parse_command_line_arguments(int argc, char** argv, rdpSettin
} }
CommandLineSwitchCase(arg, "shell") CommandLineSwitchCase(arg, "shell")
{ {
settings->shell = _strdup(arg->Value); settings->AlternateShell = _strdup(arg->Value);
} }
CommandLineSwitchCase(arg, "shell-dir") CommandLineSwitchCase(arg, "shell-dir")
{ {
settings->directory = _strdup(arg->Value); settings->ShellWorkingDirectory = _strdup(arg->Value);
} }
CommandLineSwitchCase(arg, "fonts") CommandLineSwitchCase(arg, "fonts")
{ {
settings->smooth_fonts = arg->Value ? TRUE : FALSE; settings->AllowFontSmoothing = arg->Value ? TRUE : FALSE;
} }
CommandLineSwitchCase(arg, "wallpaper") CommandLineSwitchCase(arg, "wallpaper")
{ {
settings->disable_wallpaper = arg->Value ? FALSE : TRUE; settings->DisableWallpaper = arg->Value ? FALSE : TRUE;
} }
CommandLineSwitchCase(arg, "window-drag") CommandLineSwitchCase(arg, "window-drag")
{ {
settings->disable_full_window_drag = arg->Value ? FALSE : TRUE; settings->DisableFullWindowDrag = arg->Value ? FALSE : TRUE;
} }
CommandLineSwitchCase(arg, "menu-anims") CommandLineSwitchCase(arg, "menu-anims")
{ {
settings->disable_menu_animations = arg->Value ? FALSE : TRUE; settings->DisableMenuAnims = arg->Value ? FALSE : TRUE;
} }
CommandLineSwitchCase(arg, "themes") CommandLineSwitchCase(arg, "themes")
{ {
settings->disable_theming = arg->Value ? FALSE : TRUE; settings->DisableThemes = arg->Value ? FALSE : TRUE;
} }
CommandLineSwitchCase(arg, "aero") CommandLineSwitchCase(arg, "aero")
{ {
settings->desktop_composition = arg->Value ? TRUE : FALSE; settings->AllowDesktopComposition = arg->Value ? TRUE : FALSE;
} }
CommandLineSwitchCase(arg, "gdi") CommandLineSwitchCase(arg, "gdi")
{ {
@ -424,26 +424,26 @@ int freerdp_client_parse_command_line_arguments(int argc, char** argv, rdpSettin
} }
CommandLineSwitchCase(arg, "rfx") CommandLineSwitchCase(arg, "rfx")
{ {
settings->rfx_codec = TRUE; settings->RemoteFxCodec = TRUE;
settings->fastpath_output = TRUE; settings->FastpathOutput = TRUE;
settings->ColorDepth = 32; settings->ColorDepth = 32;
settings->performance_flags = PERF_FLAG_NONE; settings->PerformanceFlags = PERF_FLAG_NONE;
settings->large_pointer = TRUE; settings->LargePointer = TRUE;
} }
CommandLineSwitchCase(arg, "rfx-mode") CommandLineSwitchCase(arg, "rfx-mode")
{ {
if (strcmp(arg->Value, "video") == 0) if (strcmp(arg->Value, "video") == 0)
settings->rfx_codec_mode = 0x00; settings->RemoteFxCodecMode = 0x00;
else if (strcmp(arg->Value, "image") == 0) else if (strcmp(arg->Value, "image") == 0)
settings->rfx_codec_mode = 0x02; settings->RemoteFxCodecMode = 0x02;
} }
CommandLineSwitchCase(arg, "frame-ack") CommandLineSwitchCase(arg, "frame-ack")
{ {
settings->frame_acknowledge = atoi(arg->Value); settings->FrameAcknowledge = atoi(arg->Value);
} }
CommandLineSwitchCase(arg, "nsc") CommandLineSwitchCase(arg, "nsc")
{ {
settings->ns_codec = TRUE; settings->NSCodec = TRUE;
} }
CommandLineSwitchCase(arg, "nego") CommandLineSwitchCase(arg, "nego")
{ {
@ -451,13 +451,13 @@ int freerdp_client_parse_command_line_arguments(int argc, char** argv, rdpSettin
} }
CommandLineSwitchCase(arg, "pcid") CommandLineSwitchCase(arg, "pcid")
{ {
settings->send_preconnection_pdu = TRUE; settings->SendPreconnectionPdu = TRUE;
settings->preconnection_id = atoi(arg->Value); settings->PreconnectionId = atoi(arg->Value);
} }
CommandLineSwitchCase(arg, "pcb") CommandLineSwitchCase(arg, "pcb")
{ {
settings->send_preconnection_pdu = TRUE; settings->SendPreconnectionPdu = TRUE;
settings->preconnection_blob = _strdup(arg->Value); settings->PreconnectionBlob = _strdup(arg->Value);
} }
CommandLineSwitchCase(arg, "sec") CommandLineSwitchCase(arg, "sec")
{ {
@ -467,7 +467,7 @@ int freerdp_client_parse_command_line_arguments(int argc, char** argv, rdpSettin
settings->TlsSecurity = FALSE; settings->TlsSecurity = FALSE;
settings->NlaSecurity = FALSE; settings->NlaSecurity = FALSE;
settings->ExtSecurity = FALSE; settings->ExtSecurity = FALSE;
settings->encryption = TRUE; settings->Encryption = TRUE;
settings->EncryptionMethod = ENCRYPTION_METHOD_40BIT | ENCRYPTION_METHOD_128BIT | ENCRYPTION_METHOD_FIPS; settings->EncryptionMethod = ENCRYPTION_METHOD_40BIT | ENCRYPTION_METHOD_128BIT | ENCRYPTION_METHOD_FIPS;
settings->EncryptionLevel = ENCRYPTION_LEVEL_CLIENT_COMPATIBLE; settings->EncryptionLevel = ENCRYPTION_LEVEL_CLIENT_COMPATIBLE;
} }
@ -515,11 +515,11 @@ int freerdp_client_parse_command_line_arguments(int argc, char** argv, rdpSettin
} }
CommandLineSwitchCase(arg, "cert-name") CommandLineSwitchCase(arg, "cert-name")
{ {
settings->certificate_name = _strdup(arg->Value); settings->CertificateName = _strdup(arg->Value);
} }
CommandLineSwitchCase(arg, "cert-ignore") CommandLineSwitchCase(arg, "cert-ignore")
{ {
settings->ignore_certificate = TRUE; settings->IgnoreCertificate = TRUE;
} }
CommandLineSwitchDefault(arg) CommandLineSwitchDefault(arg)
{ {
@ -530,25 +530,25 @@ int freerdp_client_parse_command_line_arguments(int argc, char** argv, rdpSettin
} }
while ((arg = CommandLineFindNextArgumentA(arg)) != NULL); while ((arg = CommandLineFindNextArgumentA(arg)) != NULL);
settings->performance_flags = PERF_FLAG_NONE; settings->PerformanceFlags = PERF_FLAG_NONE;
if (settings->smooth_fonts) if (settings->AllowFontSmoothing)
settings->performance_flags |= PERF_ENABLE_FONT_SMOOTHING; settings->PerformanceFlags |= PERF_ENABLE_FONT_SMOOTHING;
if (settings->desktop_composition) if (settings->AllowDesktopComposition)
settings->performance_flags |= PERF_ENABLE_DESKTOP_COMPOSITION; settings->PerformanceFlags |= PERF_ENABLE_DESKTOP_COMPOSITION;
if (settings->disable_wallpaper) if (settings->DisableWallpaper)
settings->performance_flags |= PERF_DISABLE_WALLPAPER; settings->PerformanceFlags |= PERF_DISABLE_WALLPAPER;
if (settings->disable_full_window_drag) if (settings->DisableFullWindowDrag)
settings->performance_flags |= PERF_DISABLE_FULLWINDOWDRAG; settings->PerformanceFlags |= PERF_DISABLE_FULLWINDOWDRAG;
if (settings->disable_menu_animations) if (settings->DisableMenuAnims)
settings->performance_flags |= PERF_DISABLE_MENUANIMATIONS; settings->PerformanceFlags |= PERF_DISABLE_MENUANIMATIONS;
if (settings->disable_theming) if (settings->DisableThemes)
settings->performance_flags |= PERF_DISABLE_THEMING; settings->PerformanceFlags |= PERF_DISABLE_THEMING;
return 1; return 1;
} }

View File

@ -478,7 +478,7 @@ BOOL freerdp_client_parse_rdp_file(rdpFile* file, char* name)
BOOL freerdp_client_populate_settings_from_rdp_file(rdpFile* file, rdpSettings* settings) BOOL freerdp_client_populate_settings_from_rdp_file(rdpFile* file, rdpSettings* settings)
{ {
if (~((size_t) file->Domain)) if (~((size_t) file->Domain))
settings->domain = file->Domain; settings->Domain = file->Domain;
if (~((size_t) file->Username)) if (~((size_t) file->Username))
{ {
@ -490,25 +490,25 @@ BOOL freerdp_client_populate_settings_from_rdp_file(rdpFile* file, rdpSettings*
if (p) if (p)
{ {
size = p - file->Username; size = p - file->Username;
settings->domain = (char*) malloc(size + 1); settings->Domain = (char*) malloc(size + 1);
CopyMemory(settings->domain, file->Username, size); CopyMemory(settings->Domain, file->Username, size);
settings->domain[size] = 0; settings->Domain[size] = 0;
size = strlen(file->Username) - size - 1; size = strlen(file->Username) - size - 1;
settings->username = (char*) malloc(size + 1); settings->Username = (char*) malloc(size + 1);
CopyMemory(settings->username, &file->Username[p - file->Username + 1], size); CopyMemory(settings->Username, &file->Username[p - file->Username + 1], size);
settings->username[size] = 0; settings->Username[size] = 0;
} }
else else
{ {
settings->username = file->Username; settings->Username = file->Username;
} }
} }
if (~file->ServerPort) if (~file->ServerPort)
settings->port = file->ServerPort; settings->ServerPort = file->ServerPort;
if (~((size_t) file->FullAddress)) if (~((size_t) file->FullAddress))
settings->hostname = file->FullAddress; settings->Hostname = file->FullAddress;
if (~file->DesktopWidth) if (~file->DesktopWidth)
settings->DesktopWidth = file->DesktopWidth; settings->DesktopWidth = file->DesktopWidth;
if (~file->DesktopHeight) if (~file->DesktopHeight)
@ -516,27 +516,27 @@ BOOL freerdp_client_populate_settings_from_rdp_file(rdpFile* file, rdpSettings*
if (~file->SessionBpp) if (~file->SessionBpp)
settings->ColorDepth = file->SessionBpp; settings->ColorDepth = file->SessionBpp;
if (~file->ConnectToConsole) if (~file->ConnectToConsole)
settings->console_session = file->ConnectToConsole; settings->ConsoleSession = file->ConnectToConsole;
if (~file->AdministrativeSession) if (~file->AdministrativeSession)
settings->console_session = file->AdministrativeSession; settings->ConsoleSession = file->AdministrativeSession;
if (~file->NegotiateSecurityLayer) if (~file->NegotiateSecurityLayer)
settings->NegotiateSecurityLayer = file->NegotiateSecurityLayer; settings->NegotiateSecurityLayer = file->NegotiateSecurityLayer;
if (~file->EnableCredSSPSupport) if (~file->EnableCredSSPSupport)
settings->NlaSecurity = file->EnableCredSSPSupport; settings->NlaSecurity = file->EnableCredSSPSupport;
if (~((size_t) file->AlternateShell)) if (~((size_t) file->AlternateShell))
settings->shell = file->AlternateShell; settings->AlternateShell = file->AlternateShell;
if (~((size_t) file->ShellWorkingDirectory)) if (~((size_t) file->ShellWorkingDirectory))
settings->directory = file->ShellWorkingDirectory; settings->ShellWorkingDirectory = file->ShellWorkingDirectory;
if (~((size_t) file->GatewayHostname)) if (~((size_t) file->GatewayHostname))
settings->tsg_hostname = file->GatewayHostname; settings->GatewayHostname = file->GatewayHostname;
if (~file->GatewayUsageMethod) if (~file->GatewayUsageMethod)
settings->ts_gateway = TRUE; settings->GatewayUsageMethod = TRUE;
if (~file->PromptCredentialOnce) if (~file->PromptCredentialOnce)
settings->tsg_same_credentials = TRUE; settings->GatewayUseSameCredentials = TRUE;
if (~file->RemoteApplicationMode) if (~file->RemoteApplicationMode)
settings->remote_app = file->RemoteApplicationMode; settings->RemoteApplicationMode = file->RemoteApplicationMode;
return TRUE; return TRUE;
} }

View File

@ -113,7 +113,7 @@ void test_cliprdr(void)
RDP_CB_DATA_REQUEST_EVENT* data_request_event; RDP_CB_DATA_REQUEST_EVENT* data_request_event;
RDP_CB_DATA_RESPONSE_EVENT* data_response_event; RDP_CB_DATA_RESPONSE_EVENT* data_response_event;
settings.hostname = "testhost"; settings.Hostname = "testhost";
instance.settings = &settings; instance.settings = &settings;
instance.SendChannelData = test_rdp_channel_data; instance.SendChannelData = test_rdp_channel_data;

View File

@ -71,7 +71,7 @@ void test_drdynvc(void)
rdpSettings settings = { 0 }; rdpSettings settings = { 0 };
freerdp instance = { 0 }; freerdp instance = { 0 };
settings.hostname = "testhost"; settings.Hostname = "testhost";
instance.settings = &settings; instance.settings = &settings;
instance.SendChannelData = test_rdp_channel_data; instance.SendChannelData = test_rdp_channel_data;

View File

@ -137,8 +137,8 @@ void test_gcc_write_client_core_data(void)
settings->kbd_type = 0x04; settings->kbd_type = 0x04;
settings->kbd_fn_keys = 12; settings->kbd_fn_keys = 12;
settings->client_build = 3790; settings->client_build = 3790;
strcpy(settings->client_hostname, "ELTONS-DEV2"); strcpy(settings->ClientHostname, "ELTONS-DEV2");
strcpy(settings->client_product_id, "69712-783-0357974-42714"); strcpy(settings->ClientProductId, "69712-783-0357974-42714");
gcc_write_client_core_data(s, settings); gcc_write_client_core_data(s, settings);
@ -156,7 +156,7 @@ void test_gcc_write_client_security_data(void)
s = stream_new(12); s = stream_new(12);
settings = settings_new(NULL); settings = settings_new(NULL);
settings->encryption = 1; /* turn on encryption */ settings->Encryption = 1; /* turn on encryption */
settings->EncryptionMethod = settings->EncryptionMethod =
ENCRYPTION_METHOD_40BIT | ENCRYPTION_METHOD_40BIT |
ENCRYPTION_METHOD_56BIT | ENCRYPTION_METHOD_56BIT |

View File

@ -669,7 +669,7 @@ void test_rail_plugin(void)
printf("\n"); printf("\n");
settings.hostname = "testhost"; settings.Hostname = "testhost";
inst->settings = &settings; inst->settings = &settings;
inst->SendChannelData = emulate_client_send_channel_data; inst->SendChannelData = emulate_client_send_channel_data;

View File

@ -100,6 +100,18 @@
#define GLYPH_SUPPORT_FULL 0x0002 #define GLYPH_SUPPORT_FULL 0x0002
#define GLYPH_SUPPORT_ENCODE 0x0003 #define GLYPH_SUPPORT_ENCODE 0x0003
/* Gateway Usage Method */
#define TSC_PROXY_MODE_NONE_DIRECT 0x0
#define TSC_PROXY_MODE_DIRECT 0x1
#define TSC_PROXY_MODE_DETECT 0x2
#define TSC_PROXY_MODE_DEFAULT 0x3
#define TSC_PROXY_MODE_NONE_DETECT 0x4
/* Gateway Credentials Source */
#define TSC_PROXY_CREDS_MODE_USERPASS 0x0
#define TSC_PROXY_CREDS_MODE_SMARTCARD 0x1
#define TSC_PROXY_CREDS_MODE_ANY 0x2
/* SYSTEM_TIME */ /* SYSTEM_TIME */
typedef struct typedef struct
{ {
@ -290,35 +302,33 @@ struct rdp_settings
UINT64 padding002[48 - 35]; /* 35 */ UINT64 padding002[48 - 35]; /* 35 */
/* Connection Settings */ /* Connection Settings */
ALIGN64 UINT32 port; /* 48 */ ALIGN64 BOOL IPv6; /* 48 */
ALIGN64 BOOL ipv6; /* 49 */ ALIGN64 UINT32 ServerPort; /* 49 */
ALIGN64 char* hostname; /* 50 */ ALIGN64 char* Hostname; /* 50 */
ALIGN64 char* username; /* 51 */ ALIGN64 char* Username; /* 51 */
ALIGN64 char* password; /* 52 */ ALIGN64 char* Password; /* 52 */
ALIGN64 char* domain; /* 53 */ ALIGN64 char* Domain; /* 53 */
ALIGN64 char* shell; /* 54 */ ALIGN64 char* AlternateShell; /* 54 */
ALIGN64 char* directory; /* 55 */ ALIGN64 char* ShellWorkingDirectory; /* 55 */
ALIGN64 char* ip_address; /* 56 */ ALIGN64 char* ip_address; /* 56 */
ALIGN64 char* client_dir; /* 57 */ ALIGN64 char* client_dir; /* 57 */
ALIGN64 BOOL autologon; /* 58 */ ALIGN64 BOOL autologon; /* 58 */
ALIGN64 BOOL compression; /* 59 */ ALIGN64 BOOL compression; /* 59 */
ALIGN64 UINT32 performance_flags; /* 60 */ ALIGN64 BYTE* Password51; /* 60 */
ALIGN64 BYTE* password_cookie; /* 61 */ ALIGN64 DWORD Password51Length; /* 61 */
ALIGN64 DWORD password_cookie_length; /* 62 */ ALIGN64 BYTE* PasswordCookie; /* 62 */
ALIGN64 char* kerberos_kdc; /* 63 */ ALIGN64 DWORD PasswordCookieLength; /* 63 */
ALIGN64 char* kerberos_realm; /* 64 */ ALIGN64 char* kerberos_kdc; /* 64 */
ALIGN64 void* unused65; /* 65 */ ALIGN64 char* kerberos_realm; /* 65 */
ALIGN64 void* unused66; /* 66 */
ALIGN64 void* unused67; /* 67 */
ALIGN64 void* unused68; /* 68 */
ALIGN64 BOOL local; /* 69 */ ALIGN64 BOOL local; /* 69 */
ALIGN64 BOOL authentication_only; /* 70 */ ALIGN64 BOOL authentication_only; /* 70 */
ALIGN64 BOOL from_stdin; /* 71 */ ALIGN64 BOOL from_stdin; /* 71 */
ALIGN64 BOOL send_preconnection_pdu; /* 72 */ ALIGN64 BOOL SendPreconnectionPdu; /* 72 */
ALIGN64 UINT32 preconnection_id; /* 73 */ ALIGN64 UINT32 PreconnectionId; /* 73 */
ALIGN64 char* preconnection_blob; /* 74 */ ALIGN64 char* PreconnectionBlob; /* 74 */
ALIGN64 char* computer_name; /* 75 */ ALIGN64 char* ComputerName; /* 75 */
ALIGN64 char* connection_file; /* 76 */ ALIGN64 char* ConnectionFile; /* 76 */
UINT64 padding003[80 - 77]; /* 77 */ UINT64 padding003[80 - 77]; /* 77 */
/* User Interface Parameters */ /* User Interface Parameters */
@ -337,7 +347,6 @@ struct rdp_settings
ALIGN64 char* home_path; /* 112 */ ALIGN64 char* home_path; /* 112 */
ALIGN64 UINT32 share_id; /* 113 */ ALIGN64 UINT32 share_id; /* 113 */
ALIGN64 UINT32 pdu_source; /* 114 */ ALIGN64 UINT32 pdu_source; /* 114 */
ALIGN64 void* unused115; /* 115 */
ALIGN64 BOOL server_mode; /* 116 */ ALIGN64 BOOL server_mode; /* 116 */
ALIGN64 char* config_path; /* 117 */ ALIGN64 char* config_path; /* 117 */
ALIGN64 char* current_path; /* 118 */ ALIGN64 char* current_path; /* 118 */
@ -346,157 +355,176 @@ struct rdp_settings
UINT64 padding005[144 - 121]; /* 121 */ UINT64 padding005[144 - 121]; /* 121 */
/* Security */ /* Security */
ALIGN64 BOOL encryption; /* 144 */ ALIGN64 BOOL Encryption; /* 144 */
ALIGN64 BOOL TlsSecurity; /* 145 */ ALIGN64 BOOL TlsSecurity; /* 145 */
ALIGN64 BOOL NlaSecurity; /* 146 */ ALIGN64 BOOL NlaSecurity; /* 146 */
ALIGN64 BOOL RdpSecurity; /* 147 */ ALIGN64 BOOL RdpSecurity; /* 147 */
ALIGN64 BOOL ExtSecurity; /* 148 */ ALIGN64 BOOL ExtSecurity; /* 148 */
ALIGN64 void* unused149; /* 149 */ ALIGN64 BOOL SaltedChecksum; /* 149 */
ALIGN64 BOOL salted_checksum; /* 150 */ ALIGN64 BOOL MstscCookieMode; /* 150 */
ALIGN64 BOOL mstsc_cookie_mode; /* 151 */ ALIGN64 UINT32 CookieMaxLength; /* 151 */
ALIGN64 UINT32 cookie_max_length; /* 152 */ UINT64 padding006[160 - 152]; /* 152 */
UINT64 padding006[160 - 153]; /* 153 */
/* Session */ /* Session */
ALIGN64 BOOL console_audio; /* 160 */ ALIGN64 BOOL ConsoleAudio; /* 160 */
ALIGN64 BOOL console_session; /* 161 */ ALIGN64 BOOL ConsoleSession; /* 161 */
ALIGN64 UINT32 redirected_session_id; /* 162 */ ALIGN64 UINT32 RedirectedSessionId; /* 162 */
ALIGN64 BOOL audio_playback; /* 163 */ ALIGN64 BOOL AudioPlayback; /* 163 */
ALIGN64 BOOL audio_capture; /* 164 */ ALIGN64 BOOL AudioCapture; /* 164 */
UINT64 padding007[176 - 165]; /* 165 */ UINT64 padding007[176 - 165]; /* 165 */
/* Output Control */ /* Output Control */
ALIGN64 BOOL refresh_rect; /* 176 */ ALIGN64 BOOL RefreshRect; /* 176 */
ALIGN64 BOOL suppress_output; /* 177 */ ALIGN64 BOOL SuppressOutput; /* 177 */
ALIGN64 BOOL desktop_resize; /* 178 */ ALIGN64 BOOL DesktopResize; /* 178 */
UINT64 padding008[192 - 179]; /* 179 */ UINT64 padding008[192 - 179]; /* 179 */
/* Reconnection */ /* Reconnection */
ALIGN64 BOOL auto_reconnection; /* 192 */ ALIGN64 BOOL AutoReconnectionEnabled; /* 192 */
ALIGN64 ARC_CS_PRIVATE_PACKET* client_auto_reconnect_cookie; /* 193 */ ALIGN64 UINT32 AutoReconnectMaxRetries; /* 193 */
ALIGN64 ARC_SC_PRIVATE_PACKET* server_auto_reconnect_cookie; /* 194 */ ALIGN64 ARC_CS_PRIVATE_PACKET* ClientAutoReconnectCookie; /* 194 */
UINT64 padding009[208 - 195]; /* 195 */ ALIGN64 ARC_SC_PRIVATE_PACKET* ServerAutoReconnectCookie; /* 195 */
UINT64 padding009[208 - 196]; /* 196 */
/* Time Zone */ /* Time Zone */
ALIGN64 TIME_ZONE_INFO* client_time_zone; /* 208 */ ALIGN64 TIME_ZONE_INFO* ClientTimeZone; /* 208 */
UINT64 padding010[216 - 209]; /* 209 */ UINT64 padding010[216 - 209]; /* 209 */
/* Capabilities */ /* Capabilities */
ALIGN64 UINT32 os_major_type; /* 216 */ ALIGN64 UINT32 OsMajorType; /* 216 */
ALIGN64 UINT32 os_minor_type; /* 217 */ ALIGN64 UINT32 OsMinorType; /* 217 */
ALIGN64 UINT32 vc_chunk_size; /* 218 */ ALIGN64 UINT32 VirtualChannelChunkSize; /* 218 */
ALIGN64 BOOL sound_beeps; /* 219 */ ALIGN64 BOOL SoundBeepsEnabled; /* 219 */
ALIGN64 BOOL smooth_fonts; /* 220 */ ALIGN64 BOOL FrameMarkerEnabled; /* 221 */
ALIGN64 BOOL frame_marker; /* 221 */ ALIGN64 BOOL FastpathInput; /* 222 */
ALIGN64 BOOL fastpath_input; /* 222 */ ALIGN64 BOOL FastpathOutput; /* 223 */
ALIGN64 BOOL fastpath_output; /* 223 */ ALIGN64 BYTE* ReceivedCapabilities; /* 224 */
ALIGN64 BYTE* received_caps; /* 224 */ ALIGN64 BYTE* OrderSupport; /* 225 */
ALIGN64 BYTE* order_support; /* 225 */ ALIGN64 BOOL SurfaceCommandsEnabled; /* 226 */
ALIGN64 BOOL surface_commands; /* 226 */ ALIGN64 UINT32 MultifragMaxRequestSize; /* 227 */
ALIGN64 BOOL disable_wallpaper; /* 227 */
ALIGN64 BOOL disable_full_window_drag; /* 228 */ ALIGN64 UINT32 PerformanceFlags; /* 220 */
ALIGN64 BOOL disable_menu_animations; /* 229 */ ALIGN64 UINT32 ConnectionType; /* 221 */
ALIGN64 BOOL disable_theming; /* 230 */ ALIGN64 BOOL AllowFontSmoothing; /* 222 */
ALIGN64 UINT32 ConnectionType; /* 231 */ ALIGN64 BOOL DisableWallpaper; /* 222 */
ALIGN64 UINT32 multifrag_max_request_size; /* 232 */ ALIGN64 BOOL DisableFullWindowDrag; /* 228 */
UINT64 padding011[248 - 233]; /* 233 */ 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 */ /* Certificate */
ALIGN64 char* cert_file; /* 248 */ ALIGN64 char* CertificateFile; /* 248 */
ALIGN64 char* privatekey_file; /* 249 */ ALIGN64 char* PrivateKeyFile; /* 249 */
ALIGN64 char* client_hostname; /* 250 */ ALIGN64 char* ClientHostname; /* 250 */
ALIGN64 char* client_product_id; /* 251 */ ALIGN64 char* ClientProductId; /* 251 */
ALIGN64 BYTE* server_random; /* 252 */ ALIGN64 BYTE* ServerRandom; /* 252 */
ALIGN64 DWORD server_random_length; /* 253 */ ALIGN64 DWORD ServerRandomLength; /* 253 */
ALIGN64 BYTE* server_certificate; /* 254 */ ALIGN64 BYTE* ServerCertificate; /* 254 */
ALIGN64 DWORD server_certificate_length; /* 255 */ ALIGN64 DWORD ServerCertificateLength; /* 255 */
ALIGN64 BOOL ignore_certificate; /* 256 */ ALIGN64 BOOL IgnoreCertificate; /* 256 */
ALIGN64 rdpCertificate* server_cert; /* 257 */ ALIGN64 rdpCertificate* ServerCert; /* 257 */
ALIGN64 char* rdp_key_file; /* 258 */ ALIGN64 char* RdpKeyFile; /* 258 */
ALIGN64 rdpKey* server_key; /* 259 */ ALIGN64 rdpKey* ServerKey; /* 259 */
ALIGN64 char* certificate_name; /* 260 */ ALIGN64 char* CertificateName; /* 260 */
UINT64 padding012[280 - 261]; /* 261 */ UINT64 padding012[280 - 261]; /* 261 */
/* Codecs */ /* RemoteFX */
ALIGN64 BOOL rfx_codec; /* 280 */ ALIGN64 BOOL RemoteFxOnly; /* 290 */
ALIGN64 BOOL ns_codec; /* 281 */ ALIGN64 BOOL RemoteFxCodec; /* 280 */
ALIGN64 UINT32 rfx_codec_id; /* 282 */ ALIGN64 UINT32 RemoteFxCodecId; /* 282 */
ALIGN64 UINT32 ns_codec_id; /* 283 */ ALIGN64 UINT32 RemoteFxCodecMode; /* 284 */
ALIGN64 UINT32 rfx_codec_mode; /* 284 */
ALIGN64 BOOL frame_acknowledge; /* 285 */ /* NSCodec */
ALIGN64 BOOL jpeg_codec; /* 286 */ ALIGN64 BOOL NSCodec; /* 281 */
ALIGN64 UINT32 jpeg_codec_id; /* 287 */ ALIGN64 UINT32 NSCodecId; /* 283 */
ALIGN64 UINT32 jpeg_quality; /* 288 */ ALIGN64 BOOL FrameAcknowledge; /* 285 */
ALIGN64 UINT32 v3_codec_id; /* 289 */
ALIGN64 BOOL rfx_codec_only; /* 290 */ /* JPEG */
ALIGN64 BOOL JpegCodec; /* 286 */
ALIGN64 UINT32 JpegCodecId; /* 287 */
ALIGN64 UINT32 JpegQuality; /* 288 */
UINT64 padding013[296 - 291]; /* 291 */ UINT64 padding013[296 - 291]; /* 291 */
/* Recording */ /* Recording */
ALIGN64 BOOL dump_rfx; /* 296 */ ALIGN64 BOOL DumpRemoteFx; /* 296 */
ALIGN64 BOOL play_rfx; /* 297 */ ALIGN64 BOOL PlayRemoteFx; /* 297 */
ALIGN64 char* dump_rfx_file; /* 298 */ ALIGN64 char* DumpRemoteFxFile; /* 298 */
ALIGN64 char* play_rfx_file; /* 299 */ ALIGN64 char* PlayRemoteFxFile; /* 299 */
UINT64 padding014[312 - 300]; /* 300 */ UINT64 padding014[312 - 300]; /* 300 */
/* RemoteApp */ /* RemoteApp */
ALIGN64 BOOL remote_app; /* 312 */ ALIGN64 BOOL RemoteApplicationMode; /* 312 */
ALIGN64 UINT32 num_icon_caches; /* 313 */ ALIGN64 char* RemoteApplicationName;
ALIGN64 UINT32 num_icon_cache_entries; /* 314 */ ALIGN64 char* RemoteApplicationIcon;
ALIGN64 BOOL rail_langbar_supported; /* 315 */ 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 */ UINT64 padding015[320 - 316]; /* 316 */
/* Pointer */ /* Pointer */
ALIGN64 BOOL large_pointer; /* 320 */ ALIGN64 BOOL LargePointer; /* 320 */
ALIGN64 BOOL color_pointer; /* 321 */ ALIGN64 BOOL ColorPointer; /* 321 */
ALIGN64 UINT32 pointer_cache_size; /* 322 */ ALIGN64 UINT32 PointerCacheSize; /* 322 */
UINT64 padding016[328 - 323]; /* 323 */ UINT64 padding016[328 - 323]; /* 323 */
/* Bitmap Cache */ /* Bitmap Cache */
ALIGN64 BOOL bitmap_cache; /* 328 */ ALIGN64 BOOL BitmapCacheEnabled; /* 328 */
ALIGN64 BOOL bitmap_cache_v3; /* 329 */ ALIGN64 BOOL AllowCacheWaitingList; /* 333 */
ALIGN64 BOOL persistent_bitmap_cache; /* 330 */ ALIGN64 BOOL BitmapCachePersistEnabled; /* 330 */
ALIGN64 UINT32 bitmapCacheV2NumCells; /* 331 */ ALIGN64 UINT32 BitmapCacheV2NumCells; /* 331 */
ALIGN64 BITMAP_CACHE_V2_CELL_INFO* bitmapCacheV2CellInfo; /* 332 */ ALIGN64 BITMAP_CACHE_V2_CELL_INFO* BitmapCacheV2CellInfo; /* 332 */
ALIGN64 BOOL allow_cache_waiting_list; /* 333 */
UINT64 padding017[344 - 334]; /* 334 */ UINT64 padding017[344 - 334]; /* 334 */
/* Bitmap Cache V3 */
ALIGN64 BOOL BitmapCacheV3Enabled; /* 329 */
ALIGN64 UINT32 BitmapCacheV3CodecId; /* 289 */
/* Offscreen Bitmap Cache */ /* Offscreen Bitmap Cache */
ALIGN64 BOOL offscreen_bitmap_cache; /* 344 */ ALIGN64 BOOL OffscreenBitmapCacheEnabled; /* 344 */
ALIGN64 UINT32 offscreen_bitmap_cache_size; /* 345 */ ALIGN64 UINT32 OffscreenBitmapCacheSize; /* 345 */
ALIGN64 UINT32 offscreen_bitmap_cache_entries; /* 346 */ ALIGN64 UINT32 OffscreenBitmapCacheEntries; /* 346 */
UINT64 padding018[352 - 347]; /* 347 */ UINT64 padding018[352 - 347]; /* 347 */
/* Glyph Cache */ /* Glyph Cache */
ALIGN64 void* unused352; /* 352 */ ALIGN64 UINT32 GlyphSupportLevel; /* 353 */
ALIGN64 UINT32 glyphSupportLevel; /* 353 */ ALIGN64 GLYPH_CACHE_DEFINITION* GlyphCache; /* 354 */
ALIGN64 GLYPH_CACHE_DEFINITION* glyphCache; /* 354 */ ALIGN64 GLYPH_CACHE_DEFINITION* FragCache; /* 355 */
ALIGN64 GLYPH_CACHE_DEFINITION* fragCache; /* 355 */
UINT64 padding019[360 - 356]; /* 356 */ UINT64 padding019[360 - 356]; /* 356 */
/* Draw Nine Grid */ /* Draw Nine Grid */
ALIGN64 BOOL draw_nine_grid; /* 360 */ ALIGN64 BOOL DrawNineGridEnabled; /* 360 */
ALIGN64 UINT32 draw_nine_grid_cache_size; /* 361 */ ALIGN64 UINT32 DrawNineGridCacheSize; /* 361 */
ALIGN64 UINT32 draw_nine_grid_cache_entries; /* 362 */ ALIGN64 UINT32 DrawNineGridCacheEntries; /* 362 */
UINT64 padding020[368 - 363]; /* 363 */ UINT64 padding020[368 - 363]; /* 363 */
/* Draw GDI+ */ /* Draw GDI+ */
ALIGN64 BOOL draw_gdi_plus; /* 368 */ ALIGN64 BOOL DrawGdiPlusEnabled; /* 368 */
ALIGN64 BOOL draw_gdi_plus_cache; /* 369 */ ALIGN64 BOOL DrawGdiPlusCacheEnabled; /* 369 */
UINT64 padding021[376 - 370]; /* 370 */ UINT64 padding021[376 - 370]; /* 370 */
/* Desktop Composition */ /* Desktop Composition */
ALIGN64 BOOL desktop_composition; /* 376 */
UINT64 padding022[384 - 377]; /* 377 */ UINT64 padding022[384 - 377]; /* 377 */
/* TS Gateway */ /* Gateway */
ALIGN64 BOOL ts_gateway; /* 384 */ ALIGN64 BOOL GatewayUsageMethod; /* 384 */
ALIGN64 UINT32 tsg_port; /* 385 */ ALIGN64 UINT32 GatewayPort; /* 385 */
ALIGN64 char* tsg_hostname; /* 386 */ ALIGN64 char* GatewayHostname; /* 386 */
ALIGN64 char* tsg_username; /* 387 */ ALIGN64 char* GatewayUsername; /* 387 */
ALIGN64 char* tsg_password; /* 388 */ ALIGN64 char* GatewayPassword; /* 388 */
ALIGN64 char* tsg_domain; /* 389 */ ALIGN64 char* GatewayDomain; /* 389 */
ALIGN64 BOOL tsg_same_credentials; /* 390 */ ALIGN64 UINT32 GatewayCredentialsSource; /* 390 */
UINT64 padding023[400 - 391]; /* 391 */ ALIGN64 BOOL GatewayUseSameCredentials; /* 391 */
UINT64 padding023[400 - 391]; /* 392 */
/* Device Redirection */ /* Device Redirection */
ALIGN64 BOOL DeviceRedirection; ALIGN64 BOOL DeviceRedirection;

View File

@ -280,13 +280,13 @@ rdpBitmapCache* bitmap_cache_new(rdpSettings* settings)
bitmap_cache->update = ((freerdp*) settings->instance)->update; bitmap_cache->update = ((freerdp*) settings->instance)->update;
bitmap_cache->context = bitmap_cache->update->context; bitmap_cache->context = bitmap_cache->update->context;
bitmap_cache->maxCells = settings->bitmapCacheV2NumCells; bitmap_cache->maxCells = settings->BitmapCacheV2NumCells;
bitmap_cache->cells = (BITMAP_V2_CELL*) xzalloc(sizeof(BITMAP_V2_CELL) * bitmap_cache->maxCells); bitmap_cache->cells = (BITMAP_V2_CELL*) xzalloc(sizeof(BITMAP_V2_CELL) * bitmap_cache->maxCells);
for (i = 0; i < (int) bitmap_cache->maxCells; i++) for (i = 0; i < (int) bitmap_cache->maxCells; i++)
{ {
bitmap_cache->cells[i].number = settings->bitmapCacheV2CellInfo[i].numEntries; bitmap_cache->cells[i].number = settings->BitmapCacheV2CellInfo[i].numEntries;
/* allocate an extra entry for BITMAP_CACHE_WAITING_LIST_INDEX */ /* allocate an extra entry for BITMAP_CACHE_WAITING_LIST_INDEX */
bitmap_cache->cells[i].entries = (rdpBitmap**) xzalloc(sizeof(rdpBitmap*) * (bitmap_cache->cells[i].number + 1)); bitmap_cache->cells[i].entries = (rdpBitmap**) xzalloc(sizeof(rdpBitmap*) * (bitmap_cache->cells[i].number + 1));
} }

View File

@ -466,8 +466,8 @@ rdpGlyphCache* glyph_cache_new(rdpSettings* settings)
for (i = 0; i < 10; i++) for (i = 0; i < 10; i++)
{ {
glyph->glyphCache[i].number = settings->glyphCache[i].cacheEntries; glyph->glyphCache[i].number = settings->GlyphCache[i].cacheEntries;
glyph->glyphCache[i].maxCellSize = settings->glyphCache[i].cacheMaximumCellSize; glyph->glyphCache[i].maxCellSize = settings->GlyphCache[i].cacheMaximumCellSize;
glyph->glyphCache[i].entries = (rdpGlyph**) xzalloc(sizeof(rdpGlyph*) * glyph->glyphCache[i].number); glyph->glyphCache[i].entries = (rdpGlyph**) xzalloc(sizeof(rdpGlyph*) * glyph->glyphCache[i].number);
} }

View File

@ -105,8 +105,8 @@ rdpNineGridCache* nine_grid_cache_new(rdpSettings* settings)
nine_grid->maxSize = 2560; nine_grid->maxSize = 2560;
nine_grid->maxEntries = 256; nine_grid->maxEntries = 256;
nine_grid->settings->draw_nine_grid_cache_size = nine_grid->maxSize; nine_grid->settings->DrawNineGridCacheSize = nine_grid->maxSize;
nine_grid->settings->draw_nine_grid_cache_entries = nine_grid->maxEntries; nine_grid->settings->DrawNineGridCacheEntries = nine_grid->maxEntries;
nine_grid->entries = (NINE_GRID_ENTRY*) xzalloc(sizeof(NINE_GRID_ENTRY) * nine_grid->maxEntries); nine_grid->entries = (NINE_GRID_ENTRY*) xzalloc(sizeof(NINE_GRID_ENTRY) * nine_grid->maxEntries);
} }

View File

@ -145,8 +145,8 @@ rdpOffscreenCache* offscreen_cache_new(rdpSettings* settings)
offscreen_cache->maxSize = 7680; offscreen_cache->maxSize = 7680;
offscreen_cache->maxEntries = 2000; offscreen_cache->maxEntries = 2000;
settings->offscreen_bitmap_cache_size = offscreen_cache->maxSize; settings->OffscreenBitmapCacheSize = offscreen_cache->maxSize;
settings->offscreen_bitmap_cache_entries = offscreen_cache->maxEntries; settings->OffscreenBitmapCacheEntries = offscreen_cache->maxEntries;
offscreen_cache->entries = (rdpBitmap**) xzalloc(sizeof(rdpBitmap*) * offscreen_cache->maxEntries); offscreen_cache->entries = (rdpBitmap**) xzalloc(sizeof(rdpBitmap*) * offscreen_cache->maxEntries);
} }

View File

@ -164,7 +164,7 @@ rdpPointerCache* pointer_cache_new(rdpSettings* settings)
if (pointer_cache != NULL) if (pointer_cache != NULL)
{ {
pointer_cache->settings = settings; pointer_cache->settings = settings;
pointer_cache->cacheSize = settings->pointer_cache_size; pointer_cache->cacheSize = settings->PointerCacheSize;
pointer_cache->update = ((freerdp*) settings->instance)->update; pointer_cache->update = ((freerdp*) settings->instance)->update;
pointer_cache->entries = (rdpPointer**) xzalloc(sizeof(rdpPointer*) * pointer_cache->cacheSize); pointer_cache->entries = (rdpPointer**) xzalloc(sizeof(rdpPointer*) * pointer_cache->cacheSize);
} }

View File

@ -119,8 +119,8 @@ void rdp_read_general_capability_set(STREAM* s, UINT16 length, rdpSettings* sett
if (settings->server_mode) if (settings->server_mode)
{ {
stream_read_UINT16(s, settings->os_major_type); /* osMajorType (2 bytes) */ stream_read_UINT16(s, settings->OsMajorType); /* osMajorType (2 bytes) */
stream_read_UINT16(s, settings->os_minor_type); /* osMinorType (2 bytes) */ stream_read_UINT16(s, settings->OsMinorType); /* osMinorType (2 bytes) */
} }
else else
{ {
@ -138,13 +138,13 @@ void rdp_read_general_capability_set(STREAM* s, UINT16 length, rdpSettings* sett
stream_read_BYTE(s, suppressOutputSupport); /* suppressOutputSupport (1 byte) */ stream_read_BYTE(s, suppressOutputSupport); /* suppressOutputSupport (1 byte) */
if (!(extraFlags & FASTPATH_OUTPUT_SUPPORTED)) if (!(extraFlags & FASTPATH_OUTPUT_SUPPORTED))
settings->fastpath_output = FALSE; settings->FastpathOutput = FALSE;
if (refreshRectSupport == FALSE) if (refreshRectSupport == FALSE)
settings->refresh_rect = FALSE; settings->RefreshRect = FALSE;
if (suppressOutputSupport == FALSE) if (suppressOutputSupport == FALSE)
settings->suppress_output = FALSE; settings->SuppressOutput = FALSE;
} }
/** /**
@ -163,17 +163,17 @@ void rdp_write_general_capability_set(STREAM* s, rdpSettings* settings)
extraFlags = LONG_CREDENTIALS_SUPPORTED | NO_BITMAP_COMPRESSION_HDR; extraFlags = LONG_CREDENTIALS_SUPPORTED | NO_BITMAP_COMPRESSION_HDR;
if (settings->auto_reconnection) if (settings->AutoReconnectionEnabled)
extraFlags |= AUTORECONNECT_SUPPORTED; extraFlags |= AUTORECONNECT_SUPPORTED;
if (settings->fastpath_output) if (settings->FastpathOutput)
extraFlags |= FASTPATH_OUTPUT_SUPPORTED; extraFlags |= FASTPATH_OUTPUT_SUPPORTED;
if (settings->salted_checksum) if (settings->SaltedChecksum)
extraFlags |= ENC_SALTED_CHECKSUM; extraFlags |= ENC_SALTED_CHECKSUM;
stream_write_UINT16(s, settings->os_major_type); /* osMajorType (2 bytes) */ stream_write_UINT16(s, settings->OsMajorType); /* osMajorType (2 bytes) */
stream_write_UINT16(s, settings->os_minor_type); /* osMinorType (2 bytes) */ stream_write_UINT16(s, settings->OsMinorType); /* osMinorType (2 bytes) */
stream_write_UINT16(s, CAPS_PROTOCOL_VERSION); /* protocolVersion (2 bytes) */ stream_write_UINT16(s, CAPS_PROTOCOL_VERSION); /* protocolVersion (2 bytes) */
stream_write_UINT16(s, 0); /* pad2OctetsA (2 bytes) */ stream_write_UINT16(s, 0); /* pad2OctetsA (2 bytes) */
stream_write_UINT16(s, 0); /* generalCompressionTypes (2 bytes) */ stream_write_UINT16(s, 0); /* generalCompressionTypes (2 bytes) */
@ -181,8 +181,8 @@ void rdp_write_general_capability_set(STREAM* s, rdpSettings* settings)
stream_write_UINT16(s, 0); /* updateCapabilityFlag (2 bytes) */ stream_write_UINT16(s, 0); /* updateCapabilityFlag (2 bytes) */
stream_write_UINT16(s, 0); /* remoteUnshareFlag (2 bytes) */ stream_write_UINT16(s, 0); /* remoteUnshareFlag (2 bytes) */
stream_write_UINT16(s, 0); /* generalCompressionLevel (2 bytes) */ stream_write_UINT16(s, 0); /* generalCompressionLevel (2 bytes) */
stream_write_BYTE(s, settings->refresh_rect); /* refreshRectSupport (1 byte) */ stream_write_BYTE(s, settings->RefreshRect); /* refreshRectSupport (1 byte) */
stream_write_BYTE(s, settings->suppress_output); /* suppressOutputSupport (1 byte) */ stream_write_BYTE(s, settings->SuppressOutput); /* suppressOutputSupport (1 byte) */
rdp_capability_set_finish(s, header, CAPSET_TYPE_GENERAL); rdp_capability_set_finish(s, header, CAPSET_TYPE_GENERAL);
} }
@ -223,9 +223,9 @@ void rdp_read_bitmap_capability_set(STREAM* s, UINT16 length, rdpSettings* setti
} }
if (desktopResizeFlag == FALSE) if (desktopResizeFlag == FALSE)
settings->desktop_resize = FALSE; settings->DesktopResize = FALSE;
if (!settings->server_mode && settings->desktop_resize) if (!settings->server_mode && settings->DesktopResize)
{ {
/* The server may request a different desktop size during Deactivation-Reactivation sequence */ /* The server may request a different desktop size during Deactivation-Reactivation sequence */
settings->DesktopWidth = desktopWidth; settings->DesktopWidth = desktopWidth;
@ -256,7 +256,7 @@ void rdp_write_bitmap_capability_set(STREAM* s, rdpSettings* settings)
else else
preferredBitsPerPixel = 8; preferredBitsPerPixel = 8;
desktopResizeFlag = settings->desktop_resize; desktopResizeFlag = settings->DesktopResize;
stream_write_UINT16(s, preferredBitsPerPixel); /* preferredBitsPerPixel (2 bytes) */ stream_write_UINT16(s, preferredBitsPerPixel); /* preferredBitsPerPixel (2 bytes) */
stream_write_UINT16(s, 1); /* receive1BitPerPixel (2 bytes) */ stream_write_UINT16(s, 1); /* receive1BitPerPixel (2 bytes) */
@ -310,7 +310,7 @@ void rdp_read_order_capability_set(STREAM* s, UINT16 length, rdpSettings* settin
for (i = 0; i < 32; i++) for (i = 0; i < 32; i++)
{ {
if (orderSupport[i] == FALSE) if (orderSupport[i] == FALSE)
settings->order_support[i] = FALSE; settings->OrderSupport[i] = FALSE;
} }
} }
@ -336,13 +336,13 @@ void rdp_write_order_capability_set(STREAM* s, rdpSettings* settings)
orderSupportExFlags = 0; orderSupportExFlags = 0;
orderFlags = NEGOTIATE_ORDER_SUPPORT | ZERO_BOUNDS_DELTA_SUPPORT | COLOR_INDEX_SUPPORT; orderFlags = NEGOTIATE_ORDER_SUPPORT | ZERO_BOUNDS_DELTA_SUPPORT | COLOR_INDEX_SUPPORT;
if (settings->bitmap_cache_v3) if (settings->BitmapCacheV3Enabled)
{ {
orderSupportExFlags |= CACHE_BITMAP_V3_SUPPORT; orderSupportExFlags |= CACHE_BITMAP_V3_SUPPORT;
orderFlags |= ORDER_FLAGS_EXTRA_SUPPORT; orderFlags |= ORDER_FLAGS_EXTRA_SUPPORT;
} }
if (settings->frame_marker) if (settings->FrameMarkerEnabled)
{ {
orderSupportExFlags |= ALTSEC_FRAME_MARKER_SUPPORT; orderSupportExFlags |= ALTSEC_FRAME_MARKER_SUPPORT;
orderFlags |= ORDER_FLAGS_EXTRA_SUPPORT; orderFlags |= ORDER_FLAGS_EXTRA_SUPPORT;
@ -356,7 +356,7 @@ void rdp_write_order_capability_set(STREAM* s, rdpSettings* settings)
stream_write_UINT16(s, 1); /* maximumOrderLevel (2 bytes) */ stream_write_UINT16(s, 1); /* maximumOrderLevel (2 bytes) */
stream_write_UINT16(s, 0); /* numberFonts (2 bytes) */ stream_write_UINT16(s, 0); /* numberFonts (2 bytes) */
stream_write_UINT16(s, orderFlags); /* orderFlags (2 bytes) */ stream_write_UINT16(s, orderFlags); /* orderFlags (2 bytes) */
stream_write(s, settings->order_support, 32); /* orderSupport (32 bytes) */ stream_write(s, settings->OrderSupport, 32); /* orderSupport (32 bytes) */
stream_write_UINT16(s, 0); /* textFlags (2 bytes) */ stream_write_UINT16(s, 0); /* textFlags (2 bytes) */
stream_write_UINT16(s, orderSupportExFlags); /* orderSupportExFlags (2 bytes) */ stream_write_UINT16(s, orderSupportExFlags); /* orderSupportExFlags (2 bytes) */
stream_write_UINT32(s, 0); /* pad4OctetsB (4 bytes) */ stream_write_UINT32(s, 0); /* pad4OctetsB (4 bytes) */
@ -521,11 +521,11 @@ void rdp_read_pointer_capability_set(STREAM* s, UINT16 length, rdpSettings* sett
stream_read_UINT16(s, pointerCacheSize); /* pointerCacheSize (2 bytes) */ stream_read_UINT16(s, pointerCacheSize); /* pointerCacheSize (2 bytes) */
if (colorPointerFlag == FALSE) if (colorPointerFlag == FALSE)
settings->color_pointer = FALSE; settings->ColorPointer = FALSE;
if (settings->server_mode) if (settings->server_mode)
{ {
settings->pointer_cache_size = pointerCacheSize; settings->PointerCacheSize = pointerCacheSize;
} }
} }
@ -543,14 +543,14 @@ void rdp_write_pointer_capability_set(STREAM* s, rdpSettings* settings)
header = rdp_capability_set_start(s); header = rdp_capability_set_start(s);
colorPointerFlag = (settings->color_pointer) ? 1 : 0; colorPointerFlag = (settings->ColorPointer) ? 1 : 0;
stream_write_UINT16(s, colorPointerFlag); /* colorPointerFlag (2 bytes) */ stream_write_UINT16(s, colorPointerFlag); /* colorPointerFlag (2 bytes) */
stream_write_UINT16(s, settings->pointer_cache_size); /* colorPointerCacheSize (2 bytes) */ stream_write_UINT16(s, settings->PointerCacheSize); /* colorPointerCacheSize (2 bytes) */
if (settings->large_pointer) if (settings->LargePointer)
{ {
stream_write_UINT16(s, settings->pointer_cache_size); /* pointerCacheSize (2 bytes) */ stream_write_UINT16(s, settings->PointerCacheSize); /* pointerCacheSize (2 bytes) */
} }
rdp_capability_set_finish(s, header, CAPSET_TYPE_POINTER); rdp_capability_set_finish(s, header, CAPSET_TYPE_POINTER);
@ -637,7 +637,7 @@ void rdp_read_sound_capability_set(STREAM* s, UINT16 length, rdpSettings* settin
stream_read_UINT16(s, soundFlags); /* soundFlags (2 bytes) */ stream_read_UINT16(s, soundFlags); /* soundFlags (2 bytes) */
stream_seek_UINT16(s); /* pad2OctetsA (2 bytes) */ stream_seek_UINT16(s); /* pad2OctetsA (2 bytes) */
settings->sound_beeps = (soundFlags & SOUND_BEEPS_FLAG) ? TRUE : FALSE; settings->SoundBeepsEnabled = (soundFlags & SOUND_BEEPS_FLAG) ? TRUE : FALSE;
} }
/** /**
@ -654,7 +654,7 @@ void rdp_write_sound_capability_set(STREAM* s, rdpSettings* settings)
header = rdp_capability_set_start(s); header = rdp_capability_set_start(s);
soundFlags = (settings->sound_beeps) ? SOUND_BEEPS_FLAG : 0; soundFlags = (settings->SoundBeepsEnabled) ? SOUND_BEEPS_FLAG : 0;
stream_write_UINT16(s, soundFlags); /* soundFlags (2 bytes) */ stream_write_UINT16(s, soundFlags); /* soundFlags (2 bytes) */
stream_write_UINT16(s, 0); /* pad2OctetsA (2 bytes) */ stream_write_UINT16(s, 0); /* pad2OctetsA (2 bytes) */
@ -706,7 +706,7 @@ void rdp_read_input_capability_set(STREAM* s, UINT16 length, rdpSettings* settin
else else
{ {
/* server does not support fastpath input */ /* server does not support fastpath input */
settings->fastpath_input = 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; inputFlags = INPUT_FLAG_SCANCODES | INPUT_FLAG_MOUSEX | INPUT_FLAG_UNICODE;
if (settings->fastpath_input) if (settings->FastpathInput)
{ {
inputFlags |= INPUT_FLAG_FASTPATH_INPUT; inputFlags |= INPUT_FLAG_FASTPATH_INPUT;
inputFlags |= INPUT_FLAG_FASTPATH_INPUT2; inputFlags |= INPUT_FLAG_FASTPATH_INPUT2;
@ -847,7 +847,7 @@ void rdp_read_glyph_cache_capability_set(STREAM* s, UINT16 length, rdpSettings*
stream_read_UINT16(s, glyphSupportLevel); /* glyphSupportLevel (2 bytes) */ stream_read_UINT16(s, glyphSupportLevel); /* glyphSupportLevel (2 bytes) */
stream_seek_UINT16(s); /* pad2Octets (2 bytes) */ stream_seek_UINT16(s); /* pad2Octets (2 bytes) */
settings->glyphSupportLevel = glyphSupportLevel; settings->GlyphSupportLevel = glyphSupportLevel;
} }
/** /**
@ -864,20 +864,20 @@ void rdp_write_glyph_cache_capability_set(STREAM* s, rdpSettings* settings)
header = rdp_capability_set_start(s); header = rdp_capability_set_start(s);
/* glyphCache (40 bytes) */ /* glyphCache (40 bytes) */
rdp_write_cache_definition(s, &(settings->glyphCache[0])); /* glyphCache0 (4 bytes) */ rdp_write_cache_definition(s, &(settings->GlyphCache[0])); /* glyphCache0 (4 bytes) */
rdp_write_cache_definition(s, &(settings->glyphCache[1])); /* glyphCache1 (4 bytes) */ rdp_write_cache_definition(s, &(settings->GlyphCache[1])); /* glyphCache1 (4 bytes) */
rdp_write_cache_definition(s, &(settings->glyphCache[2])); /* glyphCache2 (4 bytes) */ rdp_write_cache_definition(s, &(settings->GlyphCache[2])); /* glyphCache2 (4 bytes) */
rdp_write_cache_definition(s, &(settings->glyphCache[3])); /* glyphCache3 (4 bytes) */ rdp_write_cache_definition(s, &(settings->GlyphCache[3])); /* glyphCache3 (4 bytes) */
rdp_write_cache_definition(s, &(settings->glyphCache[4])); /* glyphCache4 (4 bytes) */ rdp_write_cache_definition(s, &(settings->GlyphCache[4])); /* glyphCache4 (4 bytes) */
rdp_write_cache_definition(s, &(settings->glyphCache[5])); /* glyphCache5 (4 bytes) */ rdp_write_cache_definition(s, &(settings->GlyphCache[5])); /* glyphCache5 (4 bytes) */
rdp_write_cache_definition(s, &(settings->glyphCache[6])); /* glyphCache6 (4 bytes) */ rdp_write_cache_definition(s, &(settings->GlyphCache[6])); /* glyphCache6 (4 bytes) */
rdp_write_cache_definition(s, &(settings->glyphCache[7])); /* glyphCache7 (4 bytes) */ rdp_write_cache_definition(s, &(settings->GlyphCache[7])); /* glyphCache7 (4 bytes) */
rdp_write_cache_definition(s, &(settings->glyphCache[8])); /* glyphCache8 (4 bytes) */ rdp_write_cache_definition(s, &(settings->GlyphCache[8])); /* glyphCache8 (4 bytes) */
rdp_write_cache_definition(s, &(settings->glyphCache[9])); /* glyphCache9 (4 bytes) */ rdp_write_cache_definition(s, &(settings->GlyphCache[9])); /* glyphCache9 (4 bytes) */
rdp_write_cache_definition(s, settings->fragCache); /* fragCache (4 bytes) */ rdp_write_cache_definition(s, settings->FragCache); /* fragCache (4 bytes) */
stream_write_UINT16(s, settings->glyphSupportLevel); /* glyphSupportLevel (2 bytes) */ stream_write_UINT16(s, settings->GlyphSupportLevel); /* glyphSupportLevel (2 bytes) */
stream_write_UINT16(s, 0); /* pad2Octets (2 bytes) */ stream_write_UINT16(s, 0); /* pad2Octets (2 bytes) */
@ -896,11 +896,11 @@ void rdp_read_offscreen_bitmap_cache_capability_set(STREAM* s, UINT16 length, rd
UINT32 offscreenSupportLevel; UINT32 offscreenSupportLevel;
stream_read_UINT32(s, offscreenSupportLevel); /* offscreenSupportLevel (4 bytes) */ stream_read_UINT32(s, offscreenSupportLevel); /* offscreenSupportLevel (4 bytes) */
stream_read_UINT16(s, settings->offscreen_bitmap_cache_size); /* offscreenCacheSize (2 bytes) */ stream_read_UINT16(s, settings->OffscreenBitmapCacheSize); /* offscreenCacheSize (2 bytes) */
stream_read_UINT16(s, settings->offscreen_bitmap_cache_entries); /* offscreenCacheEntries (2 bytes) */ stream_read_UINT16(s, settings->OffscreenBitmapCacheEntries); /* offscreenCacheEntries (2 bytes) */
if (offscreenSupportLevel & TRUE) if (offscreenSupportLevel & TRUE)
settings->offscreen_bitmap_cache = TRUE; settings->OffscreenBitmapCacheEnabled = TRUE;
} }
/** /**
@ -917,12 +917,12 @@ void rdp_write_offscreen_bitmap_cache_capability_set(STREAM* s, rdpSettings* set
header = rdp_capability_set_start(s); header = rdp_capability_set_start(s);
if (settings->offscreen_bitmap_cache) if (settings->OffscreenBitmapCacheEnabled)
offscreenSupportLevel = TRUE; offscreenSupportLevel = TRUE;
stream_write_UINT32(s, offscreenSupportLevel); /* offscreenSupportLevel (4 bytes) */ stream_write_UINT32(s, offscreenSupportLevel); /* offscreenSupportLevel (4 bytes) */
stream_write_UINT16(s, settings->offscreen_bitmap_cache_size); /* offscreenCacheSize (2 bytes) */ stream_write_UINT16(s, settings->OffscreenBitmapCacheSize); /* offscreenCacheSize (2 bytes) */
stream_write_UINT16(s, settings->offscreen_bitmap_cache_entries); /* offscreenCacheEntries (2 bytes) */ stream_write_UINT16(s, settings->OffscreenBitmapCacheEntries); /* offscreenCacheEntries (2 bytes) */
rdp_capability_set_finish(s, header, CAPSET_TYPE_OFFSCREEN_CACHE); rdp_capability_set_finish(s, header, CAPSET_TYPE_OFFSCREEN_CACHE);
} }
@ -943,7 +943,7 @@ void rdp_read_bitmap_cache_host_support_capability_set(STREAM* s, UINT16 length,
stream_seek_UINT16(s); /* pad2 (2 bytes) */ stream_seek_UINT16(s); /* pad2 (2 bytes) */
if (cacheVersion & BITMAP_CACHE_V2) if (cacheVersion & BITMAP_CACHE_V2)
settings->persistent_bitmap_cache = TRUE; settings->BitmapCachePersistEnabled = TRUE;
} }
/** /**
@ -1015,17 +1015,17 @@ void rdp_write_bitmap_cache_v2_capability_set(STREAM* s, rdpSettings* settings)
cacheFlags = ALLOW_CACHE_WAITING_LIST_FLAG; cacheFlags = ALLOW_CACHE_WAITING_LIST_FLAG;
if (settings->persistent_bitmap_cache) if (settings->BitmapCachePersistEnabled)
cacheFlags |= PERSISTENT_KEYS_EXPECTED_FLAG; cacheFlags |= PERSISTENT_KEYS_EXPECTED_FLAG;
stream_write_UINT16(s, cacheFlags); /* cacheFlags (2 bytes) */ stream_write_UINT16(s, cacheFlags); /* cacheFlags (2 bytes) */
stream_write_BYTE(s, 0); /* pad2 (1 byte) */ stream_write_BYTE(s, 0); /* pad2 (1 byte) */
stream_write_BYTE(s, settings->bitmapCacheV2NumCells); /* numCellCaches (1 byte) */ stream_write_BYTE(s, settings->BitmapCacheV2NumCells); /* numCellCaches (1 byte) */
rdp_write_bitmap_cache_cell_info(s, &settings->bitmapCacheV2CellInfo[0]); /* bitmapCache0CellInfo (4 bytes) */ rdp_write_bitmap_cache_cell_info(s, &settings->BitmapCacheV2CellInfo[0]); /* bitmapCache0CellInfo (4 bytes) */
rdp_write_bitmap_cache_cell_info(s, &settings->bitmapCacheV2CellInfo[1]); /* bitmapCache1CellInfo (4 bytes) */ rdp_write_bitmap_cache_cell_info(s, &settings->BitmapCacheV2CellInfo[1]); /* bitmapCache1CellInfo (4 bytes) */
rdp_write_bitmap_cache_cell_info(s, &settings->bitmapCacheV2CellInfo[2]); /* bitmapCache2CellInfo (4 bytes) */ rdp_write_bitmap_cache_cell_info(s, &settings->BitmapCacheV2CellInfo[2]); /* bitmapCache2CellInfo (4 bytes) */
rdp_write_bitmap_cache_cell_info(s, &settings->bitmapCacheV2CellInfo[3]); /* bitmapCache3CellInfo (4 bytes) */ rdp_write_bitmap_cache_cell_info(s, &settings->BitmapCacheV2CellInfo[3]); /* bitmapCache3CellInfo (4 bytes) */
rdp_write_bitmap_cache_cell_info(s, &settings->bitmapCacheV2CellInfo[4]); /* bitmapCache4CellInfo (4 bytes) */ rdp_write_bitmap_cache_cell_info(s, &settings->BitmapCacheV2CellInfo[4]); /* bitmapCache4CellInfo (4 bytes) */
stream_write_zero(s, 12); /* pad3 (12 bytes) */ stream_write_zero(s, 12); /* pad3 (12 bytes) */
rdp_capability_set_finish(s, header, CAPSET_TYPE_BITMAP_CACHE_V2); rdp_capability_set_finish(s, header, CAPSET_TYPE_BITMAP_CACHE_V2);
@ -1051,7 +1051,7 @@ void rdp_read_virtual_channel_capability_set(STREAM* s, UINT16 length, rdpSettin
VCChunkSize = 1600; VCChunkSize = 1600;
if (settings->server_mode != TRUE) if (settings->server_mode != TRUE)
settings->vc_chunk_size = VCChunkSize; settings->VirtualChannelChunkSize = VCChunkSize;
} }
/** /**
@ -1071,7 +1071,7 @@ void rdp_write_virtual_channel_capability_set(STREAM* s, rdpSettings* settings)
flags = VCCAPS_NO_COMPR; flags = VCCAPS_NO_COMPR;
stream_write_UINT32(s, flags); /* flags (4 bytes) */ stream_write_UINT32(s, flags); /* flags (4 bytes) */
stream_write_UINT32(s, settings->vc_chunk_size); /* VCChunkSize (4 bytes) */ stream_write_UINT32(s, settings->VirtualChannelChunkSize); /* VCChunkSize (4 bytes) */
rdp_capability_set_finish(s, header, CAPSET_TYPE_VIRTUAL_CHANNEL); rdp_capability_set_finish(s, header, CAPSET_TYPE_VIRTUAL_CHANNEL);
} }
@ -1088,12 +1088,12 @@ void rdp_read_draw_nine_grid_cache_capability_set(STREAM* s, UINT16 length, rdpS
UINT32 drawNineGridSupportLevel; UINT32 drawNineGridSupportLevel;
stream_read_UINT32(s, drawNineGridSupportLevel); /* drawNineGridSupportLevel (4 bytes) */ stream_read_UINT32(s, drawNineGridSupportLevel); /* drawNineGridSupportLevel (4 bytes) */
stream_read_UINT16(s, settings->draw_nine_grid_cache_size); /* drawNineGridCacheSize (2 bytes) */ stream_read_UINT16(s, settings->DrawNineGridCacheSize); /* drawNineGridCacheSize (2 bytes) */
stream_read_UINT16(s, settings->draw_nine_grid_cache_entries); /* drawNineGridCacheEntries (2 bytes) */ stream_read_UINT16(s, settings->DrawNineGridCacheEntries); /* drawNineGridCacheEntries (2 bytes) */
if ((drawNineGridSupportLevel & DRAW_NINEGRID_SUPPORTED) || if ((drawNineGridSupportLevel & DRAW_NINEGRID_SUPPORTED) ||
(drawNineGridSupportLevel & DRAW_NINEGRID_SUPPORTED_V2)) (drawNineGridSupportLevel & DRAW_NINEGRID_SUPPORTED_V2))
settings->draw_nine_grid = TRUE; settings->DrawNineGridEnabled = TRUE;
} }
/** /**
@ -1110,11 +1110,11 @@ void rdp_write_draw_nine_grid_cache_capability_set(STREAM* s, rdpSettings* setti
header = rdp_capability_set_start(s); header = rdp_capability_set_start(s);
drawNineGridSupportLevel = (settings->draw_nine_grid) ? DRAW_NINEGRID_SUPPORTED_V2 : DRAW_NINEGRID_NO_SUPPORT; drawNineGridSupportLevel = (settings->DrawNineGridEnabled) ? DRAW_NINEGRID_SUPPORTED_V2 : DRAW_NINEGRID_NO_SUPPORT;
stream_write_UINT32(s, drawNineGridSupportLevel); /* drawNineGridSupportLevel (4 bytes) */ stream_write_UINT32(s, drawNineGridSupportLevel); /* drawNineGridSupportLevel (4 bytes) */
stream_write_UINT16(s, settings->draw_nine_grid_cache_size); /* drawNineGridCacheSize (2 bytes) */ stream_write_UINT16(s, settings->DrawNineGridCacheSize); /* drawNineGridCacheSize (2 bytes) */
stream_write_UINT16(s, settings->draw_nine_grid_cache_entries); /* drawNineGridCacheEntries (2 bytes) */ stream_write_UINT16(s, settings->DrawNineGridCacheEntries); /* drawNineGridCacheEntries (2 bytes) */
rdp_capability_set_finish(s, header, CAPSET_TYPE_DRAW_NINE_GRID_CACHE); rdp_capability_set_finish(s, header, CAPSET_TYPE_DRAW_NINE_GRID_CACHE);
} }
@ -1163,10 +1163,10 @@ void rdp_read_draw_gdiplus_cache_capability_set(STREAM* s, UINT16 length, rdpSet
stream_seek(s, 6); /* GdipImageCacheProperties (6 bytes) */ stream_seek(s, 6); /* GdipImageCacheProperties (6 bytes) */
if (drawGDIPlusSupportLevel & DRAW_GDIPLUS_SUPPORTED) if (drawGDIPlusSupportLevel & DRAW_GDIPLUS_SUPPORTED)
settings->draw_gdi_plus = TRUE; settings->DrawGdiPlusEnabled = TRUE;
if (drawGdiplusCacheLevel & DRAW_GDIPLUS_CACHE_LEVEL_ONE) if (drawGdiplusCacheLevel & DRAW_GDIPLUS_CACHE_LEVEL_ONE)
settings->draw_gdi_plus_cache = TRUE; settings->DrawGdiPlusCacheEnabled = TRUE;
} }
/** /**
@ -1184,8 +1184,8 @@ void rdp_write_draw_gdiplus_cache_capability_set(STREAM* s, rdpSettings* setting
header = rdp_capability_set_start(s); header = rdp_capability_set_start(s);
drawGDIPlusSupportLevel = (settings->draw_gdi_plus) ? DRAW_GDIPLUS_SUPPORTED : DRAW_GDIPLUS_DEFAULT; drawGDIPlusSupportLevel = (settings->DrawGdiPlusEnabled) ? DRAW_GDIPLUS_SUPPORTED : DRAW_GDIPLUS_DEFAULT;
drawGdiplusCacheLevel = (settings->draw_gdi_plus) ? DRAW_GDIPLUS_CACHE_LEVEL_ONE : DRAW_GDIPLUS_CACHE_LEVEL_DEFAULT; drawGdiplusCacheLevel = (settings->DrawGdiPlusEnabled) ? DRAW_GDIPLUS_CACHE_LEVEL_ONE : DRAW_GDIPLUS_CACHE_LEVEL_DEFAULT;
stream_write_UINT32(s, drawGDIPlusSupportLevel); /* drawGDIPlusSupportLevel (4 bytes) */ stream_write_UINT32(s, drawGDIPlusSupportLevel); /* drawGDIPlusSupportLevel (4 bytes) */
stream_write_UINT32(s, 0); /* GdipVersion (4 bytes) */ stream_write_UINT32(s, 0); /* GdipVersion (4 bytes) */
@ -1212,10 +1212,10 @@ void rdp_read_remote_programs_capability_set(STREAM* s, UINT16 length, rdpSettin
if ((railSupportLevel & RAIL_LEVEL_SUPPORTED) == 0) if ((railSupportLevel & RAIL_LEVEL_SUPPORTED) == 0)
{ {
if (settings->remote_app == TRUE) if (settings->RemoteApplicationMode == TRUE)
{ {
/* RemoteApp Failure! */ /* RemoteApp Failure! */
settings->remote_app = FALSE; settings->RemoteApplicationMode = FALSE;
} }
} }
} }
@ -1236,7 +1236,7 @@ void rdp_write_remote_programs_capability_set(STREAM* s, rdpSettings* settings)
railSupportLevel = RAIL_LEVEL_SUPPORTED; railSupportLevel = RAIL_LEVEL_SUPPORTED;
if (settings->rail_langbar_supported) if (settings->RemoteAppLanguageBarSupported)
railSupportLevel |= RAIL_LEVEL_DOCKED_LANGBAR_SUPPORTED; railSupportLevel |= RAIL_LEVEL_DOCKED_LANGBAR_SUPPORTED;
stream_write_UINT32(s, railSupportLevel); /* railSupportLevel (4 bytes) */ stream_write_UINT32(s, railSupportLevel); /* railSupportLevel (4 bytes) */
@ -1275,8 +1275,8 @@ void rdp_write_window_list_capability_set(STREAM* s, rdpSettings* settings)
wndSupportLevel = WINDOW_LEVEL_SUPPORTED_EX; wndSupportLevel = WINDOW_LEVEL_SUPPORTED_EX;
stream_write_UINT32(s, wndSupportLevel); /* wndSupportLevel (4 bytes) */ stream_write_UINT32(s, wndSupportLevel); /* wndSupportLevel (4 bytes) */
stream_write_BYTE(s, settings->num_icon_caches); /* numIconCaches (1 byte) */ stream_write_BYTE(s, settings->RemoteAppNumIconCaches); /* numIconCaches (1 byte) */
stream_write_UINT16(s, settings->num_icon_cache_entries); /* numIconCacheEntries (2 bytes) */ stream_write_UINT16(s, settings->RemoteAppNumIconCacheEntries); /* numIconCacheEntries (2 bytes) */
rdp_capability_set_finish(s, header, CAPSET_TYPE_WINDOW); rdp_capability_set_finish(s, header, CAPSET_TYPE_WINDOW);
} }
@ -1307,7 +1307,7 @@ void rdp_write_desktop_composition_capability_set(STREAM* s, rdpSettings* settin
header = rdp_capability_set_start(s); header = rdp_capability_set_start(s);
compDeskSupportLevel = (settings->desktop_composition) ? COMPDESK_SUPPORTED : COMPDESK_NOT_SUPPORTED; compDeskSupportLevel = (settings->AllowDesktopComposition) ? COMPDESK_SUPPORTED : COMPDESK_NOT_SUPPORTED;
stream_write_UINT16(s, compDeskSupportLevel); /* compDeskSupportLevel (2 bytes) */ stream_write_UINT16(s, compDeskSupportLevel); /* compDeskSupportLevel (2 bytes) */
@ -1323,7 +1323,7 @@ void rdp_write_desktop_composition_capability_set(STREAM* s, rdpSettings* settin
void rdp_read_multifragment_update_capability_set(STREAM* s, UINT16 length, rdpSettings* settings) void rdp_read_multifragment_update_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
{ {
stream_read_UINT32(s, settings->multifrag_max_request_size); /* MaxRequestSize (4 bytes) */ stream_read_UINT32(s, settings->MultifragMaxRequestSize); /* MaxRequestSize (4 bytes) */
} }
/** /**
@ -1339,7 +1339,7 @@ void rdp_write_multifragment_update_capability_set(STREAM* s, rdpSettings* setti
header = rdp_capability_set_start(s); header = rdp_capability_set_start(s);
stream_write_UINT32(s, settings->multifrag_max_request_size); /* MaxRequestSize (4 bytes) */ stream_write_UINT32(s, settings->MultifragMaxRequestSize); /* MaxRequestSize (4 bytes) */
rdp_capability_set_finish(s, header, CAPSET_TYPE_MULTI_FRAGMENT_UPDATE); rdp_capability_set_finish(s, header, CAPSET_TYPE_MULTI_FRAGMENT_UPDATE);
} }
@ -1370,7 +1370,7 @@ void rdp_write_large_pointer_capability_set(STREAM* s, rdpSettings* settings)
header = rdp_capability_set_start(s); header = rdp_capability_set_start(s);
largePointerSupportFlags = (settings->large_pointer) ? LARGE_POINTER_FLAG_96x96 : 0; largePointerSupportFlags = (settings->LargePointer) ? LARGE_POINTER_FLAG_96x96 : 0;
stream_write_UINT16(s, largePointerSupportFlags); /* largePointerSupportFlags (2 bytes) */ stream_write_UINT16(s, largePointerSupportFlags); /* largePointerSupportFlags (2 bytes) */
@ -1389,7 +1389,7 @@ void rdp_read_surface_commands_capability_set(STREAM* s, UINT16 length, rdpSetti
stream_seek_UINT32(s); /* cmdFlags (4 bytes) */ stream_seek_UINT32(s); /* cmdFlags (4 bytes) */
stream_seek_UINT32(s); /* reserved (4 bytes) */ stream_seek_UINT32(s); /* reserved (4 bytes) */
settings->surface_commands = TRUE; settings->SurfaceCommandsEnabled = TRUE;
} }
/** /**
@ -1432,9 +1432,9 @@ void rdp_read_bitmap_codecs_capability_set(STREAM* s, UINT16 length, rdpSettings
if (settings->server_mode) if (settings->server_mode)
{ {
settings->rfx_codec = FALSE; settings->RemoteFxCodec = FALSE;
settings->ns_codec = FALSE; settings->NSCodec = FALSE;
settings->jpeg_codec = FALSE; settings->JpegCodec = FALSE;
} }
while (bitmapCodecCount > 0) while (bitmapCodecCount > 0)
@ -1442,14 +1442,14 @@ void rdp_read_bitmap_codecs_capability_set(STREAM* s, UINT16 length, rdpSettings
if (settings->server_mode && strncmp((char*)stream_get_tail(s), CODEC_GUID_REMOTEFX, 16) == 0) if (settings->server_mode && strncmp((char*)stream_get_tail(s), CODEC_GUID_REMOTEFX, 16) == 0)
{ {
stream_seek(s, 16); /* codecGUID (16 bytes) */ stream_seek(s, 16); /* codecGUID (16 bytes) */
stream_read_BYTE(s, settings->rfx_codec_id); stream_read_BYTE(s, settings->RemoteFxCodecId);
settings->rfx_codec = TRUE; settings->RemoteFxCodec = TRUE;
} }
else if (settings->server_mode && strncmp((char*)stream_get_tail(s), CODEC_GUID_NSCODEC, 16) == 0) else if (settings->server_mode && strncmp((char*)stream_get_tail(s), CODEC_GUID_NSCODEC, 16) == 0)
{ {
stream_seek(s, 16); /*codec GUID (16 bytes) */ stream_seek(s, 16); /*codec GUID (16 bytes) */
stream_read_BYTE(s, settings->ns_codec_id); stream_read_BYTE(s, settings->NSCodecId);
settings->ns_codec = TRUE; settings->NSCodec = TRUE;
} }
else else
{ {
@ -1474,8 +1474,8 @@ void rdp_write_rfx_client_capability_container(STREAM* s, rdpSettings* settings)
UINT32 captureFlags; UINT32 captureFlags;
BYTE codecMode; BYTE codecMode;
captureFlags = settings->rfx_codec_only ? CARDP_CAPS_CAPTURE_NON_CAC : 0; captureFlags = settings->RemoteFxOnly ? CARDP_CAPS_CAPTURE_NON_CAC : 0;
codecMode = settings->rfx_codec_mode; codecMode = settings->RemoteFxCodecMode;
stream_write_UINT16(s, 49); /* codecPropertiesLength */ stream_write_UINT16(s, 49); /* codecPropertiesLength */
@ -1532,7 +1532,7 @@ void rdp_write_nsc_client_capability_container(STREAM* s, rdpSettings* settings)
void rdp_write_jpeg_client_capability_container(STREAM* s, rdpSettings* settings) void rdp_write_jpeg_client_capability_container(STREAM* s, rdpSettings* settings)
{ {
stream_write_UINT16(s, 1); /* codecPropertiesLength */ stream_write_UINT16(s, 1); /* codecPropertiesLength */
stream_write_BYTE(s, settings->jpeg_quality); stream_write_BYTE(s, settings->JpegQuality);
} }
/** /**
@ -1579,16 +1579,16 @@ void rdp_write_bitmap_codecs_capability_set(STREAM* s, rdpSettings* settings)
bitmapCodecCount = 0; bitmapCodecCount = 0;
if (settings->rfx_codec) if (settings->RemoteFxCodec)
bitmapCodecCount++; bitmapCodecCount++;
if (settings->ns_codec) if (settings->NSCodec)
bitmapCodecCount++; bitmapCodecCount++;
if (settings->jpeg_codec) if (settings->JpegCodec)
bitmapCodecCount++; bitmapCodecCount++;
stream_write_BYTE(s, bitmapCodecCount); stream_write_BYTE(s, bitmapCodecCount);
if (settings->rfx_codec) if (settings->RemoteFxCodec)
{ {
stream_write(s, CODEC_GUID_REMOTEFX, 16); /* codecGUID */ stream_write(s, CODEC_GUID_REMOTEFX, 16); /* codecGUID */
@ -1603,7 +1603,7 @@ void rdp_write_bitmap_codecs_capability_set(STREAM* s, rdpSettings* settings)
rdp_write_rfx_client_capability_container(s, settings); rdp_write_rfx_client_capability_container(s, settings);
} }
} }
if (settings->ns_codec) if (settings->NSCodec)
{ {
stream_write(s, CODEC_GUID_NSCODEC, 16); stream_write(s, CODEC_GUID_NSCODEC, 16);
if (settings->server_mode) if (settings->server_mode)
@ -1617,7 +1617,7 @@ void rdp_write_bitmap_codecs_capability_set(STREAM* s, rdpSettings* settings)
rdp_write_nsc_client_capability_container(s, settings); rdp_write_nsc_client_capability_container(s, settings);
} }
} }
if (settings->jpeg_codec) if (settings->JpegCodec)
{ {
stream_write(s, CODEC_GUID_JPEG, 16); stream_write(s, CODEC_GUID_JPEG, 16);
if (settings->server_mode) if (settings->server_mode)
@ -1644,7 +1644,7 @@ void rdp_read_frame_acknowledge_capability_set(STREAM* s, UINT16 length, rdpSett
{ {
if (settings->server_mode) if (settings->server_mode)
{ {
stream_read_UINT32(s, settings->frame_acknowledge); /* (4 bytes) */ stream_read_UINT32(s, settings->FrameAcknowledge); /* (4 bytes) */
} }
else else
{ {
@ -1662,7 +1662,7 @@ void rdp_write_bitmap_cache_v3_codec_id_capability_set(STREAM* s, rdpSettings* s
BYTE* header; BYTE* header;
header = rdp_capability_set_start(s); header = rdp_capability_set_start(s);
stream_write_BYTE(s, settings->v3_codec_id); stream_write_BYTE(s, settings->BitmapCacheV3CodecId);
rdp_capability_set_finish(s, header, 6); rdp_capability_set_finish(s, header, 6);
} }
@ -1680,7 +1680,7 @@ void rdp_write_frame_acknowledge_capability_set(STREAM* s, rdpSettings* settings
header = rdp_capability_set_start(s); header = rdp_capability_set_start(s);
frame_acknowledge = settings->frame_acknowledge; frame_acknowledge = settings->FrameAcknowledge;
stream_write_UINT32(s, frame_acknowledge); /* (4 bytes) */ stream_write_UINT32(s, frame_acknowledge); /* (4 bytes) */
rdp_capability_set_finish(s, header, CAPSET_TYPE_FRAME_ACKNOWLEDGE); rdp_capability_set_finish(s, header, CAPSET_TYPE_FRAME_ACKNOWLEDGE);
@ -1698,7 +1698,7 @@ BOOL rdp_read_capability_sets(STREAM* s, rdpSettings* settings, UINT16 numberCap
rdp_read_capability_set_header(s, &length, &type); rdp_read_capability_set_header(s, &length, &type);
//printf("%s Capability Set (0x%02X), length:%d\n", CAPSET_TYPE_STRINGS[type], type, length); //printf("%s Capability Set (0x%02X), length:%d\n", CAPSET_TYPE_STRINGS[type], type, length);
settings->received_caps[type] = TRUE; settings->ReceivedCapabilities[type] = TRUE;
em = bm + length; em = bm + length;
if (stream_get_left(s) < length - 4) if (stream_get_left(s) < length - 4)
@ -1861,7 +1861,7 @@ BOOL rdp_recv_demand_active(rdpRdp* rdp, STREAM* s)
if (rdp->disconnect) if (rdp->disconnect)
return TRUE; return TRUE;
if (rdp->settings->encryption) if (rdp->settings->Encryption)
{ {
rdp_read_security_header(s, &securityFlags); rdp_read_security_header(s, &securityFlags);
if (securityFlags & SEC_ENCRYPT) if (securityFlags & SEC_ENCRYPT)
@ -1908,7 +1908,7 @@ BOOL rdp_recv_demand_active(rdpRdp* rdp, STREAM* s)
return FALSE; return FALSE;
} }
rdp->update->secondary->glyph_v2 = (rdp->settings->glyphSupportLevel > GLYPH_SUPPORT_FULL) ? TRUE : FALSE; rdp->update->secondary->glyph_v2 = (rdp->settings->GlyphSupportLevel > GLYPH_SUPPORT_FULL) ? TRUE : FALSE;
return TRUE; return TRUE;
} }
@ -1946,7 +1946,7 @@ void rdp_write_demand_active(STREAM* s, rdpSettings* settings)
rdp_write_bitmap_codecs_capability_set(s, settings); rdp_write_bitmap_codecs_capability_set(s, settings);
rdp_write_frame_acknowledge_capability_set(s, settings); rdp_write_frame_acknowledge_capability_set(s, settings);
if (settings->persistent_bitmap_cache) if (settings->BitmapCachePersistEnabled)
{ {
numberCapabilities++; numberCapabilities++;
rdp_write_bitmap_cache_host_support_capability_set(s, settings); rdp_write_bitmap_cache_host_support_capability_set(s, settings);
@ -1996,7 +1996,7 @@ BOOL rdp_recv_confirm_active(rdpRdp* rdp, STREAM* s)
if (!rdp_read_header(rdp, s, &length, &channelId)) if (!rdp_read_header(rdp, s, &length, &channelId))
return FALSE; return FALSE;
if (rdp->settings->encryption) if (rdp->settings->Encryption)
{ {
rdp_read_security_header(s, &securityFlags); rdp_read_security_header(s, &securityFlags);
if (securityFlags & SEC_ENCRYPT) if (securityFlags & SEC_ENCRYPT)
@ -2078,64 +2078,64 @@ void rdp_write_confirm_active(STREAM* s, rdpSettings* settings)
rdp_write_color_cache_capability_set(s, settings); rdp_write_color_cache_capability_set(s, settings);
rdp_write_window_activation_capability_set(s, settings); rdp_write_window_activation_capability_set(s, settings);
if (settings->offscreen_bitmap_cache) if (settings->OffscreenBitmapCacheEnabled)
{ {
numberCapabilities++; numberCapabilities++;
rdp_write_offscreen_bitmap_cache_capability_set(s, settings); rdp_write_offscreen_bitmap_cache_capability_set(s, settings);
} }
if (settings->draw_nine_grid) if (settings->DrawNineGridEnabled)
{ {
numberCapabilities++; numberCapabilities++;
rdp_write_draw_nine_grid_cache_capability_set(s, settings); rdp_write_draw_nine_grid_cache_capability_set(s, settings);
} }
if (settings->received_caps[CAPSET_TYPE_LARGE_POINTER]) if (settings->ReceivedCapabilities[CAPSET_TYPE_LARGE_POINTER])
{ {
if (settings->large_pointer) if (settings->LargePointer)
{ {
numberCapabilities++; numberCapabilities++;
rdp_write_large_pointer_capability_set(s, settings); rdp_write_large_pointer_capability_set(s, settings);
} }
} }
if (settings->remote_app) if (settings->RemoteApplicationMode)
{ {
numberCapabilities += 2; numberCapabilities += 2;
rdp_write_remote_programs_capability_set(s, settings); rdp_write_remote_programs_capability_set(s, settings);
rdp_write_window_list_capability_set(s, settings); rdp_write_window_list_capability_set(s, settings);
} }
if (settings->received_caps[CAPSET_TYPE_MULTI_FRAGMENT_UPDATE]) if (settings->ReceivedCapabilities[CAPSET_TYPE_MULTI_FRAGMENT_UPDATE])
{ {
numberCapabilities++; numberCapabilities++;
rdp_write_multifragment_update_capability_set(s, settings); rdp_write_multifragment_update_capability_set(s, settings);
} }
if (settings->received_caps[CAPSET_TYPE_SURFACE_COMMANDS]) if (settings->ReceivedCapabilities[CAPSET_TYPE_SURFACE_COMMANDS])
{ {
numberCapabilities++; numberCapabilities++;
rdp_write_surface_commands_capability_set(s, settings); rdp_write_surface_commands_capability_set(s, settings);
} }
if (settings->received_caps[CAPSET_TYPE_BITMAP_CODECS]) if (settings->ReceivedCapabilities[CAPSET_TYPE_BITMAP_CODECS])
{ {
numberCapabilities++; numberCapabilities++;
rdp_write_bitmap_codecs_capability_set(s, settings); rdp_write_bitmap_codecs_capability_set(s, settings);
} }
if (settings->received_caps[CAPSET_TYPE_FRAME_ACKNOWLEDGE]) if (settings->ReceivedCapabilities[CAPSET_TYPE_FRAME_ACKNOWLEDGE])
{ {
if (settings->frame_acknowledge > 0) if (settings->FrameAcknowledge > 0)
{ {
numberCapabilities++; numberCapabilities++;
rdp_write_frame_acknowledge_capability_set(s, settings); rdp_write_frame_acknowledge_capability_set(s, settings);
} }
} }
if (settings->received_caps[6]) if (settings->ReceivedCapabilities[6])
{ {
if (settings->v3_codec_id != 0) if (settings->BitmapCacheV3CodecId != 0)
{ {
numberCapabilities++; numberCapabilities++;
rdp_write_bitmap_cache_v3_codec_id_capability_set(s, settings); rdp_write_bitmap_cache_v3_codec_id_capability_set(s, settings);

View File

@ -63,9 +63,9 @@ BOOL freerdp_channel_send(rdpRdp* rdp, UINT16 channel_id, BYTE* data, int size)
{ {
s = rdp_send_stream_init(rdp); s = rdp_send_stream_init(rdp);
if (left > (int) rdp->settings->vc_chunk_size) if (left > (int) rdp->settings->VirtualChannelChunkSize)
{ {
chunk_size = rdp->settings->vc_chunk_size; chunk_size = rdp->settings->VirtualChannelChunkSize;
} }
else else
{ {

View File

@ -73,9 +73,9 @@ BOOL rdp_client_connect(rdpRdp* rdp)
rdpSettings* settings = rdp->settings; rdpSettings* settings = rdp->settings;
nego_init(rdp->nego); nego_init(rdp->nego);
nego_set_target(rdp->nego, settings->hostname, settings->port); nego_set_target(rdp->nego, settings->Hostname, settings->ServerPort);
if (settings->ts_gateway) if (settings->GatewayUsageMethod)
{ {
char* user; char* user;
char* domain; char* domain;
@ -84,13 +84,13 @@ BOOL rdp_client_connect(rdpRdp* rdp)
int domain_length; int domain_length;
int cookie_length; int cookie_length;
user = settings->username; user = settings->Username;
user_length = strlen(settings->username); user_length = strlen(settings->Username);
if (settings->domain) if (settings->Domain)
domain = settings->domain; domain = settings->Domain;
else else
domain = settings->computer_name; domain = settings->ComputerName;
domain_length = strlen(domain); domain_length = strlen(domain);
@ -107,12 +107,12 @@ BOOL rdp_client_connect(rdpRdp* rdp)
} }
else else
{ {
nego_set_cookie(rdp->nego, settings->username); nego_set_cookie(rdp->nego, settings->Username);
} }
nego_set_send_preconnection_pdu(rdp->nego, settings->send_preconnection_pdu); nego_set_send_preconnection_pdu(rdp->nego, settings->SendPreconnectionPdu);
nego_set_preconnection_id(rdp->nego, settings->preconnection_id); nego_set_preconnection_id(rdp->nego, settings->PreconnectionId);
nego_set_preconnection_blob(rdp->nego, settings->preconnection_blob); nego_set_preconnection_blob(rdp->nego, settings->PreconnectionBlob);
nego_set_negotiation_enabled(rdp->nego, settings->NegotiateSecurityLayer); nego_set_negotiation_enabled(rdp->nego, settings->NegotiateSecurityLayer);
@ -121,10 +121,10 @@ BOOL rdp_client_connect(rdpRdp* rdp)
nego_enable_nla(rdp->nego, settings->NlaSecurity); nego_enable_nla(rdp->nego, settings->NlaSecurity);
nego_enable_ext(rdp->nego, settings->ExtSecurity); nego_enable_ext(rdp->nego, settings->ExtSecurity);
if (settings->mstsc_cookie_mode) if (settings->MstscCookieMode)
settings->cookie_max_length = MSTSC_COOKIE_MAX_LENGTH; settings->CookieMaxLength = MSTSC_COOKIE_MAX_LENGTH;
nego_set_cookie_max_length(rdp->nego, settings->cookie_max_length); nego_set_cookie_max_length(rdp->nego, settings->CookieMaxLength);
if (!nego_connect(rdp->nego)) if (!nego_connect(rdp->nego))
{ {
@ -134,8 +134,8 @@ BOOL rdp_client_connect(rdpRdp* rdp)
if ((rdp->nego->selected_protocol & PROTOCOL_TLS) || (rdp->nego->selected_protocol == PROTOCOL_RDP)) if ((rdp->nego->selected_protocol & PROTOCOL_TLS) || (rdp->nego->selected_protocol == PROTOCOL_RDP))
{ {
if ((settings->username != NULL) && ((settings->password != NULL) || if ((settings->Username != NULL) && ((settings->Password != NULL) ||
(settings->password_cookie != NULL && settings->password_cookie_length > 0))) (settings->PasswordCookie != NULL && settings->PasswordCookieLength > 0)))
settings->autologon = TRUE; settings->autologon = TRUE;
} }
@ -189,8 +189,8 @@ BOOL rdp_client_redirect(rdpRdp* rdp)
license_free(rdp->license); license_free(rdp->license);
transport_free(rdp->transport); transport_free(rdp->transport);
free(settings->server_random); free(settings->ServerRandom);
free(settings->server_certificate); free(settings->ServerCertificate);
free(settings->ip_address); free(settings->ip_address);
rdp->transport = transport_new(settings); rdp->transport = transport_new(settings);
@ -199,7 +199,7 @@ BOOL rdp_client_redirect(rdpRdp* rdp)
rdp->mcs = mcs_new(rdp->transport); rdp->mcs = mcs_new(rdp->transport);
rdp->transport->layer = TRANSPORT_LAYER_TCP; rdp->transport->layer = TRANSPORT_LAYER_TCP;
settings->redirected_session_id = redirection->sessionID; settings->RedirectedSessionId = redirection->sessionID;
if (redirection->flags & LB_LOAD_BALANCE_INFO) if (redirection->flags & LB_LOAD_BALANCE_INFO)
{ {
@ -209,37 +209,37 @@ BOOL rdp_client_redirect(rdpRdp* rdp)
{ {
if (redirection->flags & LB_TARGET_NET_ADDRESS) if (redirection->flags & LB_TARGET_NET_ADDRESS)
{ {
free(settings->hostname); free(settings->Hostname);
settings->hostname = _strdup(redirection->targetNetAddress.ascii); settings->Hostname = _strdup(redirection->targetNetAddress.ascii);
} }
else if (redirection->flags & LB_TARGET_FQDN) else if (redirection->flags & LB_TARGET_FQDN)
{ {
free(settings->hostname); free(settings->Hostname);
settings->hostname = _strdup(redirection->targetFQDN.ascii); settings->Hostname = _strdup(redirection->targetFQDN.ascii);
} }
else if (redirection->flags & LB_TARGET_NETBIOS_NAME) else if (redirection->flags & LB_TARGET_NETBIOS_NAME)
{ {
free(settings->hostname); free(settings->Hostname);
settings->hostname = _strdup(redirection->targetNetBiosName.ascii); settings->Hostname = _strdup(redirection->targetNetBiosName.ascii);
} }
} }
if (redirection->flags & LB_USERNAME) if (redirection->flags & LB_USERNAME)
{ {
free(settings->username); free(settings->Username);
settings->username = _strdup(redirection->username.ascii); settings->Username = _strdup(redirection->username.ascii);
} }
if (redirection->flags & LB_DOMAIN) if (redirection->flags & LB_DOMAIN)
{ {
free(settings->domain); free(settings->Domain);
settings->domain = _strdup(redirection->domain.ascii); settings->Domain = _strdup(redirection->domain.ascii);
} }
if (redirection->flags & LB_PASSWORD) if (redirection->flags & LB_PASSWORD)
{ {
settings->password_cookie = redirection->PasswordCookie; settings->PasswordCookie = redirection->PasswordCookie;
settings->password_cookie_length = redirection->PasswordCookieLength; settings->PasswordCookieLength = redirection->PasswordCookieLength;
} }
return rdp_client_connect(rdp); return rdp_client_connect(rdp);
@ -255,7 +255,7 @@ static BOOL rdp_client_establish_keys(rdpRdp* rdp)
UINT32 length; UINT32 length;
STREAM* s; STREAM* s;
if (rdp->settings->encryption == FALSE) if (rdp->settings->Encryption == FALSE)
{ {
/* no RDP encryption */ /* no RDP encryption */
return TRUE; return TRUE;
@ -264,9 +264,9 @@ static BOOL rdp_client_establish_keys(rdpRdp* rdp)
/* encrypt client random */ /* encrypt client random */
memset(crypt_client_random, 0, sizeof(crypt_client_random)); memset(crypt_client_random, 0, sizeof(crypt_client_random));
crypto_nonce(client_random, sizeof(client_random)); crypto_nonce(client_random, sizeof(client_random));
key_len = rdp->settings->server_cert->cert_info.ModulusLength; key_len = rdp->settings->ServerCert->cert_info.ModulusLength;
mod = rdp->settings->server_cert->cert_info.Modulus; mod = rdp->settings->ServerCert->cert_info.Modulus;
exp = rdp->settings->server_cert->cert_info.exponent; exp = rdp->settings->ServerCert->cert_info.exponent;
crypto_rsa_public_encrypt(client_random, sizeof(client_random), key_len, mod, exp, crypt_client_random); crypto_rsa_public_encrypt(client_random, sizeof(client_random), key_len, mod, exp, crypt_client_random);
/* send crypt client random to server */ /* send crypt client random to server */
@ -289,7 +289,7 @@ static BOOL rdp_client_establish_keys(rdpRdp* rdp)
} }
rdp->do_crypt = TRUE; rdp->do_crypt = TRUE;
if (rdp->settings->salted_checksum) if (rdp->settings->SaltedChecksum)
rdp->do_secure_checksum = TRUE; rdp->do_secure_checksum = TRUE;
if (rdp->settings->EncryptionMethod == ENCRYPTION_METHOD_FIPS) if (rdp->settings->EncryptionMethod == ENCRYPTION_METHOD_FIPS)
@ -317,7 +317,7 @@ static BOOL rdp_server_establish_keys(rdpRdp* rdp, STREAM* s)
BYTE* mod; BYTE* mod;
BYTE* priv_exp; BYTE* priv_exp;
if (rdp->settings->encryption == FALSE) if (rdp->settings->Encryption == FALSE)
{ {
/* No RDP Security. */ /* No RDP Security. */
return TRUE; return TRUE;
@ -338,7 +338,7 @@ static BOOL rdp_server_establish_keys(rdpRdp* rdp, STREAM* s)
} }
stream_read_UINT32(s, rand_len); stream_read_UINT32(s, rand_len);
key_len = rdp->settings->server_key->ModulusLength; key_len = rdp->settings->ServerKey->ModulusLength;
if (rand_len != key_len + 8) if (rand_len != key_len + 8)
{ {
@ -350,8 +350,8 @@ static BOOL rdp_server_establish_keys(rdpRdp* rdp, STREAM* s)
stream_read(s, crypt_client_random, rand_len); stream_read(s, crypt_client_random, rand_len);
/* 8 zero bytes of padding */ /* 8 zero bytes of padding */
stream_seek(s, 8); stream_seek(s, 8);
mod = rdp->settings->server_key->Modulus; mod = rdp->settings->ServerKey->Modulus;
priv_exp = rdp->settings->server_key->PrivateExponent; priv_exp = rdp->settings->ServerKey->PrivateExponent;
crypto_rsa_private_decrypt(crypt_client_random, rand_len - 8, key_len, mod, priv_exp, client_random); crypto_rsa_private_decrypt(crypt_client_random, rand_len - 8, key_len, mod, priv_exp, client_random);
/* now calculate encrypt / decrypt and update keys */ /* now calculate encrypt / decrypt and update keys */
@ -361,7 +361,7 @@ static BOOL rdp_server_establish_keys(rdpRdp* rdp, STREAM* s)
} }
rdp->do_crypt = TRUE; rdp->do_crypt = TRUE;
if (rdp->settings->salted_checksum) if (rdp->settings->SaltedChecksum)
rdp->do_secure_checksum = TRUE; rdp->do_secure_checksum = TRUE;
if (rdp->settings->EncryptionMethod == ENCRYPTION_METHOD_FIPS) if (rdp->settings->EncryptionMethod == ENCRYPTION_METHOD_FIPS)
@ -636,7 +636,7 @@ BOOL rdp_server_accept_mcs_connect_initial(rdpRdp* rdp, STREAM* s)
if (!mcs_recv_connect_initial(rdp->mcs, s)) if (!mcs_recv_connect_initial(rdp->mcs, s))
return FALSE; return FALSE;
printf("Accepted client: %s\n", rdp->settings->client_hostname); printf("Accepted client: %s\n", rdp->settings->ClientHostname);
printf("Accepted channels:"); printf("Accepted channels:");
for (i = 0; i < rdp->settings->num_channels; i++) for (i = 0; i < rdp->settings->num_channels; i++)

View File

@ -91,9 +91,9 @@ BOOL freerdp_connect(freerdp* instance)
if (status) if (status)
{ {
if (instance->settings->dump_rfx) if (instance->settings->DumpRemoteFx)
{ {
instance->update->pcap_rfx = pcap_open(instance->settings->dump_rfx_file, TRUE); instance->update->pcap_rfx = pcap_open(instance->settings->DumpRemoteFxFile, TRUE);
if (instance->update->pcap_rfx) if (instance->update->pcap_rfx)
instance->update->dump_rfx = TRUE; instance->update->dump_rfx = TRUE;
} }
@ -114,14 +114,14 @@ BOOL freerdp_connect(freerdp* instance)
return FALSE; return FALSE;
} }
if (instance->settings->play_rfx) if (instance->settings->PlayRemoteFx)
{ {
STREAM* s; STREAM* s;
rdpUpdate* update; rdpUpdate* update;
pcap_record record; pcap_record record;
s = stream_new(1024); s = stream_new(1024);
instance->update->pcap_rfx = pcap_open(instance->settings->play_rfx_file, FALSE); instance->update->pcap_rfx = pcap_open(instance->settings->PlayRemoteFxFile, FALSE);
if (instance->update->pcap_rfx) if (instance->update->pcap_rfx)
instance->update->play_rfx = TRUE; instance->update->play_rfx = TRUE;

View File

@ -493,8 +493,8 @@ BOOL gcc_read_client_core_data(STREAM* s, rdpSettings* settings, UINT16 blockLen
/* clientName (32 bytes, null-terminated unicode, truncated to 15 characters) */ /* clientName (32 bytes, null-terminated unicode, truncated to 15 characters) */
freerdp_UnicodeToAsciiAlloc((WCHAR*) stream_get_tail(s), &str, 32 / 2); freerdp_UnicodeToAsciiAlloc((WCHAR*) stream_get_tail(s), &str, 32 / 2);
stream_seek(s, 32); stream_seek(s, 32);
snprintf(settings->client_hostname, 31, "%s", str); snprintf(settings->ClientHostname, 31, "%s", str);
settings->client_hostname[31] = 0; settings->ClientHostname[31] = 0;
free(str); free(str);
stream_read_UINT32(s, settings->KeyboardType); /* KeyboardType */ stream_read_UINT32(s, settings->KeyboardType); /* KeyboardType */
@ -549,13 +549,13 @@ BOOL gcc_read_client_core_data(STREAM* s, rdpSettings* settings, UINT16 blockLen
freerdp_UnicodeToAsciiAlloc((WCHAR*) stream_get_tail(s), &str, 64 / 2); freerdp_UnicodeToAsciiAlloc((WCHAR*) stream_get_tail(s), &str, 64 / 2);
stream_seek(s, 64); stream_seek(s, 64);
snprintf(settings->client_product_id, 32, "%s", str); snprintf(settings->ClientProductId, 32, "%s", str);
free(str); free(str);
blockLength -= 64; blockLength -= 64;
if (blockLength < 1) if (blockLength < 1)
break; break;
stream_read_BYTE(s, settings->performance_flags); /* connectionType */ stream_read_BYTE(s, settings->PerformanceFlags); /* connectionType */
blockLength -= 1; blockLength -= 1;
if (blockLength < 1) if (blockLength < 1)
@ -647,8 +647,8 @@ void gcc_write_client_core_data(STREAM* s, rdpSettings* settings)
version = settings->RdpVersion >= 5 ? RDP_VERSION_5_PLUS : RDP_VERSION_4; version = settings->RdpVersion >= 5 ? RDP_VERSION_5_PLUS : RDP_VERSION_4;
clientNameLength = freerdp_AsciiToUnicodeAlloc(settings->client_hostname, &clientName, 0); clientNameLength = freerdp_AsciiToUnicodeAlloc(settings->ClientHostname, &clientName, 0);
clientDigProductIdLength = freerdp_AsciiToUnicodeAlloc(settings->client_product_id, &clientDigProductId, 0); clientDigProductIdLength = freerdp_AsciiToUnicodeAlloc(settings->ClientProductId, &clientDigProductId, 0);
stream_write_UINT32(s, version); /* Version */ stream_write_UINT32(s, version); /* Version */
stream_write_UINT16(s, settings->DesktopWidth); /* DesktopWidth */ stream_write_UINT16(s, settings->DesktopWidth); /* DesktopWidth */
@ -690,7 +690,7 @@ void gcc_write_client_core_data(STREAM* s, rdpSettings* settings)
connectionType = settings->ConnectionType; connectionType = settings->ConnectionType;
earlyCapabilityFlags = RNS_UD_CS_SUPPORT_ERRINFO_PDU; earlyCapabilityFlags = RNS_UD_CS_SUPPORT_ERRINFO_PDU;
if (settings->rfx_codec) if (settings->RemoteFxCodec)
connectionType = CONNECTION_TYPE_LAN; connectionType = CONNECTION_TYPE_LAN;
if (connectionType != 0) if (connectionType != 0)
@ -760,7 +760,7 @@ BOOL gcc_read_client_security_data(STREAM* s, rdpSettings* settings, UINT16 bloc
if (blockLength < 8) if (blockLength < 8)
return FALSE; return FALSE;
if (settings->encryption) if (settings->Encryption)
{ {
stream_read_UINT32(s, settings->EncryptionMethod); /* encryptionMethods */ stream_read_UINT32(s, settings->EncryptionMethod); /* encryptionMethods */
if (settings->EncryptionMethod == 0) if (settings->EncryptionMethod == 0)
@ -784,7 +784,7 @@ void gcc_write_client_security_data(STREAM* s, rdpSettings* settings)
{ {
gcc_write_user_data_header(s, CS_SECURITY, 12); gcc_write_user_data_header(s, CS_SECURITY, 12);
if (settings->encryption) if (settings->Encryption)
{ {
stream_write_UINT32(s, settings->EncryptionMethod); /* encryptionMethods */ stream_write_UINT32(s, settings->EncryptionMethod); /* encryptionMethods */
stream_write_UINT32(s, 0); /* extEncryptionMethods */ stream_write_UINT32(s, 0); /* extEncryptionMethods */
@ -808,38 +808,38 @@ BOOL gcc_read_server_security_data(STREAM* s, rdpSettings* settings)
if (settings->EncryptionMethod == 0 && settings->EncryptionLevel == 0) if (settings->EncryptionMethod == 0 && settings->EncryptionLevel == 0)
{ {
/* serverRandom and serverRandom must not be present */ /* serverRandom and serverRandom must not be present */
settings->encryption = FALSE; settings->Encryption = FALSE;
settings->EncryptionMethod = ENCRYPTION_METHOD_NONE; settings->EncryptionMethod = ENCRYPTION_METHOD_NONE;
settings->EncryptionLevel = ENCRYPTION_LEVEL_NONE; settings->EncryptionLevel = ENCRYPTION_LEVEL_NONE;
return TRUE; return TRUE;
} }
stream_read_UINT32(s, settings->server_random_length); /* serverRandomLen */ stream_read_UINT32(s, settings->ServerRandomLength); /* serverRandomLen */
stream_read_UINT32(s, settings->server_certificate_length); /* serverCertLen */ stream_read_UINT32(s, settings->ServerCertificateLength); /* serverCertLen */
if (settings->server_random_length > 0) if (settings->ServerRandomLength > 0)
{ {
/* serverRandom */ /* serverRandom */
settings->server_random = (BYTE*) malloc(settings->server_random_length); settings->ServerRandom = (BYTE*) malloc(settings->ServerRandomLength);
stream_read(s, settings->server_random, settings->server_random_length); stream_read(s, settings->ServerRandom, settings->ServerRandomLength);
} }
else else
{ {
return FALSE; return FALSE;
} }
if (settings->server_certificate_length > 0) if (settings->ServerCertificateLength > 0)
{ {
/* serverCertificate */ /* serverCertificate */
settings->server_certificate = (BYTE*) malloc(settings->server_certificate_length); settings->ServerCertificate = (BYTE*) malloc(settings->ServerCertificateLength);
stream_read(s, settings->server_certificate, settings->server_certificate_length); stream_read(s, settings->ServerCertificate, settings->ServerCertificateLength);
certificate_free(settings->server_cert); certificate_free(settings->ServerCert);
settings->server_cert = certificate_new(); settings->ServerCert = certificate_new();
data = settings->server_certificate; data = settings->ServerCertificate;
length = settings->server_certificate_length; length = settings->ServerCertificateLength;
if (!certificate_read_server_certificate(settings->server_cert, data, length)) if (!certificate_read_server_certificate(settings->ServerCert, data, length))
return FALSE; return FALSE;
} }
else else
@ -905,7 +905,7 @@ void gcc_write_server_security_data(STREAM* s, rdpSettings* settings)
BYTE signature[sizeof(initial_signature)]; BYTE signature[sizeof(initial_signature)];
UINT32 headerLen, serverRandomLen, serverCertLen, wPublicKeyBlobLen; UINT32 headerLen, serverRandomLen, serverCertLen, wPublicKeyBlobLen;
if (!settings->encryption) if (!settings->Encryption)
{ {
settings->EncryptionMethod = ENCRYPTION_METHOD_NONE; settings->EncryptionMethod = ENCRYPTION_METHOD_NONE;
settings->EncryptionLevel = ENCRYPTION_LEVEL_NONE; settings->EncryptionLevel = ENCRYPTION_LEVEL_NONE;
@ -937,8 +937,8 @@ void gcc_write_server_security_data(STREAM* s, rdpSettings* settings)
{ {
serverRandomLen = 32; serverRandomLen = 32;
keyLen = settings->server_key->ModulusLength; keyLen = settings->ServerKey->ModulusLength;
expLen = sizeof(settings->server_key->exponent); expLen = sizeof(settings->ServerKey->exponent);
wPublicKeyBlobLen = 4; /* magic (RSA1) */ wPublicKeyBlobLen = 4; /* magic (RSA1) */
wPublicKeyBlobLen += 4; /* keylen */ wPublicKeyBlobLen += 4; /* keylen */
wPublicKeyBlobLen += 4; /* bitlen */ wPublicKeyBlobLen += 4; /* bitlen */
@ -978,10 +978,10 @@ void gcc_write_server_security_data(STREAM* s, rdpSettings* settings)
stream_write_UINT32(s, serverRandomLen); /* serverRandomLen */ stream_write_UINT32(s, serverRandomLen); /* serverRandomLen */
stream_write_UINT32(s, serverCertLen); /* serverCertLen */ stream_write_UINT32(s, serverCertLen); /* serverCertLen */
settings->server_random_length = serverRandomLen; settings->ServerRandomLength = serverRandomLen;
settings->server_random = (BYTE*) malloc(serverRandomLen); settings->ServerRandom = (BYTE*) malloc(serverRandomLen);
crypto_nonce(settings->server_random, serverRandomLen); crypto_nonce(settings->ServerRandom, serverRandomLen);
stream_write(s, settings->server_random, serverRandomLen); stream_write(s, settings->ServerRandom, serverRandomLen);
sigData = stream_get_tail(s); sigData = stream_get_tail(s);
@ -996,8 +996,8 @@ void gcc_write_server_security_data(STREAM* s, rdpSettings* settings)
stream_write_UINT32(s, keyLen * 8); /* bitlen */ stream_write_UINT32(s, keyLen * 8); /* bitlen */
stream_write_UINT32(s, keyLen - 1); /* datalen */ stream_write_UINT32(s, keyLen - 1); /* datalen */
stream_write(s, settings->server_key->exponent, expLen); stream_write(s, settings->ServerKey->exponent, expLen);
stream_write(s, settings->server_key->Modulus, keyLen); stream_write(s, settings->ServerKey->Modulus, keyLen);
stream_write_zero(s, 8); stream_write_zero(s, 8);
sigDataLen = stream_get_tail(s) - sigData; sigDataLen = stream_get_tail(s) - sigData;
@ -1142,7 +1142,7 @@ BOOL gcc_read_client_cluster_data(STREAM* s, rdpSettings* settings, UINT16 block
stream_read_UINT32(s, flags); /* flags */ stream_read_UINT32(s, flags); /* flags */
if ((flags & REDIRECTED_SESSIONID_FIELD_VALID)) if ((flags & REDIRECTED_SESSIONID_FIELD_VALID))
stream_read_UINT32(s, settings->redirected_session_id); /* redirectedSessionID */ stream_read_UINT32(s, settings->RedirectedSessionId); /* redirectedSessionID */
return TRUE; return TRUE;
} }
@ -1162,11 +1162,11 @@ void gcc_write_client_cluster_data(STREAM* s, rdpSettings* settings)
flags = REDIRECTION_SUPPORTED | (REDIRECTION_VERSION4 << 2); flags = REDIRECTION_SUPPORTED | (REDIRECTION_VERSION4 << 2);
if (settings->console_session || settings->redirected_session_id) if (settings->ConsoleSession || settings->RedirectedSessionId)
flags |= REDIRECTED_SESSIONID_FIELD_VALID; flags |= REDIRECTED_SESSIONID_FIELD_VALID;
stream_write_UINT32(s, flags); /* flags */ stream_write_UINT32(s, flags); /* flags */
stream_write_UINT32(s, settings->redirected_session_id); /* redirectedSessionID */ stream_write_UINT32(s, settings->RedirectedSessionId); /* redirectedSessionID */
} }
/** /**

View File

@ -52,7 +52,7 @@ static const char* const INFO_TYPE_LOGON_STRINGS[] =
void rdp_read_server_auto_reconnect_cookie(STREAM* s, rdpSettings* settings) void rdp_read_server_auto_reconnect_cookie(STREAM* s, rdpSettings* settings)
{ {
ARC_SC_PRIVATE_PACKET* autoReconnectCookie; ARC_SC_PRIVATE_PACKET* autoReconnectCookie;
autoReconnectCookie = settings->server_auto_reconnect_cookie; autoReconnectCookie = settings->ServerAutoReconnectCookie;
stream_read_UINT32(s, autoReconnectCookie->cbLen); /* cbLen (4 bytes) */ stream_read_UINT32(s, autoReconnectCookie->cbLen); /* cbLen (4 bytes) */
stream_read_UINT32(s, autoReconnectCookie->version); /* version (4 bytes) */ stream_read_UINT32(s, autoReconnectCookie->version); /* version (4 bytes) */
@ -70,7 +70,7 @@ void rdp_read_server_auto_reconnect_cookie(STREAM* s, rdpSettings* settings)
BOOL rdp_read_client_auto_reconnect_cookie(STREAM* s, rdpSettings* settings) BOOL rdp_read_client_auto_reconnect_cookie(STREAM* s, rdpSettings* settings)
{ {
ARC_CS_PRIVATE_PACKET* autoReconnectCookie; ARC_CS_PRIVATE_PACKET* autoReconnectCookie;
autoReconnectCookie = settings->client_auto_reconnect_cookie; autoReconnectCookie = settings->ClientAutoReconnectCookie;
if (stream_get_left(s) < 28) if (stream_get_left(s) < 28)
return FALSE; return FALSE;
@ -93,7 +93,7 @@ BOOL rdp_read_client_auto_reconnect_cookie(STREAM* s, rdpSettings* settings)
void rdp_write_client_auto_reconnect_cookie(STREAM* s, rdpSettings* settings) void rdp_write_client_auto_reconnect_cookie(STREAM* s, rdpSettings* settings)
{ {
ARC_CS_PRIVATE_PACKET* autoReconnectCookie; ARC_CS_PRIVATE_PACKET* autoReconnectCookie;
autoReconnectCookie = settings->client_auto_reconnect_cookie; autoReconnectCookie = settings->ClientAutoReconnectCookie;
stream_write_UINT32(s, autoReconnectCookie->cbLen); /* cbLen (4 bytes) */ stream_write_UINT32(s, autoReconnectCookie->cbLen); /* cbLen (4 bytes) */
stream_write_UINT32(s, autoReconnectCookie->version); /* version (4 bytes) */ stream_write_UINT32(s, autoReconnectCookie->version); /* version (4 bytes) */
@ -118,7 +118,7 @@ BOOL rdp_read_extended_info_packet(STREAM* s, rdpSettings* settings)
stream_read_UINT16(s, clientAddressFamily); /* clientAddressFamily */ stream_read_UINT16(s, clientAddressFamily); /* clientAddressFamily */
stream_read_UINT16(s, cbClientAddress); /* cbClientAddress */ stream_read_UINT16(s, cbClientAddress); /* cbClientAddress */
settings->ipv6 = (clientAddressFamily == ADDRESS_FAMILY_INET6 ? TRUE : FALSE); settings->IPv6 = (clientAddressFamily == ADDRESS_FAMILY_INET6 ? TRUE : FALSE);
if (stream_get_left(s) < cbClientAddress) if (stream_get_left(s) < cbClientAddress)
return FALSE; return FALSE;
@ -141,7 +141,7 @@ BOOL rdp_read_extended_info_packet(STREAM* s, rdpSettings* settings)
return FALSE; return FALSE;
stream_seek_UINT32(s); /* clientSessionId, should be set to 0 */ stream_seek_UINT32(s); /* clientSessionId, should be set to 0 */
stream_read_UINT32(s, settings->performance_flags); /* performanceFlags */ stream_read_UINT32(s, settings->PerformanceFlags); /* performanceFlags */
stream_read_UINT16(s, cbAutoReconnectLen); /* cbAutoReconnectLen */ stream_read_UINT16(s, cbAutoReconnectLen); /* cbAutoReconnectLen */
@ -170,13 +170,13 @@ void rdp_write_extended_info_packet(STREAM* s, rdpSettings* settings)
int cbClientDir; int cbClientDir;
int cbAutoReconnectLen; int cbAutoReconnectLen;
clientAddressFamily = settings->ipv6 ? ADDRESS_FAMILY_INET6 : ADDRESS_FAMILY_INET; clientAddressFamily = settings->IPv6 ? ADDRESS_FAMILY_INET6 : ADDRESS_FAMILY_INET;
cbClientAddress = freerdp_AsciiToUnicodeAlloc(settings->ip_address, &clientAddress, 0) * 2; cbClientAddress = freerdp_AsciiToUnicodeAlloc(settings->ip_address, &clientAddress, 0) * 2;
cbClientDir = freerdp_AsciiToUnicodeAlloc(settings->client_dir, &clientDir, 0) * 2; cbClientDir = freerdp_AsciiToUnicodeAlloc(settings->client_dir, &clientDir, 0) * 2;
cbAutoReconnectLen = (int) settings->client_auto_reconnect_cookie->cbLen; cbAutoReconnectLen = (int) settings->ClientAutoReconnectCookie->cbLen;
stream_write_UINT16(s, clientAddressFamily); /* clientAddressFamily */ stream_write_UINT16(s, clientAddressFamily); /* clientAddressFamily */
@ -195,7 +195,7 @@ void rdp_write_extended_info_packet(STREAM* s, rdpSettings* settings)
rdp_write_client_time_zone(s, settings); /* clientTimeZone */ rdp_write_client_time_zone(s, settings); /* clientTimeZone */
stream_write_UINT32(s, 0); /* clientSessionId, should be set to 0 */ stream_write_UINT32(s, 0); /* clientSessionId, should be set to 0 */
stream_write_UINT32(s, settings->performance_flags); /* performanceFlags */ stream_write_UINT32(s, settings->PerformanceFlags); /* performanceFlags */
stream_write_UINT16(s, cbAutoReconnectLen); /* cbAutoReconnectLen */ stream_write_UINT16(s, cbAutoReconnectLen); /* cbAutoReconnectLen */
@ -229,8 +229,8 @@ BOOL rdp_read_info_packet(STREAM* s, rdpSettings* settings)
stream_read_UINT32(s, flags); /* flags */ stream_read_UINT32(s, flags); /* flags */
settings->autologon = ((flags & INFO_AUTOLOGON) ? TRUE : FALSE); settings->autologon = ((flags & INFO_AUTOLOGON) ? TRUE : FALSE);
settings->remote_app = ((flags & INFO_RAIL) ? TRUE : FALSE); settings->RemoteApplicationMode = ((flags & INFO_RAIL) ? TRUE : FALSE);
settings->console_audio = ((flags & INFO_REMOTECONSOLEAUDIO) ? TRUE : FALSE); settings->ConsoleAudio = ((flags & INFO_REMOTECONSOLEAUDIO) ? TRUE : FALSE);
settings->compression = ((flags & INFO_COMPRESSION) ? TRUE : FALSE); settings->compression = ((flags & INFO_COMPRESSION) ? TRUE : FALSE);
stream_read_UINT16(s, cbDomain); /* cbDomain */ stream_read_UINT16(s, cbDomain); /* cbDomain */
@ -244,7 +244,7 @@ BOOL rdp_read_info_packet(STREAM* s, rdpSettings* settings)
if (cbDomain > 0) if (cbDomain > 0)
{ {
freerdp_UnicodeToAsciiAlloc((WCHAR*) stream_get_tail(s), &settings->domain, cbDomain / 2); freerdp_UnicodeToAsciiAlloc((WCHAR*) stream_get_tail(s), &settings->Domain, cbDomain / 2);
stream_seek(s, cbDomain); stream_seek(s, cbDomain);
} }
stream_seek(s, 2); stream_seek(s, 2);
@ -254,7 +254,7 @@ BOOL rdp_read_info_packet(STREAM* s, rdpSettings* settings)
if (cbUserName > 0) if (cbUserName > 0)
{ {
freerdp_UnicodeToAsciiAlloc((WCHAR*) stream_get_tail(s), &settings->username, cbUserName / 2); freerdp_UnicodeToAsciiAlloc((WCHAR*) stream_get_tail(s), &settings->Username, cbUserName / 2);
stream_seek(s, cbUserName); stream_seek(s, cbUserName);
} }
stream_seek(s, 2); stream_seek(s, 2);
@ -264,7 +264,7 @@ BOOL rdp_read_info_packet(STREAM* s, rdpSettings* settings)
if (cbPassword > 0) if (cbPassword > 0)
{ {
freerdp_UnicodeToAsciiAlloc((WCHAR*) stream_get_tail(s), &settings->password, cbPassword / 2); freerdp_UnicodeToAsciiAlloc((WCHAR*) stream_get_tail(s), &settings->Password, cbPassword / 2);
stream_seek(s, cbPassword); stream_seek(s, cbPassword);
} }
stream_seek(s, 2); stream_seek(s, 2);
@ -274,7 +274,7 @@ BOOL rdp_read_info_packet(STREAM* s, rdpSettings* settings)
if (cbAlternateShell > 0) if (cbAlternateShell > 0)
{ {
freerdp_UnicodeToAsciiAlloc((WCHAR*) stream_get_tail(s), &settings->shell, cbAlternateShell / 2); freerdp_UnicodeToAsciiAlloc((WCHAR*) stream_get_tail(s), &settings->AlternateShell, cbAlternateShell / 2);
stream_seek(s, cbAlternateShell); stream_seek(s, cbAlternateShell);
} }
stream_seek(s, 2); stream_seek(s, 2);
@ -284,7 +284,7 @@ BOOL rdp_read_info_packet(STREAM* s, rdpSettings* settings)
if (cbWorkingDir > 0) if (cbWorkingDir > 0)
{ {
freerdp_UnicodeToAsciiAlloc((WCHAR*) stream_get_tail(s), &settings->directory, cbWorkingDir / 2); freerdp_UnicodeToAsciiAlloc((WCHAR*) stream_get_tail(s), &settings->ShellWorkingDirectory, cbWorkingDir / 2);
stream_seek(s, cbWorkingDir); stream_seek(s, cbWorkingDir);
} }
stream_seek(s, 2); stream_seek(s, 2);
@ -325,27 +325,27 @@ void rdp_write_info_packet(STREAM* s, rdpSettings* settings)
INFO_ENABLEWINDOWSKEY | INFO_ENABLEWINDOWSKEY |
INFO_DISABLECTRLALTDEL; INFO_DISABLECTRLALTDEL;
if (settings->audio_capture) if (settings->AudioCapture)
flags |= RNS_INFO_AUDIOCAPTURE; flags |= RNS_INFO_AUDIOCAPTURE;
if (!settings->audio_playback) if (!settings->AudioPlayback)
flags |= INFO_NOAUDIOPLAYBACK; flags |= INFO_NOAUDIOPLAYBACK;
if (settings->autologon) if (settings->autologon)
flags |= INFO_AUTOLOGON; flags |= INFO_AUTOLOGON;
if (settings->remote_app) if (settings->RemoteApplicationMode)
flags |= INFO_RAIL; flags |= INFO_RAIL;
if (settings->console_audio) if (settings->ConsoleAudio)
flags |= INFO_REMOTECONSOLEAUDIO; flags |= INFO_REMOTECONSOLEAUDIO;
if (settings->compression) if (settings->compression)
flags |= INFO_COMPRESSION | INFO_PACKET_COMPR_TYPE_RDP6; flags |= INFO_COMPRESSION | INFO_PACKET_COMPR_TYPE_RDP6;
if (settings->domain) if (settings->Domain)
{ {
cbDomain = freerdp_AsciiToUnicodeAlloc(settings->domain, &domain, 0) * 2; cbDomain = freerdp_AsciiToUnicodeAlloc(settings->Domain, &domain, 0) * 2;
} }
else else
{ {
@ -353,22 +353,22 @@ void rdp_write_info_packet(STREAM* s, rdpSettings* settings)
cbDomain = 0; cbDomain = 0;
} }
cbUserName = freerdp_AsciiToUnicodeAlloc(settings->username, &userName, 0) * 2; cbUserName = freerdp_AsciiToUnicodeAlloc(settings->Username, &userName, 0) * 2;
if (settings->password_cookie && settings->password_cookie_length > 0) if (settings->PasswordCookie && settings->PasswordCookieLength > 0)
{ {
usedPasswordCookie = TRUE; usedPasswordCookie = TRUE;
password = (WCHAR*) settings->password_cookie; password = (WCHAR*) settings->PasswordCookie;
cbPassword = settings->password_cookie_length - 2; /* Strip double zero termination */ cbPassword = settings->PasswordCookieLength - 2; /* Strip double zero termination */
} }
else else
{ {
cbPassword = freerdp_AsciiToUnicodeAlloc(settings->password, &password, 0) * 2; cbPassword = freerdp_AsciiToUnicodeAlloc(settings->Password, &password, 0) * 2;
} }
cbAlternateShell = freerdp_AsciiToUnicodeAlloc(settings->shell, &alternateShell, 0) * 2; cbAlternateShell = freerdp_AsciiToUnicodeAlloc(settings->AlternateShell, &alternateShell, 0) * 2;
cbWorkingDir = freerdp_AsciiToUnicodeAlloc(settings->directory, &workingDir, 0) * 2; cbWorkingDir = freerdp_AsciiToUnicodeAlloc(settings->ShellWorkingDirectory, &workingDir, 0) * 2;
stream_write_UINT32(s, 0); /* CodePage */ stream_write_UINT32(s, 0); /* CodePage */
stream_write_UINT32(s, flags); /* flags */ stream_write_UINT32(s, flags); /* flags */
@ -431,7 +431,7 @@ BOOL rdp_recv_client_info(rdpRdp* rdp, STREAM* s)
if ((securityFlags & SEC_INFO_PKT) == 0) if ((securityFlags & SEC_INFO_PKT) == 0)
return FALSE; return FALSE;
if (rdp->settings->encryption) if (rdp->settings->Encryption)
{ {
if (securityFlags & SEC_REDIRECTION_PKT) if (securityFlags & SEC_REDIRECTION_PKT)
{ {

View File

@ -368,7 +368,7 @@ void input_register_client_callbacks(rdpInput* input)
{ {
rdpRdp* rdp = input->context->rdp; rdpRdp* rdp = input->context->rdp;
if (rdp->settings->fastpath_input) if (rdp->settings->FastpathInput)
{ {
input->SynchronizeEvent = input_send_fastpath_synchronize_event; input->SynchronizeEvent = input_send_fastpath_synchronize_event;
input->KeyboardEvent = input_send_fastpath_keyboard_event; input->KeyboardEvent = input_send_fastpath_keyboard_event;

View File

@ -775,16 +775,16 @@ void license_send_new_license_request_packet(rdpLicense* license)
s = license_send_stream_init(license); s = license_send_stream_init(license);
if (license->rdp->settings->username != NULL) if (license->rdp->settings->Username != NULL)
username = license->rdp->settings->username; username = license->rdp->settings->Username;
else else
username = "username"; username = "username";
license->client_user_name->data = (BYTE*) username; license->client_user_name->data = (BYTE*) username;
license->client_user_name->length = strlen(username) + 1; license->client_user_name->length = strlen(username) + 1;
license->client_machine_name->data = (BYTE*) license->rdp->settings->client_hostname; license->client_machine_name->data = (BYTE*) license->rdp->settings->ClientHostname;
license->client_machine_name->length = strlen(license->rdp->settings->client_hostname) + 1; license->client_machine_name->length = strlen(license->rdp->settings->ClientHostname) + 1;
license_write_new_license_request_packet(license, s); license_write_new_license_request_packet(license, s);

View File

@ -154,7 +154,7 @@ BOOL nego_connect(rdpNego* nego)
if(nego->selected_protocol == PROTOCOL_RDP) if(nego->selected_protocol == PROTOCOL_RDP)
{ {
nego->transport->settings->encryption = TRUE; nego->transport->settings->Encryption = TRUE;
nego->transport->settings->EncryptionMethod = ENCRYPTION_METHOD_40BIT | ENCRYPTION_METHOD_128BIT | ENCRYPTION_METHOD_FIPS; nego->transport->settings->EncryptionMethod = ENCRYPTION_METHOD_40BIT | ENCRYPTION_METHOD_128BIT | ENCRYPTION_METHOD_FIPS;
nego->transport->settings->EncryptionLevel = ENCRYPTION_LEVEL_CLIENT_COMPATIBLE; nego->transport->settings->EncryptionLevel = ENCRYPTION_LEVEL_CLIENT_COMPATIBLE;
} }
@ -838,12 +838,12 @@ BOOL nego_send_negotiation_response(rdpNego* nego)
if (!settings->local) if (!settings->local)
{ {
settings->encryption = TRUE; settings->Encryption = TRUE;
settings->EncryptionMethod = ENCRYPTION_METHOD_40BIT | ENCRYPTION_METHOD_128BIT | ENCRYPTION_METHOD_FIPS; settings->EncryptionMethod = ENCRYPTION_METHOD_40BIT | ENCRYPTION_METHOD_128BIT | ENCRYPTION_METHOD_FIPS;
settings->EncryptionLevel = ENCRYPTION_LEVEL_CLIENT_COMPATIBLE; settings->EncryptionLevel = ENCRYPTION_LEVEL_CLIENT_COMPATIBLE;
} }
if (settings->encryption && settings->server_key == NULL && settings->rdp_key_file == NULL) if (settings->Encryption && settings->ServerKey == NULL && settings->RdpKeyFile == NULL)
return FALSE; return FALSE;
} }
else if (settings->SelectedProtocol == PROTOCOL_TLS) else if (settings->SelectedProtocol == PROTOCOL_TLS)
@ -851,7 +851,7 @@ BOOL nego_send_negotiation_response(rdpNego* nego)
settings->TlsSecurity = TRUE; settings->TlsSecurity = TRUE;
settings->NlaSecurity = FALSE; settings->NlaSecurity = FALSE;
settings->RdpSecurity = FALSE; settings->RdpSecurity = FALSE;
settings->encryption = FALSE; settings->Encryption = FALSE;
settings->EncryptionMethod = ENCRYPTION_METHOD_NONE; settings->EncryptionMethod = ENCRYPTION_METHOD_NONE;
settings->EncryptionLevel = ENCRYPTION_LEVEL_NONE; settings->EncryptionLevel = ENCRYPTION_LEVEL_NONE;
} }
@ -860,7 +860,7 @@ BOOL nego_send_negotiation_response(rdpNego* nego)
settings->TlsSecurity = TRUE; settings->TlsSecurity = TRUE;
settings->NlaSecurity = TRUE; settings->NlaSecurity = TRUE;
settings->RdpSecurity = FALSE; settings->RdpSecurity = FALSE;
settings->encryption = FALSE; settings->Encryption = FALSE;
settings->EncryptionMethod = ENCRYPTION_METHOD_NONE; settings->EncryptionMethod = ENCRYPTION_METHOD_NONE;
settings->EncryptionLevel = ENCRYPTION_LEVEL_NONE; settings->EncryptionLevel = ENCRYPTION_LEVEL_NONE;
} }

View File

@ -29,14 +29,14 @@
static BOOL freerdp_peer_initialize(freerdp_peer* client) static BOOL freerdp_peer_initialize(freerdp_peer* client)
{ {
client->context->rdp->settings->server_mode = TRUE; client->context->rdp->settings->server_mode = TRUE;
client->context->rdp->settings->frame_acknowledge = 0; client->context->rdp->settings->FrameAcknowledge = 0;
client->context->rdp->settings->local = client->local; client->context->rdp->settings->local = client->local;
client->context->rdp->state = CONNECTION_STATE_INITIAL; client->context->rdp->state = CONNECTION_STATE_INITIAL;
if (client->context->rdp->settings->rdp_key_file != NULL) if (client->context->rdp->settings->RdpKeyFile != NULL)
{ {
client->context->rdp->settings->server_key = client->context->rdp->settings->ServerKey =
key_new(client->context->rdp->settings->rdp_key_file); key_new(client->context->rdp->settings->RdpKeyFile);
} }
return TRUE; return TRUE;
@ -171,7 +171,7 @@ static BOOL peer_recv_tpkt_pdu(freerdp_peer* client, STREAM* s)
return FALSE; return FALSE;
} }
if (rdp->settings->encryption) if (rdp->settings->Encryption)
{ {
rdp_read_security_header(s, &securityFlags); rdp_read_security_header(s, &securityFlags);
@ -289,7 +289,7 @@ static BOOL peer_recv_callback(rdpTransport* transport, STREAM* s, void* extra)
break; break;
case CONNECTION_STATE_MCS_CHANNEL_JOIN: case CONNECTION_STATE_MCS_CHANNEL_JOIN:
if (rdp->settings->encryption) if (rdp->settings->Encryption)
{ {
if (!rdp_server_accept_client_keys(rdp, s)) if (!rdp_server_accept_client_keys(rdp, s))
return FALSE; return FALSE;

View File

@ -717,7 +717,7 @@ static BOOL rdp_recv_tpkt_pdu(rdpRdp* rdp, STREAM* s)
return FALSE; return FALSE;
} }
if (rdp->settings->encryption) if (rdp->settings->Encryption)
{ {
rdp_read_security_header(s, &securityFlags); rdp_read_security_header(s, &securityFlags);
if (securityFlags & (SEC_ENCRYPT|SEC_REDIRECTION_PKT)) if (securityFlags & (SEC_ENCRYPT|SEC_REDIRECTION_PKT))

View File

@ -509,17 +509,17 @@ BOOL rpc_ntlm_http_out_connect(rdpRpc* rpc)
settings = rpc->settings; settings = rpc->settings;
if (settings->tsg_same_credentials) if (settings->GatewayUseSameCredentials)
{ {
ntlm_client_init(ntlm, TRUE, settings->username, ntlm_client_init(ntlm, TRUE, settings->Username,
settings->domain, settings->password); settings->Domain, settings->Password);
ntlm_client_make_spn(ntlm, _T("HTTP"), settings->tsg_hostname); ntlm_client_make_spn(ntlm, _T("HTTP"), settings->GatewayHostname);
} }
else else
{ {
ntlm_client_init(ntlm, TRUE, settings->tsg_username, ntlm_client_init(ntlm, TRUE, settings->GatewayUsername,
settings->tsg_domain, settings->tsg_password); settings->GatewayDomain, settings->GatewayPassword);
ntlm_client_make_spn(ntlm, _T("HTTP"), settings->tsg_hostname); ntlm_client_make_spn(ntlm, _T("HTTP"), settings->GatewayHostname);
} }
ntlm_authenticate(ntlm); ntlm_authenticate(ntlm);
@ -572,17 +572,17 @@ BOOL rpc_ntlm_http_in_connect(rdpRpc* rpc)
settings = rpc->settings; settings = rpc->settings;
if (settings->tsg_same_credentials) if (settings->GatewayUseSameCredentials)
{ {
ntlm_client_init(ntlm, TRUE, settings->username, ntlm_client_init(ntlm, TRUE, settings->Username,
settings->domain, settings->password); settings->Domain, settings->Password);
ntlm_client_make_spn(ntlm, _T("HTTP"), settings->tsg_hostname); ntlm_client_make_spn(ntlm, _T("HTTP"), settings->GatewayHostname);
} }
else else
{ {
ntlm_client_init(ntlm, TRUE, settings->tsg_username, ntlm_client_init(ntlm, TRUE, settings->GatewayUsername,
settings->tsg_domain, settings->tsg_password); settings->GatewayDomain, settings->GatewayPassword);
ntlm_client_make_spn(ntlm, _T("HTTP"), settings->tsg_hostname); ntlm_client_make_spn(ntlm, _T("HTTP"), settings->GatewayHostname);
} }
ntlm_authenticate(ntlm); ntlm_authenticate(ntlm);
@ -700,7 +700,7 @@ BOOL rpc_send_bind_pdu(rdpRpc* rpc)
DEBUG_RPC("Sending bind PDU"); DEBUG_RPC("Sending bind PDU");
ntlm_client_init(rpc->ntlm, FALSE, settings->username, settings->domain, settings->password); ntlm_client_init(rpc->ntlm, FALSE, settings->Username, settings->Domain, settings->Password);
ntlm_authenticate(rpc->ntlm); ntlm_authenticate(rpc->ntlm);
@ -1246,7 +1246,7 @@ void rpc_ntlm_http_init_channel(rdpRpc* rpc, rdpNtlmHttp* ntlm_http, TSG_CHANNEL
http_context_set_cache_control(ntlm_http->context, "no-cache"); http_context_set_cache_control(ntlm_http->context, "no-cache");
http_context_set_connection(ntlm_http->context, "Keep-Alive"); http_context_set_connection(ntlm_http->context, "Keep-Alive");
http_context_set_user_agent(ntlm_http->context, "MSRPC"); http_context_set_user_agent(ntlm_http->context, "MSRPC");
http_context_set_host(ntlm_http->context, rpc->settings->tsg_hostname); http_context_set_host(ntlm_http->context, rpc->settings->GatewayHostname);
if (channel == TSG_CHANNEL_IN) if (channel == TSG_CHANNEL_IN)
{ {

View File

@ -355,7 +355,7 @@ BOOL security_establish_keys(BYTE* client_random, rdpRdp* rdp)
rdpSettings* settings; rdpSettings* settings;
settings = rdp->settings; settings = rdp->settings;
server_random = settings->server_random; server_random = settings->ServerRandom;
if (settings->EncryptionMethod == ENCRYPTION_METHOD_FIPS) if (settings->EncryptionMethod == ENCRYPTION_METHOD_FIPS)
{ {
@ -366,7 +366,7 @@ BOOL security_establish_keys(BYTE* client_random, rdpRdp* rdp)
printf("FIPS Compliant encryption level.\n"); printf("FIPS Compliant encryption level.\n");
/* disable fastpath input; it doesnt handle FIPS encryption yet */ /* disable fastpath input; it doesnt handle FIPS encryption yet */
rdp->settings->fastpath_input = FALSE; rdp->settings->FastpathInput = FALSE;
sha1 = crypto_sha1_init(); sha1 = crypto_sha1_init();
crypto_sha1_update(sha1, client_random + 16, 16); crypto_sha1_update(sha1, client_random + 16, 16);

View File

@ -82,14 +82,14 @@ void settings_client_load_hkey_local_machine(rdpSettings* settings)
REG_QUERY_BOOL_VALUE(hKey, _T("TlsSecurity"), dwType, dwValue, dwSize, settings->TlsSecurity); REG_QUERY_BOOL_VALUE(hKey, _T("TlsSecurity"), dwType, dwValue, dwSize, settings->TlsSecurity);
REG_QUERY_BOOL_VALUE(hKey, _T("RdpSecurity"), dwType, dwValue, dwSize, settings->RdpSecurity); REG_QUERY_BOOL_VALUE(hKey, _T("RdpSecurity"), dwType, dwValue, dwSize, settings->RdpSecurity);
REG_QUERY_BOOL_VALUE(hKey, _T("MstscCookieMode"), dwType, dwValue, dwSize, settings->mstsc_cookie_mode); REG_QUERY_BOOL_VALUE(hKey, _T("MstscCookieMode"), dwType, dwValue, dwSize, settings->MstscCookieMode);
REG_QUERY_DWORD_VALUE(hKey, _T("CookieMaxLength"), dwType, dwValue, dwSize, settings->cookie_max_length); REG_QUERY_DWORD_VALUE(hKey, _T("CookieMaxLength"), dwType, dwValue, dwSize, settings->CookieMaxLength);
REG_QUERY_BOOL_VALUE(hKey, _T("BitmapCache"), dwType, dwValue, dwSize, settings->bitmap_cache); REG_QUERY_BOOL_VALUE(hKey, _T("BitmapCache"), dwType, dwValue, dwSize, settings->BitmapCacheEnabled);
REG_QUERY_BOOL_VALUE(hKey, _T("OffscreenBitmapCache"), dwType, dwValue, dwSize, settings->offscreen_bitmap_cache); REG_QUERY_BOOL_VALUE(hKey, _T("OffscreenBitmapCache"), dwType, dwValue, dwSize, settings->OffscreenBitmapCacheEnabled);
REG_QUERY_DWORD_VALUE(hKey, _T("OffscreenBitmapCacheSize"), dwType, dwValue, dwSize, settings->offscreen_bitmap_cache_size); REG_QUERY_DWORD_VALUE(hKey, _T("OffscreenBitmapCacheSize"), dwType, dwValue, dwSize, settings->OffscreenBitmapCacheSize);
REG_QUERY_DWORD_VALUE(hKey, _T("OffscreenBitmapCacheEntries"), dwType, dwValue, dwSize, settings->offscreen_bitmap_cache_entries); REG_QUERY_DWORD_VALUE(hKey, _T("OffscreenBitmapCacheEntries"), dwType, dwValue, dwSize, settings->OffscreenBitmapCacheEntries);
RegCloseKey(hKey); RegCloseKey(hKey);
} }
@ -98,20 +98,20 @@ void settings_client_load_hkey_local_machine(rdpSettings* settings)
if (status == ERROR_SUCCESS) if (status == ERROR_SUCCESS)
{ {
REG_QUERY_DWORD_VALUE(hKey, _T("NumCells"), dwType, dwValue, dwSize, settings->bitmapCacheV2NumCells); REG_QUERY_DWORD_VALUE(hKey, _T("NumCells"), dwType, dwValue, dwSize, settings->BitmapCacheV2NumCells);
REG_QUERY_DWORD_VALUE(hKey, _T("Cell0NumEntries"), dwType, dwValue, dwSize, settings->bitmapCacheV2CellInfo[0].numEntries); REG_QUERY_DWORD_VALUE(hKey, _T("Cell0NumEntries"), dwType, dwValue, dwSize, settings->BitmapCacheV2CellInfo[0].numEntries);
REG_QUERY_BOOL_VALUE(hKey, _T("Cell0Persistent"), dwType, dwValue, dwSize, settings->bitmapCacheV2CellInfo[0].persistent); REG_QUERY_BOOL_VALUE(hKey, _T("Cell0Persistent"), dwType, dwValue, dwSize, settings->BitmapCacheV2CellInfo[0].persistent);
REG_QUERY_DWORD_VALUE(hKey, _T("Cell1NumEntries"), dwType, dwValue, dwSize, settings->bitmapCacheV2CellInfo[1].numEntries); REG_QUERY_DWORD_VALUE(hKey, _T("Cell1NumEntries"), dwType, dwValue, dwSize, settings->BitmapCacheV2CellInfo[1].numEntries);
REG_QUERY_BOOL_VALUE(hKey, _T("Cell1Persistent"), dwType, dwValue, dwSize, settings->bitmapCacheV2CellInfo[1].persistent); REG_QUERY_BOOL_VALUE(hKey, _T("Cell1Persistent"), dwType, dwValue, dwSize, settings->BitmapCacheV2CellInfo[1].persistent);
REG_QUERY_DWORD_VALUE(hKey, _T("Cell2NumEntries"), dwType, dwValue, dwSize, settings->bitmapCacheV2CellInfo[2].numEntries); REG_QUERY_DWORD_VALUE(hKey, _T("Cell2NumEntries"), dwType, dwValue, dwSize, settings->BitmapCacheV2CellInfo[2].numEntries);
REG_QUERY_BOOL_VALUE(hKey, _T("Cell2Persistent"), dwType, dwValue, dwSize, settings->bitmapCacheV2CellInfo[2].persistent); REG_QUERY_BOOL_VALUE(hKey, _T("Cell2Persistent"), dwType, dwValue, dwSize, settings->BitmapCacheV2CellInfo[2].persistent);
REG_QUERY_DWORD_VALUE(hKey, _T("Cell3NumEntries"), dwType, dwValue, dwSize, settings->bitmapCacheV2CellInfo[3].numEntries); REG_QUERY_DWORD_VALUE(hKey, _T("Cell3NumEntries"), dwType, dwValue, dwSize, settings->BitmapCacheV2CellInfo[3].numEntries);
REG_QUERY_BOOL_VALUE(hKey, _T("Cell3Persistent"), dwType, dwValue, dwSize, settings->bitmapCacheV2CellInfo[3].persistent); REG_QUERY_BOOL_VALUE(hKey, _T("Cell3Persistent"), dwType, dwValue, dwSize, settings->BitmapCacheV2CellInfo[3].persistent);
REG_QUERY_DWORD_VALUE(hKey, _T("Cell4NumEntries"), dwType, dwValue, dwSize, settings->bitmapCacheV2CellInfo[4].numEntries); REG_QUERY_DWORD_VALUE(hKey, _T("Cell4NumEntries"), dwType, dwValue, dwSize, settings->BitmapCacheV2CellInfo[4].numEntries);
REG_QUERY_BOOL_VALUE(hKey, _T("Cell4Persistent"), dwType, dwValue, dwSize, settings->bitmapCacheV2CellInfo[4].persistent); REG_QUERY_BOOL_VALUE(hKey, _T("Cell4Persistent"), dwType, dwValue, dwSize, settings->BitmapCacheV2CellInfo[4].persistent);
REG_QUERY_BOOL_VALUE(hKey, _T("AllowCacheWaitingList"), dwType, dwValue, dwSize, settings->allow_cache_waiting_list); REG_QUERY_BOOL_VALUE(hKey, _T("AllowCacheWaitingList"), dwType, dwValue, dwSize, settings->AllowCacheWaitingList);
RegCloseKey(hKey); RegCloseKey(hKey);
} }
@ -120,31 +120,31 @@ void settings_client_load_hkey_local_machine(rdpSettings* settings)
if (status == ERROR_SUCCESS) if (status == ERROR_SUCCESS)
{ {
REG_QUERY_DWORD_VALUE(hKey, _T("SupportLevel"), dwType, dwValue, dwSize, settings->glyphSupportLevel); REG_QUERY_DWORD_VALUE(hKey, _T("SupportLevel"), dwType, dwValue, dwSize, settings->GlyphSupportLevel);
REG_QUERY_DWORD_VALUE(hKey, _T("Cache0NumEntries"), dwType, dwValue, dwSize, settings->glyphCache[0].cacheEntries); REG_QUERY_DWORD_VALUE(hKey, _T("Cache0NumEntries"), dwType, dwValue, dwSize, settings->GlyphCache[0].cacheEntries);
REG_QUERY_DWORD_VALUE(hKey, _T("Cache0MaxCellSize"), dwType, dwValue, dwSize, settings->glyphCache[0].cacheMaximumCellSize); REG_QUERY_DWORD_VALUE(hKey, _T("Cache0MaxCellSize"), dwType, dwValue, dwSize, settings->GlyphCache[0].cacheMaximumCellSize);
REG_QUERY_DWORD_VALUE(hKey, _T("Cache1NumEntries"), dwType, dwValue, dwSize, settings->glyphCache[1].cacheEntries); REG_QUERY_DWORD_VALUE(hKey, _T("Cache1NumEntries"), dwType, dwValue, dwSize, settings->GlyphCache[1].cacheEntries);
REG_QUERY_DWORD_VALUE(hKey, _T("Cache1MaxCellSize"), dwType, dwValue, dwSize, settings->glyphCache[1].cacheMaximumCellSize); REG_QUERY_DWORD_VALUE(hKey, _T("Cache1MaxCellSize"), dwType, dwValue, dwSize, settings->GlyphCache[1].cacheMaximumCellSize);
REG_QUERY_DWORD_VALUE(hKey, _T("Cache2NumEntries"), dwType, dwValue, dwSize, settings->glyphCache[2].cacheEntries); REG_QUERY_DWORD_VALUE(hKey, _T("Cache2NumEntries"), dwType, dwValue, dwSize, settings->GlyphCache[2].cacheEntries);
REG_QUERY_DWORD_VALUE(hKey, _T("Cache2MaxCellSize"), dwType, dwValue, dwSize, settings->glyphCache[2].cacheMaximumCellSize); REG_QUERY_DWORD_VALUE(hKey, _T("Cache2MaxCellSize"), dwType, dwValue, dwSize, settings->GlyphCache[2].cacheMaximumCellSize);
REG_QUERY_DWORD_VALUE(hKey, _T("Cache3NumEntries"), dwType, dwValue, dwSize, settings->glyphCache[3].cacheEntries); REG_QUERY_DWORD_VALUE(hKey, _T("Cache3NumEntries"), dwType, dwValue, dwSize, settings->GlyphCache[3].cacheEntries);
REG_QUERY_DWORD_VALUE(hKey, _T("Cache3MaxCellSize"), dwType, dwValue, dwSize, settings->glyphCache[3].cacheMaximumCellSize); REG_QUERY_DWORD_VALUE(hKey, _T("Cache3MaxCellSize"), dwType, dwValue, dwSize, settings->GlyphCache[3].cacheMaximumCellSize);
REG_QUERY_DWORD_VALUE(hKey, _T("Cache4NumEntries"), dwType, dwValue, dwSize, settings->glyphCache[4].cacheEntries); REG_QUERY_DWORD_VALUE(hKey, _T("Cache4NumEntries"), dwType, dwValue, dwSize, settings->GlyphCache[4].cacheEntries);
REG_QUERY_DWORD_VALUE(hKey, _T("Cache4MaxCellSize"), dwType, dwValue, dwSize, settings->glyphCache[4].cacheMaximumCellSize); REG_QUERY_DWORD_VALUE(hKey, _T("Cache4MaxCellSize"), dwType, dwValue, dwSize, settings->GlyphCache[4].cacheMaximumCellSize);
REG_QUERY_DWORD_VALUE(hKey, _T("Cache5NumEntries"), dwType, dwValue, dwSize, settings->glyphCache[5].cacheEntries); REG_QUERY_DWORD_VALUE(hKey, _T("Cache5NumEntries"), dwType, dwValue, dwSize, settings->GlyphCache[5].cacheEntries);
REG_QUERY_DWORD_VALUE(hKey, _T("Cache5MaxCellSize"), dwType, dwValue, dwSize, settings->glyphCache[5].cacheMaximumCellSize); REG_QUERY_DWORD_VALUE(hKey, _T("Cache5MaxCellSize"), dwType, dwValue, dwSize, settings->GlyphCache[5].cacheMaximumCellSize);
REG_QUERY_DWORD_VALUE(hKey, _T("Cache6NumEntries"), dwType, dwValue, dwSize, settings->glyphCache[6].cacheEntries); REG_QUERY_DWORD_VALUE(hKey, _T("Cache6NumEntries"), dwType, dwValue, dwSize, settings->GlyphCache[6].cacheEntries);
REG_QUERY_DWORD_VALUE(hKey, _T("Cache6MaxCellSize"), dwType, dwValue, dwSize, settings->glyphCache[6].cacheMaximumCellSize); REG_QUERY_DWORD_VALUE(hKey, _T("Cache6MaxCellSize"), dwType, dwValue, dwSize, settings->GlyphCache[6].cacheMaximumCellSize);
REG_QUERY_DWORD_VALUE(hKey, _T("Cache7NumEntries"), dwType, dwValue, dwSize, settings->glyphCache[7].cacheEntries); REG_QUERY_DWORD_VALUE(hKey, _T("Cache7NumEntries"), dwType, dwValue, dwSize, settings->GlyphCache[7].cacheEntries);
REG_QUERY_DWORD_VALUE(hKey, _T("Cache7MaxCellSize"), dwType, dwValue, dwSize, settings->glyphCache[7].cacheMaximumCellSize); REG_QUERY_DWORD_VALUE(hKey, _T("Cache7MaxCellSize"), dwType, dwValue, dwSize, settings->GlyphCache[7].cacheMaximumCellSize);
REG_QUERY_DWORD_VALUE(hKey, _T("Cache8NumEntries"), dwType, dwValue, dwSize, settings->glyphCache[8].cacheEntries); REG_QUERY_DWORD_VALUE(hKey, _T("Cache8NumEntries"), dwType, dwValue, dwSize, settings->GlyphCache[8].cacheEntries);
REG_QUERY_DWORD_VALUE(hKey, _T("Cache8MaxCellSize"), dwType, dwValue, dwSize, settings->glyphCache[8].cacheMaximumCellSize); REG_QUERY_DWORD_VALUE(hKey, _T("Cache8MaxCellSize"), dwType, dwValue, dwSize, settings->GlyphCache[8].cacheMaximumCellSize);
REG_QUERY_DWORD_VALUE(hKey, _T("Cache9NumEntries"), dwType, dwValue, dwSize, settings->glyphCache[9].cacheEntries); REG_QUERY_DWORD_VALUE(hKey, _T("Cache9NumEntries"), dwType, dwValue, dwSize, settings->GlyphCache[9].cacheEntries);
REG_QUERY_DWORD_VALUE(hKey, _T("Cache9MaxCellSize"), dwType, dwValue, dwSize, settings->glyphCache[9].cacheMaximumCellSize); REG_QUERY_DWORD_VALUE(hKey, _T("Cache9MaxCellSize"), dwType, dwValue, dwSize, settings->GlyphCache[9].cacheMaximumCellSize);
REG_QUERY_DWORD_VALUE(hKey, _T("FragCacheNumEntries"), dwType, dwValue, dwSize, settings->fragCache->cacheEntries); REG_QUERY_DWORD_VALUE(hKey, _T("FragCacheNumEntries"), dwType, dwValue, dwSize, settings->FragCache->cacheEntries);
REG_QUERY_DWORD_VALUE(hKey, _T("FragCacheMaxCellSize"), dwType, dwValue, dwSize, settings->fragCache->cacheMaximumCellSize); REG_QUERY_DWORD_VALUE(hKey, _T("FragCacheMaxCellSize"), dwType, dwValue, dwSize, settings->FragCache->cacheMaximumCellSize);
RegCloseKey(hKey); RegCloseKey(hKey);
} }
@ -153,9 +153,9 @@ void settings_client_load_hkey_local_machine(rdpSettings* settings)
if (status == ERROR_SUCCESS) if (status == ERROR_SUCCESS)
{ {
REG_QUERY_BOOL_VALUE(hKey, _T("LargePointer"), dwType, dwValue, dwSize, settings->large_pointer); REG_QUERY_BOOL_VALUE(hKey, _T("LargePointer"), dwType, dwValue, dwSize, settings->LargePointer);
REG_QUERY_BOOL_VALUE(hKey, _T("ColorPointer"), dwType, dwValue, dwSize, settings->color_pointer); REG_QUERY_BOOL_VALUE(hKey, _T("ColorPointer"), dwType, dwValue, dwSize, settings->ColorPointer);
REG_QUERY_DWORD_VALUE(hKey, _T("PointerCacheSize"), dwType, dwValue, dwSize, settings->pointer_cache_size); REG_QUERY_DWORD_VALUE(hKey, _T("PointerCacheSize"), dwType, dwValue, dwSize, settings->PointerCacheSize);
RegCloseKey(hKey); RegCloseKey(hKey);
} }
@ -195,8 +195,8 @@ void settings_get_computer_name(rdpSettings* settings)
DWORD nSize = 0; DWORD nSize = 0;
GetComputerNameExA(ComputerNameNetBIOS, NULL, &nSize); GetComputerNameExA(ComputerNameNetBIOS, NULL, &nSize);
settings->computer_name = (char*) malloc(nSize); settings->ComputerName = (char*) malloc(nSize);
GetComputerNameExA(ComputerNameNetBIOS, settings->computer_name, &nSize); GetComputerNameExA(ComputerNameNetBIOS, settings->ComputerName, &nSize);
} }
rdpSettings* settings_new(void* instance) rdpSettings* settings_new(void* instance)
@ -229,24 +229,24 @@ rdpSettings* settings_new(void* instance)
settings->TlsSecurity = TRUE; settings->TlsSecurity = TRUE;
settings->RdpSecurity = TRUE; settings->RdpSecurity = TRUE;
settings->NegotiateSecurityLayer = TRUE; settings->NegotiateSecurityLayer = TRUE;
settings->mstsc_cookie_mode = FALSE; settings->MstscCookieMode = FALSE;
settings->cookie_max_length = DEFAULT_COOKIE_MAX_LENGTH; settings->CookieMaxLength = DEFAULT_COOKIE_MAX_LENGTH;
settings->ClientBuild = 2600; settings->ClientBuild = 2600;
settings->KeyboardType = 4; /* @msdn{cc240510} 'IBM enhanced (101- or 102-key) keyboard' */ settings->KeyboardType = 4; /* @msdn{cc240510} 'IBM enhanced (101- or 102-key) keyboard' */
settings->KeyboardSubType = 0; settings->KeyboardSubType = 0;
settings->KeyboardFunctionKey = 12; settings->KeyboardFunctionKey = 12;
settings->KeyboardLayout = 0; settings->KeyboardLayout = 0;
settings->encryption = FALSE; settings->Encryption = FALSE;
settings->salted_checksum = TRUE; settings->SaltedChecksum = TRUE;
settings->port = 3389; settings->ServerPort = 3389;
settings->desktop_resize = TRUE; settings->DesktopResize = TRUE;
settings->performance_flags = settings->PerformanceFlags =
PERF_DISABLE_FULLWINDOWDRAG | PERF_DISABLE_FULLWINDOWDRAG |
PERF_DISABLE_MENUANIMATIONS | PERF_DISABLE_MENUANIMATIONS |
PERF_DISABLE_WALLPAPER; PERF_DISABLE_WALLPAPER;
settings->auto_reconnection = TRUE; settings->AutoReconnectionEnabled = TRUE;
settings->EncryptionMethod = ENCRYPTION_METHOD_NONE; settings->EncryptionMethod = ENCRYPTION_METHOD_NONE;
settings->EncryptionLevel = ENCRYPTION_LEVEL_NONE; settings->EncryptionLevel = ENCRYPTION_LEVEL_NONE;
@ -257,132 +257,132 @@ rdpSettings* settings_new(void* instance)
settings_get_computer_name(settings); settings_get_computer_name(settings);
settings->received_caps = malloc(32); settings->ReceivedCapabilities = malloc(32);
settings->order_support = malloc(32); settings->OrderSupport = malloc(32);
ZeroMemory(settings->received_caps, 32); ZeroMemory(settings->ReceivedCapabilities, 32);
ZeroMemory(settings->order_support, 32); ZeroMemory(settings->OrderSupport, 32);
settings->order_support[NEG_DSTBLT_INDEX] = TRUE; settings->OrderSupport[NEG_DSTBLT_INDEX] = TRUE;
settings->order_support[NEG_PATBLT_INDEX] = TRUE; settings->OrderSupport[NEG_PATBLT_INDEX] = TRUE;
settings->order_support[NEG_SCRBLT_INDEX] = TRUE; settings->OrderSupport[NEG_SCRBLT_INDEX] = TRUE;
settings->order_support[NEG_OPAQUE_RECT_INDEX] = TRUE; settings->OrderSupport[NEG_OPAQUE_RECT_INDEX] = TRUE;
settings->order_support[NEG_DRAWNINEGRID_INDEX] = TRUE; settings->OrderSupport[NEG_DRAWNINEGRID_INDEX] = TRUE;
settings->order_support[NEG_MULTIDSTBLT_INDEX] = TRUE; settings->OrderSupport[NEG_MULTIDSTBLT_INDEX] = TRUE;
settings->order_support[NEG_MULTIPATBLT_INDEX] = TRUE; settings->OrderSupport[NEG_MULTIPATBLT_INDEX] = TRUE;
settings->order_support[NEG_MULTISCRBLT_INDEX] = TRUE; settings->OrderSupport[NEG_MULTISCRBLT_INDEX] = TRUE;
settings->order_support[NEG_MULTIOPAQUERECT_INDEX] = TRUE; settings->OrderSupport[NEG_MULTIOPAQUERECT_INDEX] = TRUE;
settings->order_support[NEG_MULTI_DRAWNINEGRID_INDEX] = TRUE; settings->OrderSupport[NEG_MULTI_DRAWNINEGRID_INDEX] = TRUE;
settings->order_support[NEG_LINETO_INDEX] = TRUE; settings->OrderSupport[NEG_LINETO_INDEX] = TRUE;
settings->order_support[NEG_POLYLINE_INDEX] = TRUE; settings->OrderSupport[NEG_POLYLINE_INDEX] = TRUE;
settings->order_support[NEG_MEMBLT_INDEX] = TRUE; settings->OrderSupport[NEG_MEMBLT_INDEX] = TRUE;
settings->order_support[NEG_MEM3BLT_INDEX] = TRUE; settings->OrderSupport[NEG_MEM3BLT_INDEX] = TRUE;
settings->order_support[NEG_SAVEBITMAP_INDEX] = TRUE; settings->OrderSupport[NEG_SAVEBITMAP_INDEX] = TRUE;
settings->order_support[NEG_GLYPH_INDEX_INDEX] = TRUE; settings->OrderSupport[NEG_GLYPH_INDEX_INDEX] = TRUE;
settings->order_support[NEG_FAST_INDEX_INDEX] = TRUE; settings->OrderSupport[NEG_FAST_INDEX_INDEX] = TRUE;
settings->order_support[NEG_FAST_GLYPH_INDEX] = TRUE; settings->OrderSupport[NEG_FAST_GLYPH_INDEX] = TRUE;
settings->order_support[NEG_POLYGON_SC_INDEX] = TRUE; settings->OrderSupport[NEG_POLYGON_SC_INDEX] = TRUE;
settings->order_support[NEG_POLYGON_CB_INDEX] = TRUE; settings->OrderSupport[NEG_POLYGON_CB_INDEX] = TRUE;
settings->order_support[NEG_ELLIPSE_SC_INDEX] = TRUE; settings->OrderSupport[NEG_ELLIPSE_SC_INDEX] = TRUE;
settings->order_support[NEG_ELLIPSE_CB_INDEX] = TRUE; settings->OrderSupport[NEG_ELLIPSE_CB_INDEX] = TRUE;
settings->client_hostname = malloc(32); settings->ClientHostname = malloc(32);
settings->client_product_id = malloc(32); settings->ClientProductId = malloc(32);
ZeroMemory(settings->client_hostname, 32); ZeroMemory(settings->ClientHostname, 32);
ZeroMemory(settings->client_product_id, 32); ZeroMemory(settings->ClientProductId, 32);
settings->color_pointer = TRUE; settings->ColorPointer = TRUE;
settings->large_pointer = TRUE; settings->LargePointer = TRUE;
settings->pointer_cache_size = 20; settings->PointerCacheSize = 20;
settings->sound_beeps = TRUE; settings->SoundBeepsEnabled = TRUE;
settings->disable_wallpaper = FALSE; settings->DisableWallpaper = FALSE;
settings->disable_full_window_drag = FALSE; settings->DisableFullWindowDrag = FALSE;
settings->disable_menu_animations = FALSE; settings->DisableMenuAnims = FALSE;
settings->disable_theming = FALSE; settings->DisableThemes = FALSE;
settings->ConnectionType = 0; settings->ConnectionType = 0;
settings->draw_gdi_plus = FALSE; settings->DrawGdiPlusEnabled = FALSE;
settings->frame_marker = FALSE; settings->FrameMarkerEnabled = FALSE;
settings->bitmap_cache_v3 = FALSE; settings->BitmapCacheV3Enabled = FALSE;
settings->bitmap_cache = TRUE; settings->BitmapCacheEnabled = TRUE;
settings->persistent_bitmap_cache = FALSE; settings->BitmapCachePersistEnabled = FALSE;
settings->allow_cache_waiting_list = TRUE; settings->AllowCacheWaitingList = TRUE;
settings->bitmapCacheV2NumCells = 5; settings->BitmapCacheV2NumCells = 5;
settings->bitmapCacheV2CellInfo = (BITMAP_CACHE_V2_CELL_INFO*) malloc(sizeof(BITMAP_CACHE_V2_CELL_INFO) * 6); settings->BitmapCacheV2CellInfo = (BITMAP_CACHE_V2_CELL_INFO*) malloc(sizeof(BITMAP_CACHE_V2_CELL_INFO) * 6);
settings->bitmapCacheV2CellInfo[0].numEntries = 600; settings->BitmapCacheV2CellInfo[0].numEntries = 600;
settings->bitmapCacheV2CellInfo[0].persistent = FALSE; settings->BitmapCacheV2CellInfo[0].persistent = FALSE;
settings->bitmapCacheV2CellInfo[1].numEntries = 600; settings->BitmapCacheV2CellInfo[1].numEntries = 600;
settings->bitmapCacheV2CellInfo[1].persistent = FALSE; settings->BitmapCacheV2CellInfo[1].persistent = FALSE;
settings->bitmapCacheV2CellInfo[2].numEntries = 2048; settings->BitmapCacheV2CellInfo[2].numEntries = 2048;
settings->bitmapCacheV2CellInfo[2].persistent = FALSE; settings->BitmapCacheV2CellInfo[2].persistent = FALSE;
settings->bitmapCacheV2CellInfo[3].numEntries = 4096; settings->BitmapCacheV2CellInfo[3].numEntries = 4096;
settings->bitmapCacheV2CellInfo[3].persistent = FALSE; settings->BitmapCacheV2CellInfo[3].persistent = FALSE;
settings->bitmapCacheV2CellInfo[4].numEntries = 2048; settings->BitmapCacheV2CellInfo[4].numEntries = 2048;
settings->bitmapCacheV2CellInfo[4].persistent = FALSE; settings->BitmapCacheV2CellInfo[4].persistent = FALSE;
settings->refresh_rect = TRUE; settings->RefreshRect = TRUE;
settings->suppress_output = TRUE; settings->SuppressOutput = TRUE;
settings->glyphSupportLevel = GLYPH_SUPPORT_FULL; settings->GlyphSupportLevel = GLYPH_SUPPORT_FULL;
settings->glyphCache = malloc(sizeof(GLYPH_CACHE_DEFINITION) * 10); settings->GlyphCache = malloc(sizeof(GLYPH_CACHE_DEFINITION) * 10);
settings->fragCache = malloc(sizeof(GLYPH_CACHE_DEFINITION)); settings->FragCache = malloc(sizeof(GLYPH_CACHE_DEFINITION));
settings->glyphCache[0].cacheEntries = 254; settings->GlyphCache[0].cacheEntries = 254;
settings->glyphCache[0].cacheMaximumCellSize = 4; settings->GlyphCache[0].cacheMaximumCellSize = 4;
settings->glyphCache[1].cacheEntries = 254; settings->GlyphCache[1].cacheEntries = 254;
settings->glyphCache[1].cacheMaximumCellSize = 4; settings->GlyphCache[1].cacheMaximumCellSize = 4;
settings->glyphCache[2].cacheEntries = 254; settings->GlyphCache[2].cacheEntries = 254;
settings->glyphCache[2].cacheMaximumCellSize = 8; settings->GlyphCache[2].cacheMaximumCellSize = 8;
settings->glyphCache[3].cacheEntries = 254; settings->GlyphCache[3].cacheEntries = 254;
settings->glyphCache[3].cacheMaximumCellSize = 8; settings->GlyphCache[3].cacheMaximumCellSize = 8;
settings->glyphCache[4].cacheEntries = 254; settings->GlyphCache[4].cacheEntries = 254;
settings->glyphCache[4].cacheMaximumCellSize = 16; settings->GlyphCache[4].cacheMaximumCellSize = 16;
settings->glyphCache[5].cacheEntries = 254; settings->GlyphCache[5].cacheEntries = 254;
settings->glyphCache[5].cacheMaximumCellSize = 32; settings->GlyphCache[5].cacheMaximumCellSize = 32;
settings->glyphCache[6].cacheEntries = 254; settings->GlyphCache[6].cacheEntries = 254;
settings->glyphCache[6].cacheMaximumCellSize = 64; settings->GlyphCache[6].cacheMaximumCellSize = 64;
settings->glyphCache[7].cacheEntries = 254; settings->GlyphCache[7].cacheEntries = 254;
settings->glyphCache[7].cacheMaximumCellSize = 128; settings->GlyphCache[7].cacheMaximumCellSize = 128;
settings->glyphCache[8].cacheEntries = 254; settings->GlyphCache[8].cacheEntries = 254;
settings->glyphCache[8].cacheMaximumCellSize = 256; settings->GlyphCache[8].cacheMaximumCellSize = 256;
settings->glyphCache[9].cacheEntries = 64; settings->GlyphCache[9].cacheEntries = 64;
settings->glyphCache[9].cacheMaximumCellSize = 256; settings->GlyphCache[9].cacheMaximumCellSize = 256;
settings->fragCache->cacheEntries = 256; settings->FragCache->cacheEntries = 256;
settings->fragCache->cacheMaximumCellSize = 256; settings->FragCache->cacheMaximumCellSize = 256;
settings->offscreen_bitmap_cache = TRUE; settings->OffscreenBitmapCacheEnabled = TRUE;
settings->offscreen_bitmap_cache_size = 7680; settings->OffscreenBitmapCacheSize = 7680;
settings->offscreen_bitmap_cache_entries = 2000; settings->OffscreenBitmapCacheEntries = 2000;
settings->draw_nine_grid_cache_size = 2560; settings->DrawNineGridCacheSize = 2560;
settings->draw_nine_grid_cache_entries = 256; settings->DrawNineGridCacheEntries = 256;
settings->client_dir = _strdup(client_dll); settings->client_dir = _strdup(client_dll);
settings->num_icon_caches = 3; settings->RemoteAppNumIconCaches = 3;
settings->num_icon_cache_entries = 12; settings->RemoteAppNumIconCacheEntries = 12;
settings->vc_chunk_size = CHANNEL_CHUNK_LENGTH; settings->VirtualChannelChunkSize = CHANNEL_CHUNK_LENGTH;
settings->multifrag_max_request_size = 0x200000; settings->MultifragMaxRequestSize = 0x200000;
settings->fastpath_input = TRUE; settings->FastpathInput = TRUE;
settings->fastpath_output = TRUE; settings->FastpathOutput = TRUE;
settings->frame_acknowledge = 2; settings->FrameAcknowledge = 2;
gethostname(settings->client_hostname, 31); gethostname(settings->ClientHostname, 31);
settings->client_hostname[31] = 0; settings->ClientHostname[31] = 0;
settings->mouse_motion = TRUE; settings->mouse_motion = TRUE;
settings->client_auto_reconnect_cookie = (ARC_CS_PRIVATE_PACKET*) malloc(sizeof(ARC_CS_PRIVATE_PACKET)); settings->ClientAutoReconnectCookie = (ARC_CS_PRIVATE_PACKET*) malloc(sizeof(ARC_CS_PRIVATE_PACKET));
settings->server_auto_reconnect_cookie = (ARC_SC_PRIVATE_PACKET*) malloc(sizeof(ARC_SC_PRIVATE_PACKET)); settings->ServerAutoReconnectCookie = (ARC_SC_PRIVATE_PACKET*) malloc(sizeof(ARC_SC_PRIVATE_PACKET));
ZeroMemory(settings->client_auto_reconnect_cookie, sizeof(ARC_CS_PRIVATE_PACKET)); ZeroMemory(settings->ClientAutoReconnectCookie, sizeof(ARC_CS_PRIVATE_PACKET));
ZeroMemory(settings->server_auto_reconnect_cookie, sizeof(ARC_SC_PRIVATE_PACKET)); ZeroMemory(settings->ServerAutoReconnectCookie, sizeof(ARC_SC_PRIVATE_PACKET));
settings->client_time_zone = (TIME_ZONE_INFO*) malloc(sizeof(TIME_ZONE_INFO)); settings->ClientTimeZone = (TIME_ZONE_INFO*) malloc(sizeof(TIME_ZONE_INFO));
ZeroMemory(settings->client_time_zone, sizeof(TIME_ZONE_INFO)); ZeroMemory(settings->ClientTimeZone, sizeof(TIME_ZONE_INFO));
freerdp_detect_paths(settings); freerdp_detect_paths(settings);
@ -396,31 +396,31 @@ void settings_free(rdpSettings* settings)
{ {
if (settings != NULL) if (settings != NULL)
{ {
free(settings->hostname); free(settings->Hostname);
free(settings->username); free(settings->Username);
free(settings->password); free(settings->Password);
free(settings->domain); free(settings->Domain);
free(settings->shell); free(settings->AlternateShell);
free(settings->directory); free(settings->ShellWorkingDirectory);
free(settings->ip_address); free(settings->ip_address);
free(settings->client_dir); free(settings->client_dir);
free(settings->cert_file); free(settings->CertificateFile);
free(settings->privatekey_file); free(settings->PrivateKeyFile);
free(settings->received_caps); free(settings->ReceivedCapabilities);
free(settings->order_support); free(settings->OrderSupport);
free(settings->client_hostname); free(settings->ClientHostname);
free(settings->client_product_id); free(settings->ClientProductId);
free(settings->server_random); free(settings->ServerRandom);
free(settings->server_certificate); free(settings->ServerCertificate);
free(settings->rdp_key_file); free(settings->RdpKeyFile);
certificate_free(settings->server_cert); certificate_free(settings->ServerCert);
free(settings->client_auto_reconnect_cookie); free(settings->ClientAutoReconnectCookie);
free(settings->server_auto_reconnect_cookie); free(settings->ServerAutoReconnectCookie);
free(settings->client_time_zone); free(settings->ClientTimeZone);
free(settings->bitmapCacheV2CellInfo); free(settings->BitmapCacheV2CellInfo);
free(settings->glyphCache); free(settings->GlyphCache);
free(settings->fragCache); free(settings->FragCache);
key_free(settings->server_key); key_free(settings->ServerKey);
free(settings->config_path); free(settings->config_path);
free(settings->current_path); free(settings->current_path);
free(settings->development_path); free(settings->development_path);

View File

@ -68,7 +68,7 @@ static int update_recv_surfcmd_frame_marker(rdpUpdate* update, STREAM* s)
IFCALL(update->SurfaceFrameMarker, update->context, marker); IFCALL(update->SurfaceFrameMarker, update->context, marker);
if (update->context->rdp->settings->received_caps[CAPSET_TYPE_FRAME_ACKNOWLEDGE] && update->context->rdp->settings->frame_acknowledge > 0 && marker->frameAction == SURFACECMD_FRAMEACTION_END) if (update->context->rdp->settings->ReceivedCapabilities[CAPSET_TYPE_FRAME_ACKNOWLEDGE] && update->context->rdp->settings->FrameAcknowledge > 0 && marker->frameAction == SURFACECMD_FRAMEACTION_END)
{ {
update_send_frame_acknowledge(update->context->rdp, marker->frameId); update_send_frame_acknowledge(update->context->rdp, marker->frameId);
} }

View File

@ -80,7 +80,7 @@ void tcp_get_ip_address(rdpTcp * tcp)
tcp->ip_address[sizeof(tcp->ip_address) - 1] = 0; tcp->ip_address[sizeof(tcp->ip_address) - 1] = 0;
tcp->settings->ipv6 = 0; tcp->settings->IPv6 = 0;
tcp->settings->ip_address = _strdup(tcp->ip_address); tcp->settings->ip_address = _strdup(tcp->ip_address);
} }

View File

@ -82,7 +82,7 @@ BOOL rdp_read_client_time_zone(STREAM* s, rdpSettings* settings)
if (stream_get_left(s) < 172) if (stream_get_left(s) < 172)
return FALSE; return FALSE;
clientTimeZone = settings->client_time_zone; clientTimeZone = settings->ClientTimeZone;
stream_read_UINT32(s, clientTimeZone->bias); /* Bias */ stream_read_UINT32(s, clientTimeZone->bias); /* Bias */
@ -125,7 +125,7 @@ void rdp_write_client_time_zone(STREAM* s, rdpSettings* settings)
int daylightNameLength; int daylightNameLength;
TIME_ZONE_INFO* clientTimeZone; TIME_ZONE_INFO* clientTimeZone;
clientTimeZone = settings->client_time_zone; clientTimeZone = settings->ClientTimeZone;
freerdp_time_zone_detect(clientTimeZone); freerdp_time_zone_detect(clientTimeZone);
standardNameLength = freerdp_AsciiToUnicodeAlloc(clientTimeZone->standardName, &standardName, 0) * 2; standardNameLength = freerdp_AsciiToUnicodeAlloc(clientTimeZone->standardName, &standardName, 0) * 2;

View File

@ -189,15 +189,15 @@ BOOL transport_connect(rdpTransport* transport, const char* hostname, UINT16 por
BOOL status = FALSE; BOOL status = FALSE;
rdpSettings* settings = transport->settings; rdpSettings* settings = transport->settings;
if (transport->settings->ts_gateway) if (transport->settings->GatewayUsageMethod)
{ {
transport->layer = TRANSPORT_LAYER_TSG; transport->layer = TRANSPORT_LAYER_TSG;
transport->tcp_out = tcp_new(settings); transport->tcp_out = tcp_new(settings);
status = tcp_connect(transport->tcp_in, settings->tsg_hostname, 443); status = tcp_connect(transport->tcp_in, settings->GatewayHostname, 443);
if (status) if (status)
status = tcp_connect(transport->tcp_out, settings->tsg_hostname, 443); status = tcp_connect(transport->tcp_out, settings->GatewayHostname, 443);
if (status) if (status)
status = transport_tsg_connect(transport, hostname, port); status = transport_tsg_connect(transport, hostname, port);
@ -225,7 +225,7 @@ BOOL transport_accept_tls(rdpTransport* transport)
transport->layer = TRANSPORT_LAYER_TLS; transport->layer = TRANSPORT_LAYER_TLS;
transport->tls->sockfd = transport->tcp->sockfd; transport->tls->sockfd = transport->tcp->sockfd;
if (tls_accept(transport->tls, transport->settings->cert_file, transport->settings->privatekey_file) != TRUE) if (tls_accept(transport->tls, transport->settings->CertificateFile, transport->settings->PrivateKeyFile) != TRUE)
return FALSE; return FALSE;
return TRUE; return TRUE;
@ -242,7 +242,7 @@ BOOL transport_accept_nla(rdpTransport* transport)
transport->layer = TRANSPORT_LAYER_TLS; transport->layer = TRANSPORT_LAYER_TLS;
transport->tls->sockfd = transport->tcp->sockfd; transport->tls->sockfd = transport->tcp->sockfd;
if (tls_accept(transport->tls, transport->settings->cert_file, transport->settings->privatekey_file) != TRUE) if (tls_accept(transport->tls, transport->settings->CertificateFile, transport->settings->PrivateKeyFile) != TRUE)
return FALSE; return FALSE;
/* Network Level Authentication */ /* Network Level Authentication */

View File

@ -518,7 +518,7 @@ BOOL tsg_connect(rdpTsg* tsg, const char* hostname, UINT16 port)
tsg->Port = port; tsg->Port = port;
freerdp_AsciiToUnicodeAlloc(hostname, &tsg->Hostname, 0); freerdp_AsciiToUnicodeAlloc(hostname, &tsg->Hostname, 0);
freerdp_AsciiToUnicodeAlloc(settings->computer_name, &tsg->MachineName, 0); freerdp_AsciiToUnicodeAlloc(settings->ComputerName, &tsg->MachineName, 0);
if (!rpc_connect(rpc)) if (!rpc_connect(rpc))
{ {

View File

@ -369,7 +369,7 @@ static void update_send_refresh_rect(rdpContext* context, BYTE count, RECTANGLE_
STREAM* s; STREAM* s;
rdpRdp* rdp = context->rdp; rdpRdp* rdp = context->rdp;
if (rdp->settings->refresh_rect) if (rdp->settings->RefreshRect)
{ {
s = rdp_data_pdu_init(rdp); s = rdp_data_pdu_init(rdp);
update_write_refresh_rect(s, count, areas); update_write_refresh_rect(s, count, areas);
@ -397,7 +397,7 @@ static void update_send_suppress_output(rdpContext* context, BYTE allow, RECTANG
STREAM* s; STREAM* s;
rdpRdp* rdp = context->rdp; rdpRdp* rdp = context->rdp;
if (rdp->settings->suppress_output) if (rdp->settings->SuppressOutput)
{ {
s = rdp_data_pdu_init(rdp); s = rdp_data_pdu_init(rdp);
update_write_suppress_output(s, allow, area); update_write_suppress_output(s, allow, area);

View File

@ -115,18 +115,18 @@ int credssp_ntlm_client_init(rdpCredssp* credssp)
settings = credssp->settings; settings = credssp->settings;
instance = (freerdp*) settings->instance; instance = (freerdp*) settings->instance;
if ((settings->password == NULL) || (settings->username == NULL)) if ((settings->Password == NULL) || (settings->Username == NULL))
{ {
if (instance->Authenticate) if (instance->Authenticate)
{ {
BOOL proceed = instance->Authenticate(instance, BOOL proceed = instance->Authenticate(instance,
&settings->username, &settings->password, &settings->domain); &settings->Username, &settings->Password, &settings->Domain);
if (!proceed) if (!proceed)
return 0; return 0;
} }
} }
sspi_SetAuthIdentity(&(credssp->identity), settings->username, settings->domain, settings->password); sspi_SetAuthIdentity(&(credssp->identity), settings->Username, settings->Domain, settings->Password);
#ifdef WITH_DEBUG_NLA #ifdef WITH_DEBUG_NLA
_tprintf(_T("User: %s Domain: %s Password: %s\n"), _tprintf(_T("User: %s Domain: %s Password: %s\n"),
@ -136,10 +136,10 @@ int credssp_ntlm_client_init(rdpCredssp* credssp)
sspi_SecBufferAlloc(&credssp->PublicKey, credssp->tls->PublicKeyLength); sspi_SecBufferAlloc(&credssp->PublicKey, credssp->tls->PublicKeyLength);
CopyMemory(credssp->PublicKey.pvBuffer, credssp->tls->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->Hostname);
spn = (SEC_CHAR*) malloc(length + 1); spn = (SEC_CHAR*) malloc(length + 1);
sprintf(spn, "%s%s", TERMSRV_SPN_PREFIX, settings->hostname); sprintf(spn, "%s%s", TERMSRV_SPN_PREFIX, settings->Hostname);
#ifdef UNICODE #ifdef UNICODE
credssp->ServicePrincipalName = (LPTSTR) malloc(length * 2 + 2); credssp->ServicePrincipalName = (LPTSTR) malloc(length * 2 + 2);

View File

@ -140,7 +140,7 @@ BOOL tls_connect(rdpTls* tls)
return FALSE; return FALSE;
} }
if (!tls_verify_certificate(tls, cert, tls->settings->hostname)) if (!tls_verify_certificate(tls, cert, tls->settings->Hostname))
{ {
printf("tls_connect: certificate not trusted, aborting.\n"); printf("tls_connect: certificate not trusted, aborting.\n");
tls_disconnect(tls); tls_disconnect(tls);
@ -428,12 +428,12 @@ BOOL tls_verify_certificate(rdpTls* tls, CryptoCert cert, char* hostname)
rdpCertificateData* certificate_data; rdpCertificateData* certificate_data;
/* ignore certificate verification if user explicitly required it (discouraged) */ /* ignore certificate verification if user explicitly required it (discouraged) */
if (tls->settings->ignore_certificate) if (tls->settings->IgnoreCertificate)
return TRUE; /* success! */ return TRUE; /* success! */
/* if user explicitly specified a certificate name, use it instead of the hostname */ /* if user explicitly specified a certificate name, use it instead of the hostname */
if (tls->settings->certificate_name) if (tls->settings->CertificateName)
hostname = tls->settings->certificate_name; hostname = tls->settings->CertificateName;
/* attempt verification using OpenSSL and the ~/.freerdp/certs certificate store */ /* attempt verification using OpenSSL and the ~/.freerdp/certs certificate store */
certificate_status = x509_verify_certificate(cert, tls->certificate_store->path); certificate_status = x509_verify_certificate(cert, tls->certificate_store->path);

View File

@ -83,8 +83,8 @@ rdpIconCache* icon_cache_new(rdpRail* rail)
int i; int i;
cache->rail = rail; cache->rail = rail;
cache->numCaches = (BYTE) rail->settings->num_icon_cache_entries; cache->numCaches = (BYTE) rail->settings->RemoteAppNumIconCacheEntries;
cache->numCacheEntries = rail->settings->num_icon_cache_entries; cache->numCacheEntries = rail->settings->RemoteAppNumIconCacheEntries;
cache->caches = xzalloc(cache->numCaches * sizeof(WINDOW_ICON_CACHE)); cache->caches = xzalloc(cache->numCaches * sizeof(WINDOW_ICON_CACHE));

View File

@ -53,25 +53,25 @@ void freerdp_parse_hostname(rdpSettings* settings, char* hostname)
&& (p[1] == 0 || (p[1] == ':' && !strchr(p + 2, ':')))) && (p[1] == 0 || (p[1] == ':' && !strchr(p + 2, ':'))))
{ {
/* Either "[...]" or "[...]:..." with at most one : after the brackets */ /* Either "[...]" or "[...]:..." with at most one : after the brackets */
settings->hostname = _strdup(hostname + 1); settings->Hostname = _strdup(hostname + 1);
if ((p = strchr((char*)settings->hostname, ']'))) if ((p = strchr((char*)settings->Hostname, ']')))
{ {
*p = 0; *p = 0;
if (p[1] == ':') if (p[1] == ':')
settings->port = atoi(p + 2); settings->ServerPort = atoi(p + 2);
} }
} }
else else
{ {
/* Port number is cut off and used if exactly one : in the string */ /* Port number is cut off and used if exactly one : in the string */
settings->hostname = _strdup(hostname); settings->Hostname = _strdup(hostname);
if ((p = strchr((char*)settings->hostname, ':')) && !strchr(p + 1, ':')) if ((p = strchr((char*)settings->Hostname, ':')) && !strchr(p + 1, ':'))
{ {
*p = 0; *p = 0;
settings->port = atoi(p + 1); settings->ServerPort = atoi(p + 1);
} }
} }
} }
@ -109,7 +109,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
if (p) if (p)
{ {
settings->connection_file = _strdup(argv[index]); settings->ConnectionFile = _strdup(argv[index]);
index++; index++;
continue; continue;
} }
@ -202,7 +202,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
printf("missing username\n"); printf("missing username\n");
return FREERDP_ARGS_PARSE_FAILURE; return FREERDP_ARGS_PARSE_FAILURE;
} }
settings->username = _strdup(argv[index]); settings->Username = _strdup(argv[index]);
} }
else if (strcmp("-p", argv[index]) == 0) else if (strcmp("-p", argv[index]) == 0)
{ {
@ -212,7 +212,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
printf("missing password\n"); printf("missing password\n");
return FREERDP_ARGS_PARSE_FAILURE; return FREERDP_ARGS_PARSE_FAILURE;
} }
settings->password = _strdup(argv[index]); settings->Password = _strdup(argv[index]);
settings->autologon = 1; settings->autologon = 1;
/* /*
@ -230,7 +230,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
printf("missing domain\n"); printf("missing domain\n");
return FREERDP_ARGS_PARSE_FAILURE; return FREERDP_ARGS_PARSE_FAILURE;
} }
settings->domain = _strdup(argv[index]); settings->Domain = _strdup(argv[index]);
} }
else if (strcmp("-s", argv[index]) == 0) else if (strcmp("-s", argv[index]) == 0)
{ {
@ -240,7 +240,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
printf("missing shell\n"); printf("missing shell\n");
return FREERDP_ARGS_PARSE_FAILURE; return FREERDP_ARGS_PARSE_FAILURE;
} }
settings->shell = _strdup(argv[index]); settings->AlternateShell = _strdup(argv[index]);
} }
else if (strcmp("-c", argv[index]) == 0) else if (strcmp("-c", argv[index]) == 0)
{ {
@ -250,7 +250,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
printf("missing directory\n"); printf("missing directory\n");
return FREERDP_ARGS_PARSE_FAILURE; return FREERDP_ARGS_PARSE_FAILURE;
} }
settings->directory = _strdup(argv[index]); settings->ShellWorkingDirectory = _strdup(argv[index]);
} }
else if (strcmp("-g", argv[index]) == 0) else if (strcmp("-g", argv[index]) == 0)
{ {
@ -317,7 +317,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
printf("missing port number\n"); printf("missing port number\n");
return FREERDP_ARGS_PARSE_FAILURE; return FREERDP_ARGS_PARSE_FAILURE;
} }
settings->port = atoi(argv[index]); settings->ServerPort = atoi(argv[index]);
} }
else if (strcmp("-k", argv[index]) == 0) else if (strcmp("-k", argv[index]) == 0)
{ {
@ -341,16 +341,16 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
printf("missing client hostname\n"); printf("missing client hostname\n");
return FREERDP_ARGS_PARSE_FAILURE; return FREERDP_ARGS_PARSE_FAILURE;
} }
strncpy(settings->client_hostname, argv[index], 31); strncpy(settings->ClientHostname, argv[index], 31);
settings->client_hostname[31] = 0; settings->ClientHostname[31] = 0;
} }
else if (strcmp("-o", argv[index]) == 0) else if (strcmp("-o", argv[index]) == 0)
{ {
settings->console_audio = TRUE; settings->ConsoleAudio = TRUE;
} }
else if (strcmp("-0", argv[index]) == 0) else if (strcmp("-0", argv[index]) == 0)
{ {
settings->console_session = TRUE; settings->ConsoleSession = TRUE;
} }
else if (strcmp("-z", argv[index]) == 0) else if (strcmp("-z", argv[index]) == 0)
{ {
@ -358,15 +358,15 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
} }
else if (strcmp("--no-glyph-cache", argv[index]) == 0) else if (strcmp("--no-glyph-cache", argv[index]) == 0)
{ {
settings->glyphSupportLevel = GLYPH_SUPPORT_NONE; settings->GlyphSupportLevel = GLYPH_SUPPORT_NONE;
} }
else if (strcmp("--no-osb", argv[index]) == 0) else if (strcmp("--no-osb", argv[index]) == 0)
{ {
settings->offscreen_bitmap_cache = FALSE; settings->OffscreenBitmapCacheEnabled = FALSE;
} }
else if (strcmp("--no-bmp-cache", argv[index]) == 0) else if (strcmp("--no-bmp-cache", argv[index]) == 0)
{ {
settings->bitmap_cache = FALSE; settings->BitmapCacheEnabled = FALSE;
} }
else if (strcmp("--no-auth", argv[index]) == 0) else if (strcmp("--no-auth", argv[index]) == 0)
{ {
@ -382,7 +382,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
} }
else if (strcmp("--ignore-certificate", argv[index]) == 0) else if (strcmp("--ignore-certificate", argv[index]) == 0)
{ {
settings->ignore_certificate = TRUE; settings->IgnoreCertificate = TRUE;
} }
else if (strcmp("--certificate-name", argv[index]) == 0) else if (strcmp("--certificate-name", argv[index]) == 0)
{ {
@ -393,12 +393,12 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
return FREERDP_ARGS_PARSE_FAILURE; return FREERDP_ARGS_PARSE_FAILURE;
} }
settings->certificate_name = _strdup(argv[index]); settings->CertificateName = _strdup(argv[index]);
} }
else if (strcmp("--no-fastpath", argv[index]) == 0) else if (strcmp("--no-fastpath", argv[index]) == 0)
{ {
settings->fastpath_input = FALSE; settings->FastpathInput = FALSE;
settings->fastpath_output = FALSE; settings->FastpathOutput = FALSE;
} }
else if (strcmp("--gdi", argv[index]) == 0) else if (strcmp("--gdi", argv[index]) == 0)
{ {
@ -430,24 +430,24 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
printf("missing codec name\n"); printf("missing codec name\n");
return FREERDP_ARGS_PARSE_FAILURE; return FREERDP_ARGS_PARSE_FAILURE;
} }
settings->bitmap_cache_v3 = TRUE; settings->BitmapCacheV3Enabled = TRUE;
if (strcmp("rfx", argv[index]) == 0) if (strcmp("rfx", argv[index]) == 0)
{ {
printf("setting rfx\n"); printf("setting rfx\n");
settings->v3_codec_id = CODEC_ID_REMOTEFX; settings->BitmapCacheV3CodecId = CODEC_ID_REMOTEFX;
settings->rfx_codec = TRUE; settings->RemoteFxCodec = TRUE;
} }
else if (strcmp("nsc", argv[index]) == 0) else if (strcmp("nsc", argv[index]) == 0)
{ {
printf("setting codec nsc\n"); printf("setting codec nsc\n");
settings->v3_codec_id = CODEC_ID_NSCODEC; settings->BitmapCacheV3CodecId = CODEC_ID_NSCODEC;
settings->ns_codec = TRUE; settings->NSCodec = TRUE;
} }
#ifdef WITH_JPEG #ifdef WITH_JPEG
else if (strcmp("jpeg", argv[index]) == 0) else if (strcmp("jpeg", argv[index]) == 0)
{ {
printf("setting codec jpeg\n"); printf("setting codec jpeg\n");
settings->v3_codec_id = CODEC_ID_JPEG; settings->BitmapCacheV3CodecId = CODEC_ID_JPEG;
settings->jpeg_codec = TRUE; settings->jpeg_codec = TRUE;
if (settings->jpeg_quality == 0) if (settings->jpeg_quality == 0)
settings->jpeg_quality = 75; settings->jpeg_quality = 75;
@ -479,11 +479,11 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
#endif #endif
else if (strcmp("--rfx", argv[index]) == 0) else if (strcmp("--rfx", argv[index]) == 0)
{ {
settings->rfx_codec = TRUE; settings->RemoteFxCodec = TRUE;
settings->fastpath_output = TRUE; settings->FastpathOutput = TRUE;
settings->ColorDepth = 32; settings->ColorDepth = 32;
settings->performance_flags = PERF_FLAG_NONE; settings->PerformanceFlags = PERF_FLAG_NONE;
settings->large_pointer = TRUE; settings->LargePointer = TRUE;
} }
else if (strcmp("--rfx-mode", argv[index]) == 0) else if (strcmp("--rfx-mode", argv[index]) == 0)
{ {
@ -495,11 +495,11 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
} }
if (argv[index][0] == 'v') /* video */ if (argv[index][0] == 'v') /* video */
{ {
settings->rfx_codec_mode = 0x00; settings->RemoteFxCodecMode = 0x00;
} }
else if (argv[index][0] == 'i') /* image */ else if (argv[index][0] == 'i') /* image */
{ {
settings->rfx_codec_mode = 0x02; settings->RemoteFxCodecMode = 0x02;
} }
else else
{ {
@ -515,11 +515,11 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
printf("missing frame acknowledge number\n"); printf("missing frame acknowledge number\n");
return FREERDP_ARGS_PARSE_FAILURE; return FREERDP_ARGS_PARSE_FAILURE;
} }
settings->frame_acknowledge = atoi(argv[index]); settings->FrameAcknowledge = atoi(argv[index]);
} }
else if (strcmp("--nsc", argv[index]) == 0) else if (strcmp("--nsc", argv[index]) == 0)
{ {
settings->ns_codec = TRUE; settings->NSCodec = TRUE;
} }
else if (strcmp("--dump-rfx", argv[index]) == 0) else if (strcmp("--dump-rfx", argv[index]) == 0)
{ {
@ -529,9 +529,9 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
printf("missing file name\n"); printf("missing file name\n");
return FREERDP_ARGS_PARSE_FAILURE; return FREERDP_ARGS_PARSE_FAILURE;
} }
settings->dump_rfx_file = _strdup(argv[index]); settings->DumpRemoteFxFile = _strdup(argv[index]);
settings->dump_rfx = TRUE; settings->DumpRemoteFx = TRUE;
settings->rfx_codec_only = TRUE; settings->RemoteFxOnly = TRUE;
} }
else if (strcmp("--play-rfx", argv[index]) == 0) else if (strcmp("--play-rfx", argv[index]) == 0)
{ {
@ -541,32 +541,32 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
printf("missing file name\n"); printf("missing file name\n");
return FREERDP_ARGS_PARSE_FAILURE; return FREERDP_ARGS_PARSE_FAILURE;
} }
settings->play_rfx_file = _strdup(argv[index]); settings->PlayRemoteFxFile = _strdup(argv[index]);
settings->play_rfx = TRUE; settings->PlayRemoteFx = TRUE;
} }
else if (strcmp("--fonts", argv[index]) == 0) else if (strcmp("--fonts", argv[index]) == 0)
{ {
settings->smooth_fonts = TRUE; settings->AllowFontSmoothing = TRUE;
} }
else if (strcmp("--disable-wallpaper", argv[index]) == 0) else if (strcmp("--disable-wallpaper", argv[index]) == 0)
{ {
settings->disable_wallpaper = TRUE; settings->DisableWallpaper = TRUE;
} }
else if (strcmp("--disable-full-window-drag", argv[index]) == 0) else if (strcmp("--disable-full-window-drag", argv[index]) == 0)
{ {
settings->disable_full_window_drag = TRUE; settings->DisableFullWindowDrag = TRUE;
} }
else if (strcmp("--disable-menu-animations", argv[index]) == 0) else if (strcmp("--disable-menu-animations", argv[index]) == 0)
{ {
settings->disable_menu_animations = TRUE; settings->DisableMenuAnims = TRUE;
} }
else if (strcmp("--disable-theming", argv[index]) == 0) else if (strcmp("--disable-theming", argv[index]) == 0)
{ {
settings->disable_theming = TRUE; settings->DisableThemes = TRUE;
} }
else if (strcmp("--composition", argv[index]) == 0) else if (strcmp("--composition", argv[index]) == 0)
{ {
settings->desktop_composition = TRUE; settings->AllowDesktopComposition = TRUE;
} }
else if (strcmp("--no-motion", argv[index]) == 0) else if (strcmp("--no-motion", argv[index]) == 0)
{ {
@ -574,10 +574,10 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
} }
else if (strcmp("--app", argv[index]) == 0) else if (strcmp("--app", argv[index]) == 0)
{ {
settings->remote_app = TRUE; settings->RemoteApplicationMode = TRUE;
settings->rail_langbar_supported = TRUE; settings->RemoteAppLanguageBarSupported = TRUE;
settings->workarea = TRUE; settings->workarea = TRUE;
settings->performance_flags = PERF_DISABLE_WALLPAPER | PERF_DISABLE_FULLWINDOWDRAG; settings->PerformanceFlags = PERF_DISABLE_WALLPAPER | PERF_DISABLE_FULLWINDOWDRAG;
} }
else if (strcmp("-x", argv[index]) == 0) else if (strcmp("-x", argv[index]) == 0)
{ {
@ -589,7 +589,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
} }
if (argv[index][0] == 'm') /* modem */ if (argv[index][0] == 'm') /* modem */
{ {
settings->performance_flags = PERF_DISABLE_WALLPAPER | settings->PerformanceFlags = PERF_DISABLE_WALLPAPER |
PERF_DISABLE_FULLWINDOWDRAG | PERF_DISABLE_MENUANIMATIONS | PERF_DISABLE_FULLWINDOWDRAG | PERF_DISABLE_MENUANIMATIONS |
PERF_DISABLE_THEMING; PERF_DISABLE_THEMING;
@ -597,17 +597,17 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
} }
else if (argv[index][0] == 'b') /* broadband */ else if (argv[index][0] == 'b') /* broadband */
{ {
settings->performance_flags = PERF_DISABLE_WALLPAPER; settings->PerformanceFlags = PERF_DISABLE_WALLPAPER;
settings->ConnectionType = CONNECTION_TYPE_BROADBAND_HIGH; settings->ConnectionType = CONNECTION_TYPE_BROADBAND_HIGH;
} }
else if (argv[index][0] == 'l') /* lan */ else if (argv[index][0] == 'l') /* lan */
{ {
settings->performance_flags = PERF_FLAG_NONE; settings->PerformanceFlags = PERF_FLAG_NONE;
settings->ConnectionType = CONNECTION_TYPE_LAN; settings->ConnectionType = CONNECTION_TYPE_LAN;
} }
else else
{ {
settings->performance_flags = strtol(argv[index], 0, 16); settings->PerformanceFlags = strtol(argv[index], 0, 16);
} }
} }
else if (strcmp("-X", argv[index]) == 0) else if (strcmp("-X", argv[index]) == 0)
@ -653,7 +653,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
settings->RdpSecurity = TRUE; settings->RdpSecurity = TRUE;
settings->TlsSecurity = FALSE; settings->TlsSecurity = FALSE;
settings->NlaSecurity = FALSE; settings->NlaSecurity = FALSE;
settings->encryption = TRUE; settings->Encryption = TRUE;
settings->EncryptionMethod = ENCRYPTION_METHOD_40BIT | ENCRYPTION_METHOD_128BIT | ENCRYPTION_METHOD_FIPS; settings->EncryptionMethod = ENCRYPTION_METHOD_40BIT | ENCRYPTION_METHOD_128BIT | ENCRYPTION_METHOD_FIPS;
settings->EncryptionLevel = ENCRYPTION_LEVEL_CLIENT_COMPATIBLE; settings->EncryptionLevel = ENCRYPTION_LEVEL_CLIENT_COMPATIBLE;
} }
@ -681,28 +681,28 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
} }
else if (strcmp("--tsg", argv[index]) == 0) else if (strcmp("--tsg", argv[index]) == 0)
{ {
settings->ts_gateway = TRUE; settings->GatewayUsageMethod = TRUE;
index++; index++;
if (index == argc) if (index == argc)
{ {
printf("missing TSG username\n"); printf("missing TSG username\n");
return -1; return -1;
} }
settings->tsg_username = _strdup(argv[index]); settings->GatewayUsername = _strdup(argv[index]);
index++; index++;
if (index == argc) if (index == argc)
{ {
printf("missing TSG password\n"); printf("missing TSG password\n");
return -1; return -1;
} }
settings->tsg_password = _strdup(argv[index]); settings->GatewayPassword = _strdup(argv[index]);
index++; index++;
if (index == argc) if (index == argc)
{ {
printf("missing TSG server\n"); printf("missing TSG server\n");
return -1; return -1;
} }
settings->tsg_hostname = _strdup(argv[index]); settings->GatewayHostname = _strdup(argv[index]);
} }
else if (strcmp("--plugin", argv[index]) == 0) else if (strcmp("--plugin", argv[index]) == 0)
{ {
@ -715,7 +715,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
} }
plugin_data = NULL; plugin_data = NULL;
if (strstr(argv[t], "rdpsnd")) if (strstr(argv[t], "rdpsnd"))
settings->audio_playback = TRUE; settings->AudioPlayback = TRUE;
if (index < argc - 1 && strcmp("--data", argv[index + 1]) == 0) if (index < argc - 1 && strcmp("--data", argv[index + 1]) == 0)
{ {
index += 2; index += 2;
@ -728,7 +728,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
plugin_data = (RDP_PLUGIN_DATA*) realloc(plugin_data, sizeof(RDP_PLUGIN_DATA) * (i + 2)); plugin_data = (RDP_PLUGIN_DATA*) realloc(plugin_data, sizeof(RDP_PLUGIN_DATA) * (i + 2));
if (strstr(argv[t], "drdynvc") && strstr(argv[index], "audin")) if (strstr(argv[t], "drdynvc") && strstr(argv[index], "audin"))
settings->audio_capture = TRUE; settings->AudioCapture = TRUE;
plugin_data[i].size = sizeof(RDP_PLUGIN_DATA); plugin_data[i].size = sizeof(RDP_PLUGIN_DATA);
plugin_data[i].data[0] = NULL; plugin_data[i].data[0] = NULL;
@ -796,7 +796,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
} }
else if (strcmp("--no-salted-checksum", argv[index]) == 0) else if (strcmp("--no-salted-checksum", argv[index]) == 0)
{ {
settings->salted_checksum = FALSE; settings->SaltedChecksum = FALSE;
} }
else if (strcmp("--pcid", argv[index]) == 0) else if (strcmp("--pcid", argv[index]) == 0)
{ {
@ -806,8 +806,8 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
printf("missing preconnection id value\n"); printf("missing preconnection id value\n");
return -1; return -1;
} }
settings->send_preconnection_pdu = TRUE; settings->SendPreconnectionPdu = TRUE;
settings->preconnection_id = atoi(argv[index]); settings->PreconnectionId = atoi(argv[index]);
} }
else if (strcmp("--pcb", argv[index]) == 0) else if (strcmp("--pcb", argv[index]) == 0)
{ {
@ -817,8 +817,8 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
printf("missing preconnection blob value\n"); printf("missing preconnection blob value\n");
return -1; return -1;
} }
settings->send_preconnection_pdu = TRUE; settings->SendPreconnectionPdu = TRUE;
settings->preconnection_blob = _strdup(argv[index]); settings->PreconnectionBlob = _strdup(argv[index]);
} }
else if (strcmp("--version", argv[index]) == 0) else if (strcmp("--version", argv[index]) == 0)
{ {
@ -833,23 +833,23 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
followed will be parsed for the next session. */ followed will be parsed for the next session. */
index++; index++;
if (settings->smooth_fonts) if (settings->AllowFontSmoothing)
settings->performance_flags |= PERF_ENABLE_FONT_SMOOTHING; settings->PerformanceFlags |= PERF_ENABLE_FONT_SMOOTHING;
if (settings->desktop_composition) if (settings->AllowDesktopComposition)
settings->performance_flags |= PERF_ENABLE_DESKTOP_COMPOSITION; settings->PerformanceFlags |= PERF_ENABLE_DESKTOP_COMPOSITION;
if (settings->disable_wallpaper) if (settings->DisableWallpaper)
settings->performance_flags |= PERF_DISABLE_WALLPAPER; settings->PerformanceFlags |= PERF_DISABLE_WALLPAPER;
if (settings->disable_full_window_drag) if (settings->DisableFullWindowDrag)
settings->performance_flags |= PERF_DISABLE_FULLWINDOWDRAG; settings->PerformanceFlags |= PERF_DISABLE_FULLWINDOWDRAG;
if (settings->disable_menu_animations) if (settings->DisableMenuAnims)
settings->performance_flags |= PERF_DISABLE_MENUANIMATIONS; settings->PerformanceFlags |= PERF_DISABLE_MENUANIMATIONS;
if (settings->disable_theming) if (settings->DisableThemes)
settings->performance_flags |= PERF_DISABLE_THEMING; settings->PerformanceFlags |= PERF_DISABLE_THEMING;
break; /* post process missing arguments */ break; /* post process missing arguments */
@ -879,36 +879,36 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
if (settings->from_stdin) if (settings->from_stdin)
{ {
/* username */ /* username */
if (NULL == settings->username) if (NULL == settings->Username)
{ {
char input[512]; char input[512];
input[0] = '\0'; input[0] = '\0';
printf("username: "); printf("username: ");
if (scanf("%511s%*c", input) > 0) if (scanf("%511s%*c", input) > 0)
{ {
settings->username = _strdup(input); settings->Username = _strdup(input);
} }
} }
/* password */ /* password */
if (NULL == settings->password) if (NULL == settings->Password)
{ {
settings->password = malloc(512 * sizeof(char)); settings->Password = malloc(512 * sizeof(char));
if (isatty(STDIN_FILENO)) if (isatty(STDIN_FILENO))
{ {
freerdp_passphrase_read("password: ", settings->password, 512, settings->from_stdin); freerdp_passphrase_read("password: ", settings->Password, 512, settings->from_stdin);
} }
else else
{ {
printf("password: "); printf("password: ");
if (scanf("%511s%*c", settings->password) <= 0) if (scanf("%511s%*c", settings->Password) <= 0)
{ {
free(settings->password); free(settings->Password);
settings->password = NULL; settings->Password = NULL;
} }
} }
} }
/* domain */ /* domain */
if (NULL == settings->domain) if (NULL == settings->Domain)
{ {
char input[512]; char input[512];
input[0] = '\0'; input[0] = '\0';
@ -919,7 +919,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
at the get go */ at the get go */
if (input[0] != '\0' && !(input[0] == '.' && input[1] == '\0')) if (input[0] != '\0' && !(input[0] == '.' && input[1] == '\0'))
{ {
settings->domain = _strdup(input); settings->Domain = _strdup(input);
} }
} }
if (feof(stdin)) if (feof(stdin))
@ -929,7 +929,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
} }
} }
/* hostname */ /* hostname */
if (NULL == settings->hostname) if (NULL == settings->Hostname)
{ {
char input[512]; char input[512];
input[0] = '\0'; input[0] = '\0';
@ -942,7 +942,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
} }
/* Must have a hostname. Do you? */ /* Must have a hostname. Do you? */
if ((settings->hostname == NULL) && (settings->connection_file == NULL)) if ((settings->Hostname == NULL) && (settings->ConnectionFile == NULL))
{ {
printf("missing server name\n"); printf("missing server name\n");
return FREERDP_ARGS_PARSE_FAILURE; return FREERDP_ARGS_PARSE_FAILURE;

View File

@ -94,8 +94,8 @@ BOOL mf_peer_post_connect(freerdp_peer* client)
if (client->settings->autologon) if (client->settings->autologon)
{ {
printf(" and wants to login automatically as %s\\%s", printf(" and wants to login automatically as %s\\%s",
client->settings->domain ? client->settings->domain : "", client->settings->Domain ? client->settings->Domain : "",
client->settings->username); client->settings->Username);
/* A real server may perform OS login here if NLA is not executed previously. */ /* A real server may perform OS login here if NLA is not executed previously. */
} }
@ -199,12 +199,12 @@ static void* mf_peer_main_loop(void* arg)
mf_peer_init(client); mf_peer_init(client);
/* Initialize the real server settings here */ /* Initialize the real server settings here */
client->settings->cert_file = _strdup("server.crt"); client->settings->CertificateFile = _strdup("server.crt");
client->settings->privatekey_file = _strdup("server.key"); client->settings->PrivateKeyFile = _strdup("server.key");
client->settings->NlaSecurity = FALSE; client->settings->NlaSecurity = FALSE;
client->settings->rfx_codec = TRUE; client->settings->RemoteFxCodec = TRUE;
client->settings->suppress_output = TRUE; client->settings->SuppressOutput = TRUE;
client->settings->refresh_rect = TRUE; client->settings->RefreshRect = TRUE;
client->PostConnect = mf_peer_post_connect; client->PostConnect = mf_peer_post_connect;
client->Activate = mf_peer_activate; client->Activate = mf_peer_activate;

View File

@ -149,7 +149,7 @@ static void test_peer_draw_background(freerdp_peer* client)
SURFACE_BITS_COMMAND* cmd = &update->surface_bits_command; SURFACE_BITS_COMMAND* cmd = &update->surface_bits_command;
testPeerContext* context = (testPeerContext*) client->context; testPeerContext* context = (testPeerContext*) client->context;
if (!client->settings->rfx_codec && !client->settings->ns_codec) if (!client->settings->RemoteFxCodec && !client->settings->NSCodec)
return; return;
test_peer_begin_frame(client); test_peer_begin_frame(client);
@ -165,17 +165,17 @@ static void test_peer_draw_background(freerdp_peer* client)
rgb_data = malloc(size); rgb_data = malloc(size);
memset(rgb_data, 0xA0, size); memset(rgb_data, 0xA0, size);
if (client->settings->rfx_codec) if (client->settings->RemoteFxCodec)
{ {
rfx_compose_message(context->rfx_context, s, rfx_compose_message(context->rfx_context, s,
&rect, 1, rgb_data, rect.width, rect.height, rect.width * 3); &rect, 1, rgb_data, rect.width, rect.height, rect.width * 3);
cmd->codecID = client->settings->rfx_codec_id; cmd->codecID = client->settings->RemoteFxCodecId;
} }
else else
{ {
nsc_compose_message(context->nsc_context, s, nsc_compose_message(context->nsc_context, s,
rgb_data, rect.width, rect.height, rect.width * 3); rgb_data, rect.width, rect.height, rect.width * 3);
cmd->codecID = client->settings->ns_codec_id; cmd->codecID = client->settings->NSCodecId;
} }
cmd->destLeft = 0; cmd->destLeft = 0;
@ -203,7 +203,7 @@ static void test_peer_load_icon(freerdp_peer* client)
BYTE* rgb_data; BYTE* rgb_data;
int c; int c;
if (!client->settings->rfx_codec && !client->settings->ns_codec) if (!client->settings->RemoteFxCodec && !client->settings->NSCodec)
return; return;
if ((fp = fopen("test_icon.ppm", "r")) == NULL) if ((fp = fopen("test_icon.ppm", "r")) == NULL)
@ -264,17 +264,17 @@ static void test_peer_draw_icon(freerdp_peer* client, int x, int y)
if (context->icon_x >= 0) if (context->icon_x >= 0)
{ {
s = test_peer_stream_init(context); s = test_peer_stream_init(context);
if (client->settings->rfx_codec) if (client->settings->RemoteFxCodec)
{ {
rfx_compose_message(context->rfx_context, s, rfx_compose_message(context->rfx_context, s,
&rect, 1, context->bg_data, rect.width, rect.height, rect.width * 3); &rect, 1, context->bg_data, rect.width, rect.height, rect.width * 3);
cmd->codecID = client->settings->rfx_codec_id; cmd->codecID = client->settings->RemoteFxCodecId;
} }
else else
{ {
nsc_compose_message(context->nsc_context, s, nsc_compose_message(context->nsc_context, s,
context->bg_data, rect.width, rect.height, rect.width * 3); context->bg_data, rect.width, rect.height, rect.width * 3);
cmd->codecID = client->settings->ns_codec_id; cmd->codecID = client->settings->NSCodecId;
} }
cmd->destLeft = context->icon_x; cmd->destLeft = context->icon_x;
@ -291,17 +291,17 @@ static void test_peer_draw_icon(freerdp_peer* client, int x, int y)
s = test_peer_stream_init(context); s = test_peer_stream_init(context);
if (client->settings->rfx_codec) if (client->settings->RemoteFxCodec)
{ {
rfx_compose_message(context->rfx_context, s, rfx_compose_message(context->rfx_context, s,
&rect, 1, context->icon_data, rect.width, rect.height, rect.width * 3); &rect, 1, context->icon_data, rect.width, rect.height, rect.width * 3);
cmd->codecID = client->settings->rfx_codec_id; cmd->codecID = client->settings->RemoteFxCodecId;
} }
else else
{ {
nsc_compose_message(context->nsc_context, s, nsc_compose_message(context->nsc_context, s,
context->icon_data, rect.width, rect.height, rect.width * 3); context->icon_data, rect.width, rect.height, rect.width * 3);
cmd->codecID = client->settings->ns_codec_id; cmd->codecID = client->settings->NSCodecId;
} }
cmd->destLeft = x; cmd->destLeft = x;
@ -465,13 +465,13 @@ BOOL tf_peer_post_connect(freerdp_peer* client)
*/ */
printf("Client %s is activated (osMajorType %d osMinorType %d)", client->local ? "(local)" : client->hostname, printf("Client %s is activated (osMajorType %d osMinorType %d)", client->local ? "(local)" : client->hostname,
client->settings->os_major_type, client->settings->os_minor_type); client->settings->OsMajorType, client->settings->OsMinorType);
if (client->settings->autologon) if (client->settings->autologon)
{ {
printf(" and wants to login automatically as %s\\%s", printf(" and wants to login automatically as %s\\%s",
client->settings->domain ? client->settings->domain : "", client->settings->Domain ? client->settings->Domain : "",
client->settings->username); client->settings->Username);
/* A real server may perform OS login here if NLA is not executed previously. */ /* A real server may perform OS login here if NLA is not executed previously. */
} }
@ -652,12 +652,12 @@ static void* test_peer_mainloop(void* arg)
test_peer_init(client); test_peer_init(client);
/* Initialize the real server settings here */ /* Initialize the real server settings here */
client->settings->cert_file = _strdup("server.crt"); client->settings->CertificateFile = _strdup("server.crt");
client->settings->privatekey_file = _strdup("server.key"); client->settings->PrivateKeyFile = _strdup("server.key");
client->settings->NlaSecurity = FALSE; client->settings->NlaSecurity = FALSE;
client->settings->rfx_codec = TRUE; client->settings->RemoteFxCodec = TRUE;
client->settings->suppress_output = TRUE; client->settings->SuppressOutput = TRUE;
client->settings->refresh_rect = TRUE; client->settings->RefreshRect = TRUE;
client->PostConnect = tf_peer_post_connect; client->PostConnect = tf_peer_post_connect;
client->Activate = tf_peer_activate; client->Activate = tf_peer_activate;

View File

@ -212,11 +212,11 @@ DWORD WINAPI wf_peer_socket_listener(LPVOID lpParam)
void wf_peer_read_settings(freerdp_peer* client) void wf_peer_read_settings(freerdp_peer* client)
{ {
if (!wf_settings_read_string_ascii(HKEY_LOCAL_MACHINE, _T("Software\\FreeRDP\\Server"), _T("CertificateFile"), &(client->settings->cert_file))) if (!wf_settings_read_string_ascii(HKEY_LOCAL_MACHINE, _T("Software\\FreeRDP\\Server"), _T("CertificateFile"), &(client->settings->CertificateFile)))
client->settings->cert_file = _strdup("server.crt"); client->settings->CertificateFile = _strdup("server.crt");
if (!wf_settings_read_string_ascii(HKEY_LOCAL_MACHINE, _T("Software\\FreeRDP\\Server"), _T("PrivateKeyFile"), &(client->settings->privatekey_file))) if (!wf_settings_read_string_ascii(HKEY_LOCAL_MACHINE, _T("Software\\FreeRDP\\Server"), _T("PrivateKeyFile"), &(client->settings->PrivateKeyFile)))
client->settings->privatekey_file = _strdup("server.key"); client->settings->PrivateKeyFile = _strdup("server.key");
} }
DWORD WINAPI wf_peer_main_loop(LPVOID lpParam) DWORD WINAPI wf_peer_main_loop(LPVOID lpParam)
@ -232,9 +232,9 @@ DWORD WINAPI wf_peer_main_loop(LPVOID lpParam)
wf_peer_init(client); wf_peer_init(client);
settings = client->settings; settings = client->settings;
settings->rfx_codec = TRUE; settings->RemoteFxCodec = TRUE;
settings->ns_codec = FALSE; settings->NSCodec = FALSE;
settings->jpeg_codec = FALSE; settings->JpegCodec = FALSE;
wf_peer_read_settings(client); wf_peer_read_settings(client);
client->PostConnect = wf_peer_post_connect; client->PostConnect = wf_peer_post_connect;

View File

@ -180,7 +180,7 @@ void wf_update_peer_send(wfInfo* wfi, wfPeerContext* context)
wfi->frame_idx, context->frame_idx + 1); wfi->frame_idx, context->frame_idx + 1);
} }
wfi->cmd.codecID = client->settings->rfx_codec_id; wfi->cmd.codecID = client->settings->RemoteFxCodecId;
client->update->SurfaceBits(client->update->context, &wfi->cmd); client->update->SurfaceBits(client->update->context, &wfi->cmd);
context->frame_idx++; context->frame_idx++;
} }

View File

@ -461,7 +461,7 @@ void xf_peer_rfx_update(freerdp_peer* client, int x, int y, int width, int heigh
} }
cmd->bpp = 32; cmd->bpp = 32;
cmd->codecID = client->settings->rfx_codec_id; cmd->codecID = client->settings->RemoteFxCodecId;
cmd->width = width; cmd->width = width;
cmd->height = height; cmd->height = height;
cmd->bitmapDataLength = stream_get_length(s); cmd->bitmapDataLength = stream_get_length(s);
@ -550,8 +550,8 @@ BOOL xf_peer_post_connect(freerdp_peer* client)
if (client->settings->autologon) if (client->settings->autologon)
{ {
printf(" and wants to login automatically as %s\\%s", printf(" and wants to login automatically as %s\\%s",
client->settings->domain ? client->settings->domain : "", client->settings->Domain ? client->settings->Domain : "",
client->settings->username); client->settings->Username);
/* A real server may perform OS login here if NLA is not executed previously. */ /* A real server may perform OS login here if NLA is not executed previously. */
} }
@ -560,7 +560,7 @@ BOOL xf_peer_post_connect(freerdp_peer* client)
printf("Client requested desktop: %dx%dx%d\n", printf("Client requested desktop: %dx%dx%d\n",
client->settings->DesktopWidth, client->settings->DesktopHeight, client->settings->ColorDepth); client->settings->DesktopWidth, client->settings->DesktopHeight, client->settings->ColorDepth);
if (!client->settings->rfx_codec) if (!client->settings->RemoteFxCodec)
{ {
printf("Client does not support RemoteFX\n"); printf("Client does not support RemoteFX\n");
return 0; return 0;
@ -635,14 +635,14 @@ void* xf_peer_main_loop(void* arg)
freerdp_mkdir(server_file_path); freerdp_mkdir(server_file_path);
} }
settings->cert_file = freerdp_construct_path(server_file_path, "server.crt"); settings->CertificateFile = freerdp_construct_path(server_file_path, "server.crt");
settings->privatekey_file = freerdp_construct_path(server_file_path, "server.key"); settings->PrivateKeyFile = freerdp_construct_path(server_file_path, "server.key");
settings->NlaSecurity = TRUE; settings->NlaSecurity = TRUE;
settings->TlsSecurity = FALSE; settings->TlsSecurity = FALSE;
settings->RdpSecurity = FALSE; settings->RdpSecurity = FALSE;
settings->rfx_codec = TRUE; settings->RemoteFxCodec = TRUE;
client->Capabilities = xf_peer_capabilities; client->Capabilities = xf_peer_capabilities;
client->PostConnect = xf_peer_post_connect; client->PostConnect = xf_peer_post_connect;