FreeRDP
rdg.c File Reference
#include <assert.h>
#include <winpr/crt.h>
#include <winpr/synch.h>
#include <winpr/print.h>
#include <winpr/stream.h>
#include <winpr/winsock.h>
#include <freerdp/log.h>
#include <freerdp/error.h>
#include <freerdp/utils/ringbuffer.h>
#include "rdg.h"
#include "../proxy.h"
#include "../rdp.h"
#include "../../crypto/opensslcompat.h"
#include "rpc_fault.h"

Macros

#define TAG   FREERDP_TAG("core.gateway.rdg")
 
#define HTTP_CHANNEL_RESPONSE_FIELD_CHANNELID   0x1
 
#define HTTP_CHANNEL_RESPONSE_OPTIONAL   0x2
 
#define HTTP_CHANNEL_RESPONSE_FIELD_UDPPORT   0x4
 
#define HTTP_EXTENDED_AUTH_NONE   0x0
 
#define HTTP_EXTENDED_AUTH_SC   0x1 /* Smart card authentication. */
 
#define HTTP_EXTENDED_AUTH_PAA   0x02 /* Pluggable authentication. */
 
#define HTTP_EXTENDED_AUTH_SSPI_NTLM   0x04 /* NTLM extended authentication. */
 
#define PKT_TYPE_HANDSHAKE_REQUEST   0x1
 
#define PKT_TYPE_HANDSHAKE_RESPONSE   0x2
 
#define PKT_TYPE_EXTENDED_AUTH_MSG   0x3
 
#define PKT_TYPE_TUNNEL_CREATE   0x4
 
#define PKT_TYPE_TUNNEL_RESPONSE   0x5
 
#define PKT_TYPE_TUNNEL_AUTH   0x6
 
#define PKT_TYPE_TUNNEL_AUTH_RESPONSE   0x7
 
#define PKT_TYPE_CHANNEL_CREATE   0x8
 
#define PKT_TYPE_CHANNEL_RESPONSE   0x9
 
#define PKT_TYPE_DATA   0xA
 
#define PKT_TYPE_SERVICE_MESSAGE   0xB
 
#define PKT_TYPE_REAUTH_MESSAGE   0xC
 
#define PKT_TYPE_KEEPALIVE   0xD
 
#define PKT_TYPE_CLOSE_CHANNEL   0x10
 
#define PKT_TYPE_CLOSE_CHANNEL_RESPONSE   0x11
 
#define HTTP_TUNNEL_AUTH_FIELD_SOH   0x1
 
#define HTTP_TUNNEL_AUTH_RESPONSE_FIELD_REDIR_FLAGS   0x1
 
#define HTTP_TUNNEL_AUTH_RESPONSE_FIELD_IDLE_TIMEOUT   0x2
 
#define HTTP_TUNNEL_AUTH_RESPONSE_FIELD_SOH_RESPONSE   0x4
 
#define HTTP_TUNNEL_PACKET_FIELD_PAA_COOKIE   0x1
 
#define HTTP_TUNNEL_PACKET_FIELD_REAUTH   0x2
 
#define HTTP_TUNNEL_REDIR_ENABLE_ALL   0x80000000
 
#define HTTP_TUNNEL_REDIR_DISABLE_ALL   0x40000000
 
#define HTTP_TUNNEL_REDIR_DISABLE_DRIVE   0x1
 
#define HTTP_TUNNEL_REDIR_DISABLE_PRINTER   0x2
 
#define HTTP_TUNNEL_REDIR_DISABLE_PORT   0x4
 
#define HTTP_TUNNEL_REDIR_DISABLE_CLIPBOARD   0x8
 
#define HTTP_TUNNEL_REDIR_DISABLE_PNP   0x10
 
#define HTTP_TUNNEL_RESPONSE_FIELD_TUNNEL_ID   0x1
 
#define HTTP_TUNNEL_RESPONSE_FIELD_CAPS   0x2
 
