FreeRDP
tsg.c File Reference
#include <freerdp/config.h>
#include "../settings.h"
#include <winpr/assert.h>
#include <winpr/crt.h>
#include <winpr/error.h>
#include <winpr/print.h>
#include <winpr/stream.h>
#include <freerdp/log.h>
#include "rpc_bind.h"
#include "rpc_client.h"
#include "tsg.h"
#include "../utils.h"
#include "../../crypto/opensslcompat.h"

Macros

#define TAG   FREERDP_TAG("core.gateway.tsg")
 
#define TSG_CAPABILITY_TYPE_NAP   0x00000001
 
#define TSG_PACKET_TYPE_HEADER   0x00004844
 
#define TSG_PACKET_TYPE_VERSIONCAPS   0x00005643
 
#define TSG_PACKET_TYPE_QUARCONFIGREQUEST   0x00005143
 
#define TSG_PACKET_TYPE_QUARREQUEST   0x00005152
 
#define TSG_PACKET_TYPE_RESPONSE   0x00005052
 
#define TSG_PACKET_TYPE_QUARENC_RESPONSE   0x00004552
 
#define TSG_PACKET_TYPE_CAPS_RESPONSE   0x00004350
 
#define TSG_PACKET_TYPE_MSGREQUEST_PACKET   0x00004752
 
#define TSG_PACKET_TYPE_MESSAGE_PACKET   0x00004750
 
#define TSG_PACKET_TYPE_AUTH   0x00004054
 
#define TSG_PACKET_TYPE_REAUTH   0x00005250
 
#define ENTRY(x)
 

Typedefs

typedef WCHAR * RESOURCENAME
 

Functions

static BOOL tsg_stream_align (wLog *log, wStream *s, size_t align)
 
static const char * tsg_packet_id_to_string (UINT32 packetId)
 
static const char * tsg_component_id_to_string (UINT16 ComponentId, char *buffer, size_t bytelen)
 
static const char * tsg_state_to_string (TSG_STATE state)
 
static BOOL TsProxyReadTunnelContext (wLog *log, wStream *s, CONTEXT_HANDLE *tunnelContext)
 
static BOOL TsProxyWriteTunnelContext (wLog *log, wStream *s, const CONTEXT_HANDLE *tunnelContext)
 
static BOOL tsg_ndr_pointer_write (wLog *log, wStream *s, UINT32 *index, DWORD length)
 
static BOOL tsg_ndr_pointer_read (wLog *log, wStream *s, UINT32 *index, UINT32 *ptrval, BOOL required)
 
static BOOL tsg_ndr_write_string (wLog *log, wStream *s, const WCHAR *str, UINT32 length)
 
static BOOL tsg_ndr_read_string (wLog *log, wStream *s, WCHAR **str, UINT32 lengthInBytes)
 
static BOOL tsg_ndr_read_packet_header (wLog *log, wStream *s, TSG_PACKET_HEADER *header)
 
static BOOL tsg_ndr_write_packet_header (wLog *log, wStream *s, const TSG_PACKET_HEADER *header)
 
static BOOL tsg_ndr_read_nap (wLog *log, wStream *s, TSG_CAPABILITY_NAP *nap)
 
static BOOL tsg_ndr_write_nap (wLog *log, wStream *s, const TSG_CAPABILITY_NAP *nap)
 
static BOOL tsg_ndr_read_tsg_caps (wLog *log, wStream *s, TSG_PACKET_CAPABILITIES *caps)
 
static BOOL tsg_ndr_write_tsg_caps (wLog *log, wStream *s, const TSG_PACKET_CAPABILITIES *caps)
 
static BOOL tsg_ndr_read_version_caps (wLog *log, wStream *s, UINT32 *index, TSG_PACKET_VERSIONCAPS *caps)
 
static BOOL tsg_ndr_write_version_caps (wLog *log, wStream *s, UINT32 *index, const TSG_PACKET_VERSIONCAPS *caps)
 
static BOOL tsg_ndr_read_quarenc_response (wLog *log, wStream *s, UINT32 *index, TSG_PACKET_QUARENC_RESPONSE *quarenc)
 
