FreeRDP
info.c File Reference
#include <freerdp/config.h>
#include "settings.h"
#include <winpr/crt.h>
#include <winpr/assert.h>
#include <freerdp/crypto/crypto.h>
#include <freerdp/log.h>
#include <freerdp/session.h>
#include <stdio.h>
#include "timezone.h"
#include "info.h"

Macros

#define TAG   FREERDP_TAG("core.info")
 
#define logonInfoV2Size   (2 + 4 + 4 + 4 + 4)
 
#define logonInfoV2ReservedSize   558
 
#define logonInfoV2TotalSize   (logonInfoV2Size + logonInfoV2ReservedSize)
 
#define MAX_LABEL_LENGTH   40
 

Functions

static BOOL rdp_read_info_null_string (rdpSettings *settings, FreeRDP_Settings_Keys_String id, const char *what, UINT32 flags, wStream *s, size_t cbLen, size_t max)
 
static char * rdp_info_package_flags_description (UINT32 flags)
 
static BOOL rdp_compute_client_auto_reconnect_cookie (rdpRdp *rdp)
 
static BOOL rdp_read_server_auto_reconnect_cookie (rdpRdp *rdp, wStream *s, logon_info_ex *info)
 
static BOOL rdp_read_client_auto_reconnect_cookie (rdpRdp *rdp, wStream *s)
 
static BOOL rdp_write_client_auto_reconnect_cookie (rdpRdp *rdp, wStream *s)
 
static size_t rdp_get_client_address_max_size (const rdpRdp *rdp)
 
static BOOL rdp_read_extended_info_packet (rdpRdp *rdp, wStream *s)
 
static BOOL rdp_write_extended_info_packet (rdpRdp *rdp, wStream *s)
 
static BOOL rdp_read_info_string (rdpSettings *settings, FreeRDP_Settings_Keys_String id, UINT32 flags, wStream *s, size_t cbLenNonNull, size_t max)
 
static BOOL rdp_read_info_packet (rdpRdp *rdp, wStream *s, UINT16 tpktlength)
 
static BOOL rdp_write_info_packet (rdpRdp *rdp, wStream *s)
 
BOOL rdp_recv_client_info (rdpRdp *rdp, wStream *s)
 
BOOL rdp_send_client_info (rdpRdp *rdp)
 
static void rdp_free_logon_info (logon_info *info)
 
static BOOL rdp_info_read_string (const char *what, wStream *s, size_t size, size_t max, BOOL skipMax, char **dst)
 
static BOOL rdp_recv_logon_info_v1 (rdpRdp *rdp, wStream *s, logon_info *info)
 
static BOOL rdp_recv_logon_info_v2 (rdpRdp *rdp, wStream *s, logon_info *info)
 
static BOOL rdp_recv_logon_plain_notify (rdpRdp *rdp, wStream *s)
 
static BOOL rdp_recv_logon_error_info (rdpRdp *rdp, wStream *s, logon_info_ex *info)
 
static BOOL rdp_recv_logon_info_extended (rdpRdp *rdp, wStream *s, logon_info_ex *info)
 
BOOL rdp_recv_save_session_info (rdpRdp *rdp, wStream *s)
 
static BOOL rdp_write_logon_info_v1 (wStream *s, logon_info *info)
 
static BOOL rdp_write_logon_info_v2 (wStream *s, logon_info *info)
 
static BOOL rdp_write_logon_info_plain (wStream *s)
 
static BOOL rdp_write_logon_info_ex (wStream *s, logon_info_ex *info)
 
BOOL rdp_send_save_session_info (rdpContext *context, UINT32 type, void *data)
 
BOOL rdp_send_server_status_info (rdpContext *context, UINT32 status)
 

Variables

static const char *const INFO_TYPE_LOGON_STRINGS [4]
 
static const struct info_flags_t info_flags []
 

Macro Definition Documentation

◆ logonInfoV2ReservedSize

#define logonInfoV2ReservedSize   558

◆ logonInfoV2Size

#define logonInfoV2Size   (2 + 4 + 4 + 4 + 4)

◆ logonInfoV2TotalSize

#define logonInfoV2TotalSize   (logonInfoV2Size + logonInfoV2ReservedSize)

◆ MAX_LABEL_LENGTH

#define MAX_LABEL_LENGTH   40

◆ TAG

#define TAG   FREERDP_TAG("core.info")

FreeRDP: A Remote Desktop Protocol Implementation RDP Client Info