#define HTTP_TUNNEL_RESPONSE_FIELD_SOH_REQ   0x4
 
#define HTTP_TUNNEL_RESPONSE_FIELD_CONSENT_MSG   0x10
 
#define HTTP_CAPABILITY_TYPE_QUAR_SOH   0x1
 
#define HTTP_CAPABILITY_IDLE_TIMEOUT   0x2
 
#define HTTP_CAPABILITY_MESSAGING_CONSENT_SIGN   0x4
 
#define HTTP_CAPABILITY_MESSAGING_SERVICE_MSG   0x8
 
#define HTTP_CAPABILITY_REAUTH   0x10
 
#define HTTP_CAPABILITY_UDP_TRANSPORT   0x20
 

Enumerations

enum  {
  RDG_CLIENT_STATE_INITIAL, RDG_CLIENT_STATE_HANDSHAKE, RDG_CLIENT_STATE_TUNNEL_CREATE, RDG_CLIENT_STATE_TUNNEL_AUTHORIZE,
  RDG_CLIENT_STATE_CHANNEL_CREATE, RDG_CLIENT_STATE_OPENED
}
 

Functions

static const char * flags_to_string (UINT32 flags, const t_flag_mapping *map, size_t elements)
 
static const char * channel_response_fields_present_to_string (UINT16 fieldsPresent)
 
static const char * tunnel_response_fields_present_to_string (UINT16 fieldsPresent)
 
static const char * tunnel_authorization_response_fields_present_to_string (UINT16 fieldsPresent)
 
static const char * extended_auth_to_string (UINT16 auth)
 
static const char * capabilities_enum_to_string (UINT32 capabilities)
 
static BOOL rdg_read_http_unicode_string (wStream *s, const WCHAR **string, UINT16 *lengthInBytes)
 
static BOOL rdg_write_packet (rdpRdg *rdg, wStream *sPacket)
 
static BOOL rdg_read_all (rdpTls *tls, BYTE *buffer, int size)
 
static wStream * rdg_receive_packet (rdpRdg *rdg)
 
static BOOL rdg_send_handshake (rdpRdg *rdg)
 
static BOOL rdg_send_tunnel_request (rdpRdg *rdg)
 
static BOOL rdg_send_tunnel_authorization (rdpRdg *rdg)
 
static BOOL rdg_send_channel_create (rdpRdg *rdg)
 
static BOOL rdg_set_ntlm_auth_header (rdpNtlm *ntlm, HttpRequest *request)
 
static wStream * rdg_build_http_request (rdpRdg *rdg, const char *method, const char *transferEncoding)
 
static BOOL rdg_handle_ntlm_challenge (rdpNtlm *ntlm, HttpResponse *response)
 
static BOOL rdg_skip_seed_payload (rdpTls *tls, SSIZE_T lastResponseLength)
 
static BOOL rdg_process_handshake_response (rdpRdg *rdg, wStream *s)
 
static BOOL rdg_process_tunnel_response_optional (rdpRdg *rdg, wStream *s, UINT16 fieldsPresent)
 
static BOOL rdg_process_tunnel_response (rdpRdg *rdg, wStream *s)
 
static BOOL rdg_process_tunnel_authorization_response (rdpRdg *rdg, wStream *s)
 
static BOOL rdg_process_channel_response (rdpRdg *rdg, wStream *s)
 
static BOOL rdg_process_packet (rdpRdg *rdg, wStream *s)
 
DWORD rdg_get_event_handles (rdpRdg *rdg, HANDLE *events, DWORD count)
 
static BOOL rdg_get_gateway_credentials (rdpContext *context)
 
static BOOL rdg_ntlm_init (rdpRdg *rdg, rdpTls *tls)
 
static BOOL rdg_send_http_request (rdpRdg *rdg, rdpTls *tls, const char *method, const char *transferEncoding)
 