static BOOL tsg_ndr_read_quarenc_data (wLog *log, wStream *s, UINT32 *index, TSG_PACKET_QUARENC_RESPONSE *quarenc)
 
static BOOL tsg_ndr_write_auth (wLog *log, wStream *s, UINT32 *index, const TSG_PACKET_AUTH *auth)
 
static BOOL tsg_ndr_write_reauth (wLog *log, wStream *s, UINT32 *index, const TSG_PACKET_REAUTH *auth)
 
static BOOL tsg_ndr_read_packet_response (wLog *log, wStream *s, UINT32 *index, TSG_PACKET_RESPONSE *response)
 
static BOOL tsg_print (char **buffer, size_t *len, WINPR_FORMAT_ARG const char *fmt,...)
 
static BOOL tsg_packet_header_to_string (char **buffer, size_t *length, const TSG_PACKET_HEADER *header)
 
static BOOL tsg_type_capability_nap_to_string (char **buffer, size_t *length, const TSG_CAPABILITY_NAP *cur)
 
static BOOL tsg_packet_capabilities_to_string (char **buffer, size_t *length, const TSG_PACKET_CAPABILITIES *caps, UINT32 numCaps)
 
static BOOL tsg_packet_versioncaps_to_string (char **buffer, size_t *length, const TSG_PACKET_VERSIONCAPS *caps)
 
static BOOL tsg_packet_quarconfigrequest_to_string (char **buffer, size_t *length, const TSG_PACKET_QUARCONFIGREQUEST *caps)
 
static BOOL tsg_packet_quarrequest_to_string (char **buffer, size_t *length, const TSG_PACKET_QUARREQUEST *caps)
 
static const char * tsg_bool_to_string (BOOL val)
 
static const char * tsg_redirection_flags_to_string (char *buffer, size_t size, const TSG_REDIRECTION_FLAGS *flags)
 
static BOOL tsg_packet_response_to_string (char **buffer, size_t *length, const TSG_PACKET_RESPONSE *caps)
 
static BOOL tsg_packet_quarenc_response_to_string (char **buffer, size_t *length, const TSG_PACKET_QUARENC_RESPONSE *caps)
 
static BOOL tsg_packet_message_response_to_string (char **buffer, size_t *length, const TSG_PACKET_MSG_RESPONSE *caps)
 
static BOOL tsg_packet_caps_response_to_string (char **buffer, size_t *length, const TSG_PACKET_CAPS_RESPONSE *caps)
 
static BOOL tsg_packet_message_request_to_string (char **buffer, size_t *length, const TSG_PACKET_MSG_REQUEST *caps)
 
static BOOL tsg_packet_auth_to_string (char **buffer, size_t *length, const TSG_PACKET_AUTH *caps)
 
static BOOL tsg_packet_reauth_to_string (char **buffer, size_t *length, const TSG_PACKET_REAUTH *caps)
 
static const char * tsg_packet_to_string (const TSG_PACKET *packet)
 
static BIO_METHOD * BIO_s_tsg (void)
 
static int TsProxySendToServer (handle_t IDL_handle, const byte pRpcMessage[], UINT32 count, const UINT32 *lengths)
 
static BOOL TsProxyCreateTunnelWriteRequest (rdpTsg *tsg, const TSG_PACKET *tsgPacket)
 
static BOOL tsg_ndr_read_consent_message (wLog *log, rdpContext *context, wStream *s, UINT32 *index)
 
static BOOL tsg_ndr_read_tunnel_context (wLog *log, wStream *s, CONTEXT_HANDLE *tunnelContext, UINT32 *tunnelId)
 
static BOOL tsg_ndr_read_caps_response (wLog *log, rdpContext *context, wStream *s, UINT32 *index, UINT32 PacketPtr, TSG_PACKET_CAPS_RESPONSE *caps, CONTEXT_HANDLE *tunnelContext, UINT32 *tunnelId)
 
static BOOL TsProxyCreateTunnelReadResponse (rdpTsg *tsg, const RPC_PDU *pdu, CONTEXT_HANDLE *tunnelContext, UINT32 *tunnelId)
 
static BOOL TsProxyAuthorizeTunnelWriteRequest (rdpTsg *tsg, CONTEXT_HANDLE *tunnelContext)
 