Copyright 2011 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com Copyright 2015 Thincast Technologies GmbH Copyright 2015 DI (FH) Martin Haimberger marti.nosp@m.n.ha.nosp@m.imber.nosp@m.ger@.nosp@m.thinc.nosp@m.ast..nosp@m.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Function Documentation

◆ rdp_compute_client_auto_reconnect_cookie()

static BOOL rdp_compute_client_auto_reconnect_cookie ( rdpRdp *  rdp)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdp_free_logon_info()

static void rdp_free_logon_info ( logon_info *  info)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdp_get_client_address_max_size()

static size_t rdp_get_client_address_max_size ( const rdpRdp *  rdp)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdp_info_package_flags_description()

static char* rdp_info_package_flags_description ( UINT32  flags)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdp_info_read_string()

static BOOL rdp_info_read_string ( const char *  what,
wStream s,
size_t  size,
size_t  max,
BOOL  skipMax,
char **  dst 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdp_read_client_auto_reconnect_cookie()

static BOOL rdp_read_client_auto_reconnect_cookie ( rdpRdp *  rdp,
wStream s 
)
static

Read Client Auto Reconnect Cookie (ARC_CS_PRIVATE_PACKET). msdn{cc240541}

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdp_read_extended_info_packet()

static BOOL rdp_read_extended_info_packet ( rdpRdp *  rdp,
wStream s 
)
static

Read Extended Info Packet (TS_EXTENDED_INFO_PACKET). msdn{cc240476}

down below all fields are optional but if one field is not present, then all of the subsequent fields also MUST NOT be present.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdp_read_info_null_string()

static BOOL rdp_read_info_null_string ( rdpSettings *  settings,
FreeRDP_Settings_Keys_String  id,
const char *  what,
UINT32  flags,
wStream s,
size_t  cbLen,
size_t  max 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdp_read_info_packet()

static BOOL rdp_read_info_packet ( rdpRdp *  rdp,
wStream s,
UINT16  tpktlength 
)
static

Read Info Packet (TS_INFO_PACKET). msdn{cc240475}

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdp_read_info_string()

static BOOL rdp_read_info_string ( rdpSettings *  settings,
FreeRDP_Settings_Keys_String  id,
UINT32  flags,
wStream s,
size_t  cbLenNonNull,
size_t  max 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdp_read_server_auto_reconnect_cookie()

static BOOL rdp_read_server_auto_reconnect_cookie ( rdpRdp *  rdp,
wStream s,
logon_info_ex *  info 
)
static

Read Server Auto Reconnect Cookie (ARC_SC_PRIVATE_PACKET). msdn{cc240540}

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdp_recv_client_info()

BOOL rdp_recv_client_info ( rdpRdp *  rdp,
wStream s 
)

Read Client Info PDU (CLIENT_INFO_PDU). msdn{cc240474}

Parameters
rdpRDP module
sstream
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdp_recv_logon_error_info()

static BOOL rdp_recv_logon_error_info ( rdpRdp *  rdp,
wStream s,
logon_info_ex *  info 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdp_recv_logon_info_extended()

static BOOL rdp_recv_logon_info_extended ( rdpRdp *  rdp,
wStream s,
logon_info_ex *  info 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdp_recv_logon_info_v1()

static BOOL rdp_recv_logon_info_v1 ( rdpRdp *  rdp,
wStream s,
logon_info *  info 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdp_recv_logon_info_v2()

static BOOL rdp_recv_logon_info_v2 ( rdpRdp *  rdp,
wStream s,
logon_info *  info 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdp_recv_logon_plain_notify()

static BOOL rdp_recv_logon_plain_notify ( rdpRdp *  rdp,
wStream s 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdp_recv_save_session_info()

BOOL rdp_recv_save_session_info ( rdpRdp *  rdp,
wStream s 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdp_send_client_info()

BOOL rdp_send_client_info ( rdpRdp *  rdp)

Send Client Info PDU (CLIENT_INFO_PDU). msdn{cc240474}

Parameters
rdpRDP module
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdp_send_save_session_info()

BOOL rdp_send_save_session_info ( rdpContext *  context,
UINT32  type,
void *  data 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdp_send_server_status_info()

BOOL rdp_send_server_status_info ( rdpContext *  context,
UINT32  status 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdp_write_client_auto_reconnect_cookie()

static BOOL rdp_write_client_auto_reconnect_cookie ( rdpRdp *  rdp,
wStream s 
)
static

Write Client Auto Reconnect Cookie (ARC_CS_PRIVATE_PACKET). msdn{cc240541}

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdp_write_extended_info_packet()

static BOOL rdp_write_extended_info_packet ( rdpRdp *  rdp,
wStream s 
)
static

Write Extended Info Packet (TS_EXTENDED_INFO_PACKET). msdn{cc240476}

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdp_write_info_packet()

static BOOL rdp_write_info_packet ( rdpRdp *  rdp,
wStream s 
)
static

Write Info Packet (TS_INFO_PACKET). msdn{cc240475}

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdp_write_logon_info_ex()

static BOOL rdp_write_logon_info_ex ( wStream s,
logon_info_ex *  info 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdp_write_logon_info_plain()

static BOOL rdp_write_logon_info_plain ( wStream s)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdp_write_logon_info_v1()

static BOOL rdp_write_logon_info_v1 ( wStream s,
logon_info *  info 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdp_write_logon_info_v2()

static BOOL rdp_write_logon_info_v2 ( wStream s,
logon_info *  info 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ info_flags

const struct info_flags_t info_flags[]
static
Initial value:
= {
{ INFO_MOUSE, "INFO_MOUSE" },
{ INFO_DISABLECTRLALTDEL, "INFO_DISABLECTRLALTDEL" },
{ INFO_AUTOLOGON, "INFO_AUTOLOGON" },
{ INFO_UNICODE, "INFO_UNICODE" },
{ INFO_MAXIMIZESHELL, "INFO_MAXIMIZESHELL" },
{ INFO_LOGONNOTIFY, "INFO_LOGONNOTIFY" },
{ INFO_COMPRESSION, "INFO_COMPRESSION" },
{ INFO_ENABLEWINDOWSKEY, "INFO_ENABLEWINDOWSKEY" },
{ INFO_REMOTECONSOLEAUDIO, "INFO_REMOTECONSOLEAUDIO" },
{ INFO_FORCE_ENCRYPTED_CS_PDU, "INFO_FORCE_ENCRYPTED_CS_PDU" },
{ INFO_RAIL, "INFO_RAIL" },
{ INFO_LOGONERRORS, "INFO_LOGONERRORS" },
{ INFO_MOUSE_HAS_WHEEL, "INFO_MOUSE_HAS_WHEEL" },
{ INFO_PASSWORD_IS_SC_PIN, "INFO_PASSWORD_IS_SC_PIN" },
{ INFO_NOAUDIOPLAYBACK, "INFO_NOAUDIOPLAYBACK" },
{ INFO_USING_SAVED_CREDS, "INFO_USING_SAVED_CREDS" },
{ INFO_AUDIOCAPTURE, "INFO_AUDIOCAPTURE" },
{ INFO_VIDEO_DISABLE, "INFO_VIDEO_DISABLE" },
{ INFO_HIDEF_RAIL_SUPPORTED, "INFO_HIDEF_RAIL_SUPPORTED" },
}
#define INFO_USING_SAVED_CREDS
Definition: info.h:50
#define INFO_DISABLECTRLALTDEL
Definition: info.h:36
#define INFO_MOUSE
Definition: info.h:35
#define INFO_AUTOLOGON
Definition: info.h:37
#define INFO_LOGONERRORS
Definition: info.h:46
#define INFO_VIDEO_DISABLE
Definition: info.h:52
#define INFO_PASSWORD_IS_SC_PIN
Definition: info.h:48
#define INFO_RAIL
Definition: info.h:45
#define INFO_REMOTECONSOLEAUDIO
Definition: info.h:43
#define INFO_HIDEF_RAIL_SUPPORTED
Definition: info.h:53
#define INFO_AUDIOCAPTURE
Definition: info.h:51
#define INFO_MAXIMIZESHELL
Definition: info.h:39
#define INFO_ENABLEWINDOWSKEY
Definition: info.h:42
#define INFO_MOUSE_HAS_WHEEL
Definition: info.h:47
#define INFO_FORCE_ENCRYPTED_CS_PDU
Definition: info.h:44
#define INFO_NOAUDIOPLAYBACK
Definition: info.h:49
#define INFO_UNICODE
Definition: info.h:38
#define INFO_COMPRESSION
Definition: info.h:41
#define INFO_LOGONNOTIFY
Definition: info.h:40

◆ INFO_TYPE_LOGON_STRINGS

const char* const INFO_TYPE_LOGON_STRINGS[4]
static
Initial value:
= { "Logon Info V1", "Logon Info V2",
"Logon Plain Notify",
"Logon Extended Info" }