static BOOL rdg_tls_connect (rdpRdg *rdg, rdpTls *tls, const char *peerAddress, int timeout)
 
static BOOL rdg_establish_data_connection (rdpRdg *rdg, rdpTls *tls, const char *method, const char *peerAddress, int timeout, BOOL *rpcFallback)
 
static BOOL rdg_tunnel_connect (rdpRdg *rdg)
 
BOOL rdg_connect (rdpRdg *rdg, DWORD timeout, BOOL *rpcFallback)
 
static int rdg_write_data_packet (rdpRdg *rdg, const BYTE *buf, int isize)
 
static BOOL rdg_process_close_packet (rdpRdg *rdg)
 
static BOOL rdg_process_keep_alive_packet (rdpRdg *rdg)
 
static BOOL rdg_process_service_message (rdpRdg *rdg, wStream *s)
 
static BOOL rdg_process_unknown_packet (rdpRdg *rdg, int type)
 
static BOOL rdg_process_control_packet (rdpRdg *rdg, int type, size_t packetLength)
 
static int rdg_read_data_packet (rdpRdg *rdg, BYTE *buffer, int size)
 
static int rdg_bio_write (BIO *bio, const char *buf, int num)
 
static int rdg_bio_read (BIO *bio, char *buf, int size)
 
static int rdg_bio_puts (BIO *bio, const char *str)
 
static int rdg_bio_gets (BIO *bio, char *str, int size)
 
static long rdg_bio_ctrl (BIO *bio, int cmd, long arg1, void *arg2)
 
static int rdg_bio_new (BIO *bio)
 
static int rdg_bio_free (BIO *bio)
 
static BIO_METHOD * BIO_s_rdg (void)
 
rdpRdg * rdg_new (rdpContext *context)
 
void rdg_free (rdpRdg *rdg)
 
BIO * rdg_get_front_bio_and_take_ownership (rdpRdg *rdg)
 

Variables

static const t_flag_mapping tunnel_response_fields_present []
 
static const t_flag_mapping channel_response_fields_present []
 
static const t_flag_mapping tunnel_authorization_response_fields_present []
 
static const t_flag_mapping extended_auth []
 
static const t_flag_mapping capabilities_enum []
 

Macro Definition Documentation

◆ HTTP_CAPABILITY_IDLE_TIMEOUT

#define HTTP_CAPABILITY_IDLE_TIMEOUT   0x2

◆ HTTP_CAPABILITY_MESSAGING_CONSENT_SIGN

#define HTTP_CAPABILITY_MESSAGING_CONSENT_SIGN   0x4

◆ HTTP_CAPABILITY_MESSAGING_SERVICE_MSG

#define HTTP_CAPABILITY_MESSAGING_SERVICE_MSG   0x8

◆ HTTP_CAPABILITY_REAUTH

#define HTTP_CAPABILITY_REAUTH   0x10

◆ HTTP_CAPABILITY_TYPE_QUAR_SOH

#define HTTP_CAPABILITY_TYPE_QUAR_SOH   0x1

◆ HTTP_CAPABILITY_UDP_TRANSPORT

#define HTTP_CAPABILITY_UDP_TRANSPORT   0x20

◆ HTTP_CHANNEL_RESPONSE_FIELD_CHANNELID

#define HTTP_CHANNEL_RESPONSE_FIELD_CHANNELID   0x1

◆ HTTP_CHANNEL_RESPONSE_FIELD_UDPPORT

#define HTTP_CHANNEL_RESPONSE_FIELD_UDPPORT   0x4

◆ HTTP_CHANNEL_RESPONSE_OPTIONAL

#define HTTP_CHANNEL_RESPONSE_OPTIONAL   0x2

◆ HTTP_EXTENDED_AUTH_NONE

#define HTTP_EXTENDED_AUTH_NONE   0x0

◆ HTTP_EXTENDED_AUTH_PAA

#define HTTP_EXTENDED_AUTH_PAA   0x02 /* Pluggable authentication. */