static UINT32 tsg_redir_to_flags (const TSG_REDIRECTION_FLAGS *redirect)
 
static BOOL tsg_redirect_apply (rdpTsg *tsg, const TSG_REDIRECTION_FLAGS *redirect)
 
static BOOL TsProxyAuthorizeTunnelReadResponse (rdpTsg *tsg, const RPC_PDU *pdu)
 
static BOOL TsProxyMakeTunnelCallWriteRequest (rdpTsg *tsg, CONTEXT_HANDLE *tunnelContext, UINT32 procId)
 
static BOOL TsProxyReadPacketSTringMessage (rdpTsg *tsg, wStream *s, TSG_PACKET_STRING_MESSAGE *msg)
 
static BOOL TsProxyMakeTunnelCallReadResponse (rdpTsg *tsg, const RPC_PDU *pdu)
 
static BOOL TsProxyCreateChannelWriteRequest (rdpTsg *tsg, CONTEXT_HANDLE *tunnelContext)
 
static BOOL TsProxyCreateChannelReadResponse (wLog *log, const RPC_PDU *pdu, CONTEXT_HANDLE *channelContext, UINT32 *channelId)
 
static BOOL TsProxyCloseChannelWriteRequest (rdpTsg *tsg, CONTEXT_HANDLE *context)
 
static BOOL TsProxyCloseChannelReadResponse (wLog *log, const RPC_PDU *pdu, CONTEXT_HANDLE *context)
 
static BOOL TsProxyCloseTunnelWriteRequest (rdpTsg *tsg, const CONTEXT_HANDLE *context)
 
static BOOL TsProxyCloseTunnelReadResponse (wLog *log, const RPC_PDU *pdu, CONTEXT_HANDLE *context)
 
static BOOL TsProxySetupReceivePipeWriteRequest (rdpTsg *tsg, const CONTEXT_HANDLE *channelContext)
 
static BOOL tsg_transition_to_state (rdpTsg *tsg, TSG_STATE state)
 
static BOOL tsg_initialize_version_caps (TSG_PACKET_VERSIONCAPS *packetVersionCaps)
 
BOOL tsg_proxy_begin (rdpTsg *tsg)
 
static BOOL tsg_proxy_reauth (rdpTsg *tsg)
 
BOOL tsg_recv_pdu (rdpTsg *tsg, const RPC_PDU *pdu)
 
BOOL tsg_check_event_handles (rdpTsg *tsg)
 
DWORD tsg_get_event_handles (rdpTsg *tsg, HANDLE *events, DWORD count)
 
static BOOL tsg_set_hostname (rdpTsg *tsg, const char *hostname)
 
static BOOL tsg_set_machine_name (rdpTsg *tsg, const char *machineName)
 
BOOL tsg_connect (rdpTsg *tsg, const char *hostname, UINT16 port, DWORD timeout)
 
BOOL tsg_disconnect (rdpTsg *tsg)
 
static int tsg_read (rdpTsg *tsg, BYTE *data, size_t length)
 Read data from TSG. More...
 
static int tsg_write (rdpTsg *tsg, const BYTE *data, UINT32 length)
 
rdpTsg * tsg_new (rdpTransport *transport)
 
void tsg_free (rdpTsg *tsg)
 
static int transport_bio_tsg_write (BIO *bio, const char *buf, int num)
 
static int transport_bio_tsg_read (BIO *bio, char *buf, int size)
 
static int transport_bio_tsg_puts (BIO *bio, const char *str)
 
static int transport_bio_tsg_gets (BIO *bio, char *str, int size)
 
static long transport_bio_tsg_ctrl (BIO *bio, int cmd, long arg1, void *arg2)
 
static int transport_bio_tsg_new (BIO *bio)
 
static int transport_bio_tsg_free (BIO *bio)
 
TSG_STATE tsg_get_state (rdpTsg *tsg)
 
BIO * tsg_get_bio (rdpTsg *tsg)
 
BOOL tsg_set_state (rdpTsg *tsg, TSG_STATE state)
 

Macro Definition Documentation

◆ ENTRY

#define ENTRY (   x)
Value:
case x: \
str = #x; \
break
UINT16 x
Definition: include/freerdp/event.h:110