◆ HTTP_EXTENDED_AUTH_SC

#define HTTP_EXTENDED_AUTH_SC   0x1 /* Smart card authentication. */

◆ HTTP_EXTENDED_AUTH_SSPI_NTLM

#define HTTP_EXTENDED_AUTH_SSPI_NTLM   0x04 /* NTLM extended authentication. */

◆ HTTP_TUNNEL_AUTH_FIELD_SOH

#define HTTP_TUNNEL_AUTH_FIELD_SOH   0x1

◆ HTTP_TUNNEL_AUTH_RESPONSE_FIELD_IDLE_TIMEOUT

#define HTTP_TUNNEL_AUTH_RESPONSE_FIELD_IDLE_TIMEOUT   0x2

◆ HTTP_TUNNEL_AUTH_RESPONSE_FIELD_REDIR_FLAGS

#define HTTP_TUNNEL_AUTH_RESPONSE_FIELD_REDIR_FLAGS   0x1

◆ HTTP_TUNNEL_AUTH_RESPONSE_FIELD_SOH_RESPONSE

#define HTTP_TUNNEL_AUTH_RESPONSE_FIELD_SOH_RESPONSE   0x4

◆ HTTP_TUNNEL_PACKET_FIELD_PAA_COOKIE

#define HTTP_TUNNEL_PACKET_FIELD_PAA_COOKIE   0x1

◆ HTTP_TUNNEL_PACKET_FIELD_REAUTH

#define HTTP_TUNNEL_PACKET_FIELD_REAUTH   0x2

◆ HTTP_TUNNEL_REDIR_DISABLE_ALL

#define HTTP_TUNNEL_REDIR_DISABLE_ALL   0x40000000

◆ HTTP_TUNNEL_REDIR_DISABLE_CLIPBOARD

#define HTTP_TUNNEL_REDIR_DISABLE_CLIPBOARD   0x8

◆ HTTP_TUNNEL_REDIR_DISABLE_DRIVE

#define HTTP_TUNNEL_REDIR_DISABLE_DRIVE   0x1

◆ HTTP_TUNNEL_REDIR_DISABLE_PNP

#define HTTP_TUNNEL_REDIR_DISABLE_PNP   0x10

◆ HTTP_TUNNEL_REDIR_DISABLE_PORT

#define HTTP_TUNNEL_REDIR_DISABLE_PORT   0x4

◆ HTTP_TUNNEL_REDIR_DISABLE_PRINTER

#define HTTP_TUNNEL_REDIR_DISABLE_PRINTER   0x2

◆ HTTP_TUNNEL_REDIR_ENABLE_ALL

#define HTTP_TUNNEL_REDIR_ENABLE_ALL   0x80000000

◆ HTTP_TUNNEL_RESPONSE_FIELD_CAPS

#define HTTP_TUNNEL_RESPONSE_FIELD_CAPS   0x2

◆ HTTP_TUNNEL_RESPONSE_FIELD_CONSENT_MSG

#define HTTP_TUNNEL_RESPONSE_FIELD_CONSENT_MSG   0x10

◆ HTTP_TUNNEL_RESPONSE_FIELD_SOH_REQ

#define HTTP_TUNNEL_RESPONSE_FIELD_SOH_REQ   0x4

◆ HTTP_TUNNEL_RESPONSE_FIELD_TUNNEL_ID

#define HTTP_TUNNEL_RESPONSE_FIELD_TUNNEL_ID   0x1

◆ PKT_TYPE_CHANNEL_CREATE

#define PKT_TYPE_CHANNEL_CREATE   0x8

◆ PKT_TYPE_CHANNEL_RESPONSE

#define PKT_TYPE_CHANNEL_RESPONSE   0x9

◆ PKT_TYPE_CLOSE_CHANNEL

#define PKT_TYPE_CLOSE_CHANNEL   0x10

◆ PKT_TYPE_CLOSE_CHANNEL_RESPONSE

#define PKT_TYPE_CLOSE_CHANNEL_RESPONSE   0x11

◆ PKT_TYPE_DATA

#define PKT_TYPE_DATA   0xA

◆ PKT_TYPE_EXTENDED_AUTH_MSG

#define PKT_TYPE_EXTENDED_AUTH_MSG   0x3

◆ PKT_TYPE_HANDSHAKE_REQUEST

#define PKT_TYPE_HANDSHAKE_REQUEST   0x1

◆ PKT_TYPE_HANDSHAKE_RESPONSE

#define PKT_TYPE_HANDSHAKE_RESPONSE   0x2

◆ PKT_TYPE_KEEPALIVE

#define PKT_TYPE_KEEPALIVE   0xD

◆ PKT_TYPE_REAUTH_MESSAGE

#define PKT_TYPE_REAUTH_MESSAGE   0xC

◆ PKT_TYPE_SERVICE_MESSAGE

#define PKT_TYPE_SERVICE_MESSAGE   0xB

◆ PKT_TYPE_TUNNEL_AUTH

#define PKT_TYPE_TUNNEL_AUTH   0x6

◆ PKT_TYPE_TUNNEL_AUTH_RESPONSE

#define PKT_TYPE_TUNNEL_AUTH_RESPONSE   0x7

◆ PKT_TYPE_TUNNEL_CREATE

#define PKT_TYPE_TUNNEL_CREATE   0x4

◆ PKT_TYPE_TUNNEL_RESPONSE

#define PKT_TYPE_TUNNEL_RESPONSE   0x5

◆ TAG

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

FreeRDP: A Remote Desktop Protocol Implementation Remote Desktop Gateway (RDG)

Copyright 2015 Denis Vincent dvinc.nosp@m.ent@.nosp@m.devol.nosp@m.utio.nosp@m.ns.ne.nosp@m.t

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.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
RDG_CLIENT_STATE_INITIAL 
RDG_CLIENT_STATE_HANDSHAKE 
RDG_CLIENT_STATE_TUNNEL_CREATE 
RDG_CLIENT_STATE_TUNNEL_AUTHORIZE 
RDG_CLIENT_STATE_CHANNEL_CREATE 
RDG_CLIENT_STATE_OPENED 

Function Documentation

◆ BIO_s_rdg()

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

◆ capabilities_enum_to_string()

static const char* capabilities_enum_to_string ( UINT32  capabilities)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ channel_response_fields_present_to_string()

static const char* channel_response_fields_present_to_string ( UINT16  fieldsPresent)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ extended_auth_to_string()

static const char* extended_auth_to_string ( UINT16  auth)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ flags_to_string()

static const char* flags_to_string ( UINT32  flags,
const t_flag_mapping *  map,
size_t  elements 
)
static
Here is the caller graph for this function:

◆ rdg_bio_ctrl()

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

◆ rdg_bio_free()

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

◆ rdg_bio_gets()

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

◆ rdg_bio_new()

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

◆ rdg_bio_puts()

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

◆ rdg_bio_read()

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

◆ rdg_bio_write()

static int rdg_bio_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:

◆ rdg_build_http_request()