◆ TAG

#define TAG   FREERDP_TAG("core.gateway.tsg")

FreeRDP: A Remote Desktop Protocol Implementation Terminal Server Gateway (TSG)

Copyright 2012 Fujitsu Technology Solutions GmbH Copyright 2012 Dmitrij Jasnov dmitr.nosp@m.ij.j.nosp@m.asnov.nosp@m.@ts..nosp@m.fujit.nosp@m.su.c.nosp@m.om 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.

◆ TSG_CAPABILITY_TYPE_NAP

#define TSG_CAPABILITY_TYPE_NAP   0x00000001

◆ TSG_PACKET_TYPE_AUTH

#define TSG_PACKET_TYPE_AUTH   0x00004054

◆ TSG_PACKET_TYPE_CAPS_RESPONSE

#define TSG_PACKET_TYPE_CAPS_RESPONSE   0x00004350

◆ TSG_PACKET_TYPE_HEADER

#define TSG_PACKET_TYPE_HEADER   0x00004844

◆ TSG_PACKET_TYPE_MESSAGE_PACKET

#define TSG_PACKET_TYPE_MESSAGE_PACKET   0x00004750

◆ TSG_PACKET_TYPE_MSGREQUEST_PACKET

#define TSG_PACKET_TYPE_MSGREQUEST_PACKET   0x00004752

◆ TSG_PACKET_TYPE_QUARCONFIGREQUEST

#define TSG_PACKET_TYPE_QUARCONFIGREQUEST   0x00005143

◆ TSG_PACKET_TYPE_QUARENC_RESPONSE

#define TSG_PACKET_TYPE_QUARENC_RESPONSE   0x00004552

◆ TSG_PACKET_TYPE_QUARREQUEST

#define TSG_PACKET_TYPE_QUARREQUEST   0x00005152

◆ TSG_PACKET_TYPE_REAUTH

#define TSG_PACKET_TYPE_REAUTH   0x00005250

◆ TSG_PACKET_TYPE_RESPONSE

#define TSG_PACKET_TYPE_RESPONSE   0x00005052

◆ TSG_PACKET_TYPE_VERSIONCAPS

#define TSG_PACKET_TYPE_VERSIONCAPS   0x00005643

Typedef Documentation

◆ RESOURCENAME

typedef WCHAR* RESOURCENAME

Function Documentation

◆ BIO_s_tsg()

BIO_METHOD * BIO_s_tsg ( void  )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ transport_bio_tsg_ctrl()