static wStream* rdg_build_http_request ( rdpRdg *  rdg,
const char *  method,
const char *  transferEncoding 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdg_connect()

BOOL rdg_connect ( rdpRdg *  rdg,
DWORD  timeout,
BOOL *  rpcFallback 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdg_establish_data_connection()

static BOOL rdg_establish_data_connection ( rdpRdg *  rdg,
rdpTls *  tls,
const char *  method,
const char *  peerAddress,
int  timeout,
BOOL *  rpcFallback 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdg_free()

void rdg_free ( rdpRdg *  rdg)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdg_get_event_handles()

DWORD rdg_get_event_handles ( rdpRdg *  rdg,
HANDLE *  events,
DWORD  count 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdg_get_front_bio_and_take_ownership()

BIO* rdg_get_front_bio_and_take_ownership ( rdpRdg *  rdg)
Here is the caller graph for this function:

◆ rdg_get_gateway_credentials()

static BOOL rdg_get_gateway_credentials ( rdpContext *  context)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdg_handle_ntlm_challenge()

static BOOL rdg_handle_ntlm_challenge ( rdpNtlm *  ntlm,
HttpResponse *  response 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdg_new()

rdpRdg* rdg_new ( rdpContext *  context)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdg_ntlm_init()

static BOOL rdg_ntlm_init ( rdpRdg *  rdg,
rdpTls *  tls 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdg_process_channel_response()

static BOOL rdg_process_channel_response ( rdpRdg *  rdg,
wStream *  s 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdg_process_close_packet()

static BOOL rdg_process_close_packet ( rdpRdg *  rdg)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdg_process_control_packet()

static BOOL rdg_process_control_packet ( rdpRdg *  rdg,
int  type,
size_t  packetLength 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdg_process_handshake_response()

static BOOL rdg_process_handshake_response ( rdpRdg *  rdg,
wStream *  s 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdg_process_keep_alive_packet()

static BOOL rdg_process_keep_alive_packet ( rdpRdg *  rdg)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdg_process_packet()

static BOOL rdg_process_packet ( rdpRdg *  rdg,
wStream *  s 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdg_process_service_message()

static BOOL rdg_process_service_message ( rdpRdg *  rdg,
wStream *  s 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdg_process_tunnel_authorization_response()

static BOOL rdg_process_tunnel_authorization_response ( rdpRdg *  rdg,
wStream *  s 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdg_process_tunnel_response()

static BOOL rdg_process_tunnel_response ( rdpRdg *  rdg,
wStream *  s 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdg_process_tunnel_response_optional()

static BOOL rdg_process_tunnel_response_optional ( rdpRdg *  rdg,
wStream *  s,
UINT16  fieldsPresent 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdg_process_unknown_packet()

static BOOL rdg_process_unknown_packet ( rdpRdg *  rdg,
int  type 
)
static
Here is the caller graph for this function:

◆ rdg_read_all()

static BOOL rdg_read_all ( rdpTls *  tls,
BYTE buffer,
int  size 
)
static
Here is the caller graph for this function:

◆ rdg_read_data_packet()

static int rdg_read_data_packet ( rdpRdg *  rdg,
BYTE buffer,
int  size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdg_read_http_unicode_string()

static BOOL rdg_read_http_unicode_string ( wStream *  s,
const WCHAR **  string,
UINT16 lengthInBytes 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdg_receive_packet()

static wStream* rdg_receive_packet ( rdpRdg *  rdg)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdg_send_channel_create()

static BOOL rdg_send_channel_create ( rdpRdg *  rdg)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdg_send_handshake()

static BOOL rdg_send_handshake ( rdpRdg *  rdg)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdg_send_http_request()

static BOOL rdg_send_http_request ( rdpRdg *  rdg,
rdpTls *  tls,
const char *  method,
const char *  transferEncoding 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdg_send_tunnel_authorization()

static BOOL rdg_send_tunnel_authorization ( rdpRdg *  rdg)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdg_send_tunnel_request()

static BOOL rdg_send_tunnel_request ( rdpRdg *  rdg)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdg_set_ntlm_auth_header()

static BOOL rdg_set_ntlm_auth_header ( rdpNtlm *  ntlm,
HttpRequest *  request 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdg_skip_seed_payload()

static BOOL rdg_skip_seed_payload ( rdpTls *  tls,
SSIZE_T  lastResponseLength 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdg_tls_connect()

static BOOL rdg_tls_connect ( rdpRdg *  rdg,
rdpTls *  tls,
const char *  peerAddress,
int  timeout 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdg_tunnel_connect()

static BOOL rdg_tunnel_connect ( rdpRdg *  rdg)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdg_write_data_packet()

static int rdg_write_data_packet ( rdpRdg *  rdg,
const BYTE buf,
int  isize 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdg_write_packet()

static BOOL rdg_write_packet ( rdpRdg *  rdg,
wStream *  sPacket 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tunnel_authorization_response_fields_present_to_string()

static const char* tunnel_authorization_response_fields_present_to_string ( UINT16  fieldsPresent)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tunnel_response_fields_present_to_string()

static const char* tunnel_response_fields_present_to_string ( UINT16  fieldsPresent)
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ capabilities_enum

const t_flag_mapping capabilities_enum[]
static
Initial value:
= {
{ HTTP_CAPABILITY_TYPE_QUAR_SOH, "HTTP_CAPABILITY_TYPE_QUAR_SOH" },
{ HTTP_CAPABILITY_IDLE_TIMEOUT, "HTTP_CAPABILITY_IDLE_TIMEOUT" },
{ HTTP_CAPABILITY_MESSAGING_CONSENT_SIGN, "HTTP_CAPABILITY_MESSAGING_CONSENT_SIGN" },
{ HTTP_CAPABILITY_MESSAGING_SERVICE_MSG, "HTTP_CAPABILITY_MESSAGING_SERVICE_MSG" },
{ HTTP_CAPABILITY_REAUTH, "HTTP_CAPABILITY_REAUTH" },
{ HTTP_CAPABILITY_UDP_TRANSPORT, "HTTP_CAPABILITY_UDP_TRANSPORT" }
}

◆ channel_response_fields_present

const t_flag_mapping channel_response_fields_present[]
static
Initial value:
= {
{ HTTP_CHANNEL_RESPONSE_FIELD_CHANNELID, "HTTP_CHANNEL_RESPONSE_FIELD_CHANNELID" },
{ HTTP_CHANNEL_RESPONSE_OPTIONAL, "HTTP_CHANNEL_RESPONSE_OPTIONAL" },
{ HTTP_CHANNEL_RESPONSE_FIELD_UDPPORT, "HTTP_CHANNEL_RESPONSE_FIELD_UDPPORT" }
}

◆ extended_auth

const t_flag_mapping extended_auth[]
static
Initial value:
= {
{ HTTP_EXTENDED_AUTH_NONE, "HTTP_EXTENDED_AUTH_NONE" },
{ HTTP_EXTENDED_AUTH_SC, "HTTP_EXTENDED_AUTH_SC" },
{ HTTP_EXTENDED_AUTH_PAA, "HTTP_EXTENDED_AUTH_PAA" },
{ HTTP_EXTENDED_AUTH_SSPI_NTLM, "HTTP_EXTENDED_AUTH_SSPI_NTLM" }
}

◆ tunnel_authorization_response_fields_present

const t_flag_mapping tunnel_authorization_response_fields_present[]
static
Initial value:
= {
{ HTTP_TUNNEL_AUTH_RESPONSE_FIELD_REDIR_FLAGS, "HTTP_TUNNEL_AUTH_RESPONSE_FIELD_REDIR_FLAGS" },
"HTTP_TUNNEL_AUTH_RESPONSE_FIELD_IDLE_TIMEOUT" },
"HTTP_TUNNEL_AUTH_RESPONSE_FIELD_SOH_RESPONSE" }
}

◆ tunnel_response_fields_present

const t_flag_mapping tunnel_response_fields_present[]
static
Initial value:
= {
{ HTTP_TUNNEL_RESPONSE_FIELD_TUNNEL_ID, "HTTP_TUNNEL_RESPONSE_FIELD_TUNNEL_ID" },
{ HTTP_TUNNEL_RESPONSE_FIELD_CAPS, "HTTP_TUNNEL_RESPONSE_FIELD_CAPS" },
{ HTTP_TUNNEL_RESPONSE_FIELD_SOH_REQ, "HTTP_TUNNEL_RESPONSE_FIELD_SOH_REQ" },
{ HTTP_TUNNEL_RESPONSE_FIELD_CONSENT_MSG, "HTTP_TUNNEL_RESPONSE_FIELD_CONSENT_MSG" }
}
HTTP_EXTENDED_AUTH_SSPI_NTLM
#define HTTP_EXTENDED_AUTH_SSPI_NTLM
Definition: rdg.c:53
HTTP_TUNNEL_AUTH_RESPONSE_FIELD_REDIR_FLAGS
#define HTTP_TUNNEL_AUTH_RESPONSE_FIELD_REDIR_FLAGS
Definition: rdg.c:76
HTTP_TUNNEL_RESPONSE_FIELD_SOH_REQ
#define HTTP_TUNNEL_RESPONSE_FIELD_SOH_REQ
Definition: rdg.c:96
HTTP_CHANNEL_RESPONSE_FIELD_CHANNELID
#define HTTP_CHANNEL_RESPONSE_FIELD_CHANNELID
Definition: rdg.c:45
HTTP_CAPABILITY_IDLE_TIMEOUT
#define HTTP_CAPABILITY_IDLE_TIMEOUT
Definition: rdg.c:101
HTTP_EXTENDED_AUTH_PAA
#define HTTP_EXTENDED_AUTH_PAA
Definition: rdg.c:52
HTTP_CAPABILITY_UDP_TRANSPORT
#define HTTP_CAPABILITY_UDP_TRANSPORT
Definition: rdg.c:105
HTTP_CHANNEL_RESPONSE_FIELD_UDPPORT
#define HTTP_CHANNEL_RESPONSE_FIELD_UDPPORT
Definition: rdg.c:47
HTTP_CAPABILITY_MESSAGING_CONSENT_SIGN
#define HTTP_CAPABILITY_MESSAGING_CONSENT_SIGN
Definition: rdg.c:102
HTTP_CAPABILITY_REAUTH
#define HTTP_CAPABILITY_REAUTH
Definition: rdg.c:104
HTTP_TUNNEL_AUTH_RESPONSE_FIELD_SOH_RESPONSE
#define HTTP_TUNNEL_AUTH_RESPONSE_FIELD_SOH_RESPONSE
Definition: rdg.c:78
HTTP_TUNNEL_RESPONSE_FIELD_TUNNEL_ID
#define HTTP_TUNNEL_RESPONSE_FIELD_TUNNEL_ID
Definition: rdg.c:94
HTTP_CHANNEL_RESPONSE_OPTIONAL
#define HTTP_CHANNEL_RESPONSE_OPTIONAL
Definition: rdg.c:46
HTTP_TUNNEL_RESPONSE_FIELD_CAPS
#define HTTP_TUNNEL_RESPONSE_FIELD_CAPS
Definition: rdg.c:95
HTTP_CAPABILITY_TYPE_QUAR_SOH
#define HTTP_CAPABILITY_TYPE_QUAR_SOH
Definition: rdg.c:100
HTTP_TUNNEL_RESPONSE_FIELD_CONSENT_MSG
#define HTTP_TUNNEL_RESPONSE_FIELD_CONSENT_MSG
Definition: rdg.c:97
HTTP_EXTENDED_AUTH_NONE
#define HTTP_EXTENDED_AUTH_NONE
Definition: rdg.c:50
HTTP_EXTENDED_AUTH_SC
#define HTTP_EXTENDED_AUTH_SC
Definition: rdg.c:51
HTTP_TUNNEL_AUTH_RESPONSE_FIELD_IDLE_TIMEOUT
#define HTTP_TUNNEL_AUTH_RESPONSE_FIELD_IDLE_TIMEOUT
Definition: rdg.c:77
HTTP_CAPABILITY_MESSAGING_SERVICE_MSG
#define HTTP_CAPABILITY_MESSAGING_SERVICE_MSG
Definition: rdg.c:103