static long transport_bio_tsg_ctrl ( BIO *  bio,
int  cmd,
long  arg1,
void *  arg2 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ transport_bio_tsg_free()

static int transport_bio_tsg_free ( BIO *  bio)
static
Here is the caller graph for this function:

◆ transport_bio_tsg_gets()

static int transport_bio_tsg_gets ( BIO *  bio,
char *  str,
int  size 
)
static
Here is the caller graph for this function:

◆ transport_bio_tsg_new()

static int transport_bio_tsg_new ( BIO *  bio)
static
Here is the caller graph for this function:

◆ transport_bio_tsg_puts()

static int transport_bio_tsg_puts ( BIO *  bio,
const char *  str 
)
static
Here is the caller graph for this function:

◆ transport_bio_tsg_read()

static int transport_bio_tsg_read ( BIO *  bio,
char *  buf,
int  size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ transport_bio_tsg_write()

static int transport_bio_tsg_write ( BIO *  bio,
const char *  buf,
int  num 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_bool_to_string()

static const char* tsg_bool_to_string ( BOOL  val)
static
Here is the caller graph for this function:

◆ tsg_check_event_handles()

BOOL tsg_check_event_handles ( rdpTsg *  tsg)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_component_id_to_string()

static const char* tsg_component_id_to_string ( UINT16  ComponentId,
char *  buffer,
size_t  bytelen 
)
static
Here is the caller graph for this function:

◆ tsg_connect()

BOOL tsg_connect ( rdpTsg *  tsg,
const char *  hostname,
UINT16  port,
DWORD  timeout 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_disconnect()

BOOL tsg_disconnect ( rdpTsg *  tsg)
               Gateway Shutdown Phase

Client Server | |

----------—TsProxyCloseChannel Request-------—>
<----—TsProxySetupReceivePipe Final Response--—
<--------—TsProxyCloseChannel Response--------—
-—TsProxyMakeTunnelCall Request (cancel async)-->
<—TsProxyMakeTunnelCall Response (call async)-—
<—TsProxyMakeTunnelCall Response (cancel async)–
-----------—TsProxyCloseTunnel Request-------—>
<----------—TsProxyCloseTunnel Response-------—
Here is the call graph for this function:

◆ tsg_free()

void tsg_free ( rdpTsg *  tsg)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_get_bio()

BIO* tsg_get_bio ( rdpTsg *  tsg)
Here is the caller graph for this function:

◆ tsg_get_event_handles()

DWORD tsg_get_event_handles ( rdpTsg *  tsg,
HANDLE *  events,
DWORD  count 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_get_state()

TSG_STATE tsg_get_state ( rdpTsg *  tsg)
Here is the caller graph for this function:

◆ tsg_initialize_version_caps()

static BOOL tsg_initialize_version_caps ( TSG_PACKET_VERSIONCAPS *  packetVersionCaps)
static
Here is the caller graph for this function:

◆ tsg_ndr_pointer_read()

static BOOL tsg_ndr_pointer_read ( wLog *  log,
wStream s,
UINT32 *  index,
UINT32 *  ptrval,
BOOL  required 
)
static
Here is the caller graph for this function:

◆ tsg_ndr_pointer_write()

static BOOL tsg_ndr_pointer_write ( wLog *  log,
wStream s,
UINT32 *  index,
DWORD  length 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_ndr_read_caps_response()

static BOOL tsg_ndr_read_caps_response ( wLog *  log,
rdpContext *  context,
wStream s,
UINT32 *  index,
UINT32  PacketPtr,
TSG_PACKET_CAPS_RESPONSE *  caps,
CONTEXT_HANDLE tunnelContext,
UINT32 *  tunnelId 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_ndr_read_consent_message()

static BOOL tsg_ndr_read_consent_message ( wLog *  log,
rdpContext *  context,
wStream s,
UINT32 *  index 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_ndr_read_nap()

static BOOL tsg_ndr_read_nap ( wLog *  log,
wStream s,
TSG_CAPABILITY_NAP *  nap 
)
static
Here is the caller graph for this function:

◆ tsg_ndr_read_packet_header()

static BOOL tsg_ndr_read_packet_header ( wLog *  log,
wStream s,
TSG_PACKET_HEADER *  header 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_ndr_read_packet_response()

static BOOL tsg_ndr_read_packet_response ( wLog *  log,
wStream s,
UINT32 *  index,
TSG_PACKET_RESPONSE *  response 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_ndr_read_quarenc_data()

static BOOL tsg_ndr_read_quarenc_data ( wLog *  log,
wStream s,
UINT32 *  index,
TSG_PACKET_QUARENC_RESPONSE *  quarenc 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_ndr_read_quarenc_response()

static BOOL tsg_ndr_read_quarenc_response ( wLog *  log,
wStream s,
UINT32 *  index,
TSG_PACKET_QUARENC_RESPONSE *  quarenc 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_ndr_read_string()

static BOOL tsg_ndr_read_string ( wLog *  log,
wStream s,
WCHAR **  str,
UINT32  lengthInBytes 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_ndr_read_tsg_caps()

static BOOL tsg_ndr_read_tsg_caps ( wLog *  log,
wStream s,
TSG_PACKET_CAPABILITIES *  caps 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_ndr_read_tunnel_context()

static BOOL tsg_ndr_read_tunnel_context ( wLog *  log,
wStream s,
CONTEXT_HANDLE tunnelContext,
UINT32 *  tunnelId 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_ndr_read_version_caps()

static BOOL tsg_ndr_read_version_caps ( wLog *  log,
wStream s,
UINT32 *  index,
TSG_PACKET_VERSIONCAPS *  caps 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_ndr_write_auth()

static BOOL tsg_ndr_write_auth ( wLog *  log,
wStream s,
UINT32 *  index,
const TSG_PACKET_AUTH *  auth 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_ndr_write_nap()

static BOOL tsg_ndr_write_nap ( wLog *  log,
wStream s,
const TSG_CAPABILITY_NAP *  nap 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_ndr_write_packet_header()

static BOOL tsg_ndr_write_packet_header ( wLog *  log,
wStream s,
const TSG_PACKET_HEADER *  header 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_ndr_write_reauth()

static BOOL tsg_ndr_write_reauth ( wLog *  log,
wStream s,
UINT32 *  index,
const TSG_PACKET_REAUTH *  auth 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_ndr_write_string()

static BOOL tsg_ndr_write_string ( wLog *  log,
wStream s,
const WCHAR *  str,
UINT32  length 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_ndr_write_tsg_caps()

static BOOL tsg_ndr_write_tsg_caps ( wLog *  log,
wStream s,
const TSG_PACKET_CAPABILITIES *  caps 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_ndr_write_version_caps()

static BOOL tsg_ndr_write_version_caps ( wLog *  log,
wStream s,
UINT32 *  index,
const TSG_PACKET_VERSIONCAPS *  caps 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_new()

rdpTsg* tsg_new ( rdpTransport *  transport)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_packet_auth_to_string()

static BOOL tsg_packet_auth_to_string ( char **  buffer,
size_t *  length,
const TSG_PACKET_AUTH *  caps 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_packet_capabilities_to_string()

static BOOL tsg_packet_capabilities_to_string ( char **  buffer,
size_t *  length,
const TSG_PACKET_CAPABILITIES *  caps,
UINT32  numCaps 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_packet_caps_response_to_string()

static BOOL tsg_packet_caps_response_to_string ( char **  buffer,
size_t *  length,
const TSG_PACKET_CAPS_RESPONSE *  caps 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_packet_header_to_string()

static BOOL tsg_packet_header_to_string ( char **  buffer,
size_t *  length,
const TSG_PACKET_HEADER *  header 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_packet_id_to_string()

static const char* tsg_packet_id_to_string ( UINT32  packetId)
static
Here is the caller graph for this function:

◆ tsg_packet_message_request_to_string()

static BOOL tsg_packet_message_request_to_string ( char **  buffer,
size_t *  length,
const TSG_PACKET_MSG_REQUEST *  caps 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_packet_message_response_to_string()

static BOOL tsg_packet_message_response_to_string ( char **  buffer,
size_t *  length,
const TSG_PACKET_MSG_RESPONSE *  caps 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_packet_quarconfigrequest_to_string()

static BOOL tsg_packet_quarconfigrequest_to_string ( char **  buffer,
size_t *  length,
const TSG_PACKET_QUARCONFIGREQUEST *  caps 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_packet_quarenc_response_to_string()

static BOOL tsg_packet_quarenc_response_to_string ( char **  buffer,
size_t *  length,
const TSG_PACKET_QUARENC_RESPONSE *  caps 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_packet_quarrequest_to_string()

static BOOL tsg_packet_quarrequest_to_string ( char **  buffer,
size_t *  length,
const TSG_PACKET_QUARREQUEST *  caps 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_packet_reauth_to_string()

static BOOL tsg_packet_reauth_to_string ( char **  buffer,
size_t *  length,
const TSG_PACKET_REAUTH *  caps 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_packet_response_to_string()

static BOOL tsg_packet_response_to_string ( char **  buffer,
size_t *  length,
const TSG_PACKET_RESPONSE *  caps 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_packet_to_string()

static const char* tsg_packet_to_string ( const TSG_PACKET *  packet)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_packet_versioncaps_to_string()

static BOOL tsg_packet_versioncaps_to_string ( char **  buffer,
size_t *  length,
const TSG_PACKET_VERSIONCAPS *  caps 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_print()

static BOOL tsg_print ( char **  buffer,
size_t *  len,
WINPR_FORMAT_ARG const char *  fmt,
  ... 
)
static
Here is the caller graph for this function:

◆ tsg_proxy_begin()

BOOL tsg_proxy_begin ( rdpTsg *  tsg)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_proxy_reauth()

static BOOL tsg_proxy_reauth ( rdpTsg *  tsg)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_read()

static int tsg_read ( rdpTsg *  tsg,
BYTE data,
size_t  length 
)
static

Read data from TSG.

Parameters
[in]tsgThe TSG instance to read from
[in]dataA pointer to the data buffer
[in]lengthlength of data
Returns
< 0 on error; 0 if not enough data is available (non blocking mode); > 0 bytes to read
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_recv_pdu()

BOOL tsg_recv_pdu ( rdpTsg *  tsg,
const RPC_PDU pdu 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_redir_to_flags()

static UINT32 tsg_redir_to_flags ( const TSG_REDIRECTION_FLAGS *  redirect)
static
Here is the caller graph for this function:

◆ tsg_redirect_apply()

static BOOL tsg_redirect_apply ( rdpTsg *  tsg,
const TSG_REDIRECTION_FLAGS *  redirect 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_redirection_flags_to_string()

static const char* tsg_redirection_flags_to_string ( char *  buffer,
size_t  size,
const TSG_REDIRECTION_FLAGS *  flags 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_set_hostname()

static BOOL tsg_set_hostname ( rdpTsg *  tsg,
const char *  hostname 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_set_machine_name()

static BOOL tsg_set_machine_name ( rdpTsg *  tsg,
const char *  machineName 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_set_state()

BOOL tsg_set_state ( rdpTsg *  tsg,
TSG_STATE  state 
)
Here is the caller graph for this function:

◆ tsg_state_to_string()

static const char* tsg_state_to_string ( TSG_STATE  state)
static
Here is the caller graph for this function:

◆ tsg_stream_align()

static BOOL tsg_stream_align ( wLog *  log,
wStream s,
size_t  align 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_transition_to_state()

static BOOL tsg_transition_to_state ( rdpTsg *  tsg,
TSG_STATE  state 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_type_capability_nap_to_string()

static BOOL tsg_type_capability_nap_to_string ( char **  buffer,
size_t *  length,
const TSG_CAPABILITY_NAP *  cur 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsg_write()

static int tsg_write ( rdpTsg *  tsg,
const BYTE data,
UINT32  length 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TsProxyAuthorizeTunnelReadResponse()

static BOOL TsProxyAuthorizeTunnelReadResponse ( rdpTsg *  tsg,
const RPC_PDU pdu 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TsProxyAuthorizeTunnelWriteRequest()

static BOOL TsProxyAuthorizeTunnelWriteRequest ( rdpTsg *  tsg,
CONTEXT_HANDLE tunnelContext 
)
static

OpNum = 2

HRESULT TsProxyAuthorizeTunnel( [in] PTUNNEL_CONTEXT_HANDLE_NOSERIALIZE tunnelContext, [in, ref] TSG_PACKET* tsgPacket, [out, ref] TSG_PACKET** tsgPacketResponse );

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

◆ TsProxyCloseChannelReadResponse()

static BOOL TsProxyCloseChannelReadResponse ( wLog *  log,
const RPC_PDU pdu,
CONTEXT_HANDLE context 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TsProxyCloseChannelWriteRequest()

static BOOL TsProxyCloseChannelWriteRequest ( rdpTsg *  tsg,
CONTEXT_HANDLE context 
)
static

HRESULT TsProxyCloseChannel( [in, out] PCHANNEL_CONTEXT_HANDLE_NOSERIALIZE* context );

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

◆ TsProxyCloseTunnelReadResponse()

static BOOL TsProxyCloseTunnelReadResponse ( wLog *  log,
const RPC_PDU pdu,
CONTEXT_HANDLE context 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TsProxyCloseTunnelWriteRequest()

static BOOL TsProxyCloseTunnelWriteRequest ( rdpTsg *  tsg,
const CONTEXT_HANDLE context 
)
static

HRESULT TsProxyCloseTunnel( [in, out] PTUNNEL_CONTEXT_HANDLE_SERIALIZE* context );

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

◆ TsProxyCreateChannelReadResponse()

static BOOL TsProxyCreateChannelReadResponse ( wLog *  log,
const RPC_PDU pdu,
CONTEXT_HANDLE channelContext,
UINT32 *  channelId 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TsProxyCreateChannelWriteRequest()

static BOOL TsProxyCreateChannelWriteRequest ( rdpTsg *  tsg,
CONTEXT_HANDLE tunnelContext 
)
static

OpNum = 4

HRESULT TsProxyCreateChannel( [in] PTUNNEL_CONTEXT_HANDLE_NOSERIALIZE tunnelContext, [in, ref] PTSENDPOINTINFO tsEndPointInfo, [out] PCHANNEL_CONTEXT_HANDLE_SERIALIZE* channelContext, [out] unsigned long* channelId );

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

◆ TsProxyCreateTunnelReadResponse()

static BOOL TsProxyCreateTunnelReadResponse ( rdpTsg *  tsg,
const RPC_PDU pdu,
CONTEXT_HANDLE tunnelContext,
UINT32 *  tunnelId 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TsProxyCreateTunnelWriteRequest()

static BOOL TsProxyCreateTunnelWriteRequest ( rdpTsg *  tsg,
const TSG_PACKET *  tsgPacket 
)
static

OpNum = 1

HRESULT TsProxyCreateTunnel( [in, ref] TSG_PACKET* tsgPacket, [out, ref] TSG_PACKET** tsgPacketResponse, [out] PTUNNEL_CONTEXT_HANDLE_SERIALIZE* tunnelContext, [out] unsigned long* tunnelId );

The following 60-byte structure is apparently undocumented, but parts of it can be matched to known C706 data structures.

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

◆ TsProxyMakeTunnelCallReadResponse()

static BOOL TsProxyMakeTunnelCallReadResponse ( rdpTsg *  tsg,
const RPC_PDU pdu 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TsProxyMakeTunnelCallWriteRequest()

static BOOL TsProxyMakeTunnelCallWriteRequest ( rdpTsg *  tsg,
CONTEXT_HANDLE tunnelContext,
UINT32  procId 
)
static

OpNum = 3

HRESULT TsProxyMakeTunnelCall( [in] PTUNNEL_CONTEXT_HANDLE_NOSERIALIZE tunnelContext, [in] unsigned long procId, [in, ref] TSG_PACKET* tsgPacket, [out, ref] TSG_PACKET** tsgPacketResponse );

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

◆ TsProxyReadPacketSTringMessage()

static BOOL TsProxyReadPacketSTringMessage ( rdpTsg *  tsg,
wStream s,
TSG_PACKET_STRING_MESSAGE *  msg 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TsProxyReadTunnelContext()

static BOOL TsProxyReadTunnelContext ( wLog *  log,
wStream s,
CONTEXT_HANDLE tunnelContext 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TsProxySendToServer()

static int TsProxySendToServer ( handle_t  IDL_handle,
const byte  pRpcMessage[],
UINT32  count,
const UINT32 *  lengths 
)
static

RPC Functions: http://msdn.microsoft.com/en-us/library/windows/desktop/aa378623/ Remote Procedure Call: http://msdn.microsoft.com/en-us/library/windows/desktop/aa378651/ RPC NDR Interface Reference: http://msdn.microsoft.com/en-us/library/windows/desktop/hh802752/ call sequence with silent reauth:

TsProxyCreateTunnelRequest() TsProxyCreateTunnelResponse(TunnelContext) TsProxyAuthorizeTunnelRequest(TunnelContext) TsProxyAuthorizeTunnelResponse() TsProxyMakeTunnelCallRequest(TunnelContext) TsProxyCreateChannelRequest(TunnelContext) TsProxyCreateChannelResponse(ChannelContext) TsProxySetupReceivePipeRequest(ChannelContext) TsProxySendToServerRequest(ChannelContext)

...

TsProxyMakeTunnelCallResponse(reauth) TsProxyCreateTunnelRequest() TsProxyMakeTunnelCallRequest(TunnelContext) TsProxyCreateTunnelResponse(NewTunnelContext) TsProxyAuthorizeTunnelRequest(NewTunnelContext) TsProxyAuthorizeTunnelResponse() TsProxyCreateChannelRequest(NewTunnelContext) TsProxyCreateChannelResponse(NewChannelContext) TsProxyCloseChannelRequest(NewChannelContext) TsProxyCloseTunnelRequest(NewTunnelContext) TsProxyCloseChannelResponse(NullChannelContext) TsProxyCloseTunnelResponse(NullTunnelContext) TsProxySendToServerRequest(ChannelContext)

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