FreeRDP
autodetect.c File Reference
#include <freerdp/config.h>
#include <winpr/crypto.h>
#include <winpr/assert.h>
#include "autodetect.h"

Macros

#define TYPE_ID_AUTODETECT_REQUEST   0x00
 
#define TYPE_ID_AUTODETECT_RESPONSE   0x01
 
#define RDP_RTT_REQUEST_TYPE_CONTINUOUS   0x0001
 
#define RDP_RTT_REQUEST_TYPE_CONNECTTIME   0x1001
 
#define RDP_RTT_RESPONSE_TYPE   0x0000
 
#define RDP_BW_START_REQUEST_TYPE_CONTINUOUS   0x0014
 
#define RDP_BW_START_REQUEST_TYPE_TUNNEL   0x0114
 
#define RDP_BW_START_REQUEST_TYPE_CONNECTTIME   0x1014
 
#define RDP_BW_PAYLOAD_REQUEST_TYPE   0x0002
 
#define RDP_BW_STOP_REQUEST_TYPE_CONNECTTIME   0x002B
 
#define RDP_BW_STOP_REQUEST_TYPE_CONTINUOUS   0x0429
 
#define RDP_BW_STOP_REQUEST_TYPE_TUNNEL   0x0629
 
#define RDP_BW_RESULTS_RESPONSE_TYPE_CONNECTTIME   0x0003
 
#define RDP_BW_RESULTS_RESPONSE_TYPE_CONTINUOUS   0x000B
 
#define RDP_NETCHAR_SYNC_RESPONSE_TYPE   0x0018
 
#define RDP_NETCHAR_RESULTS_0x0840   0x0840U
 
#define RDP_NETCHAR_RESULTS_0x0880   0x0880U
 
#define RDP_NETCHAR_RESULTS_0x08C0   0x08C0U
 

Functions

static const char * autodetect_request_type_to_string (UINT32 requestType)
 
static BOOL autodetect_send_rtt_measure_request (rdpAutoDetect *autodetect, RDP_TRANSPORT_TYPE transport, UINT16 sequenceNumber, UINT16 requestType)
 
static BOOL autodetect_send_continuous_rtt_measure_request (rdpAutoDetect *autodetect, RDP_TRANSPORT_TYPE transport, UINT16 sequenceNumber)
 
BOOL autodetect_send_connecttime_rtt_measure_request (rdpAutoDetect *autodetect, RDP_TRANSPORT_TYPE transport, UINT16 sequenceNumber)
 
static BOOL autodetect_send_rtt_measure_response (rdpAutoDetect *autodetect, UINT16 sequenceNumber)
 
static BOOL autodetect_send_bandwidth_measure_start (rdpAutoDetect *autodetect, RDP_TRANSPORT_TYPE transport, UINT16 sequenceNumber, UINT16 requestType)
 
static BOOL autodetect_send_continuous_bandwidth_measure_start (rdpAutoDetect *autodetect, RDP_TRANSPORT_TYPE transport, UINT16 sequenceNumber)
 
BOOL autodetect_send_connecttime_bandwidth_measure_start (rdpAutoDetect *autodetect, RDP_TRANSPORT_TYPE transport, UINT16 sequenceNumber)
 
BOOL autodetect_send_bandwidth_measure_payload (rdpAutoDetect *autodetect, RDP_TRANSPORT_TYPE transport, UINT16 payloadLength, UINT16 sequenceNumber)
 
static BOOL autodetect_send_bandwidth_measure_stop (rdpAutoDetect *autodetect, RDP_TRANSPORT_TYPE transport, UINT16 payloadLength, UINT16 sequenceNumber, UINT16 requestType)
 
static BOOL autodetect_send_continuous_bandwidth_measure_stop (rdpAutoDetect *autodetect, RDP_TRANSPORT_TYPE transport, UINT16 sequenceNumber)
 
BOOL autodetect_send_connecttime_bandwidth_measure_stop (rdpAutoDetect *autodetect, RDP_TRANSPORT_TYPE transport, UINT16 payloadLength, UINT16 sequenceNumber)
 
static BOOL autodetect_send_bandwidth_measure_results (rdpAutoDetect *autodetect, RDP_TRANSPORT_TYPE transport, UINT16 responseType, UINT16 sequenceNumber)
 
static BOOL autodetect_send_netchar_result (rdpAutoDetect *autodetect, RDP_TRANSPORT_TYPE transport, UINT16 sequenceNumber)
 
static BOOL autodetect_send_netchar_sync (rdpAutoDetect *autodetect, RDP_TRANSPORT_TYPE transport, UINT16 sequenceNumber)
 
static BOOL autodetect_recv_rtt_measure_request (rdpAutoDetect *autodetect, RDP_TRANSPORT_TYPE transport, wStream *s, const AUTODETECT_REQ_PDU *autodetectReqPdu)
 
static BOOL autodetect_recv_rtt_measure_response (rdpAutoDetect *autodetect, RDP_TRANSPORT_TYPE transport, wStream *s, const AUTODETECT_RSP_PDU *autodetectRspPdu)
 
static BOOL autodetect_recv_bandwidth_measure_start (rdpAutoDetect *autodetect, RDP_TRANSPORT_TYPE transport, wStream *s, const AUTODETECT_REQ_PDU *autodetectReqPdu)
 
static BOOL autodetect_recv_bandwidth_measure_payload (rdpAutoDetect *autodetect, RDP_TRANSPORT_TYPE transport, wStream *s, const AUTODETECT_REQ_PDU *autodetectReqPdu)
 
static BOOL autodetect_recv_bandwidth_measure_stop (rdpAutoDetect *autodetect, RDP_TRANSPORT_TYPE transport, wStream *s, const AUTODETECT_REQ_PDU *autodetectReqPdu)
 
static BOOL autodetect_recv_bandwidth_measure_results (rdpAutoDetect *autodetect, RDP_TRANSPORT_TYPE transport, wStream *s, const AUTODETECT_RSP_PDU *autodetectRspPdu)
 
static BOOL autodetect_recv_netchar_result (rdpAutoDetect *autodetect, RDP_TRANSPORT_TYPE transport, wStream *s, const AUTODETECT_RSP_PDU *autodetectRspPdu)
 
static BOOL autodetect_recv_netchar_request (rdpAutoDetect *autodetect, RDP_TRANSPORT_TYPE transport, wStream *s, const AUTODETECT_REQ_PDU *autodetectReqPdu)
 
state_run_t autodetect_recv_request_packet (rdpAutoDetect *autodetect, RDP_TRANSPORT_TYPE transport, wStream *s)
 
state_run_t autodetect_recv_response_packet (rdpAutoDetect *autodetect, RDP_TRANSPORT_TYPE transport, wStream *s)
 
rdpAutoDetect * autodetect_new (rdpContext *context)
 
void autodetect_free (rdpAutoDetect *autoDetect)
 
void autodetect_register_server_callbacks (rdpAutoDetect *autodetect)
 
AUTODETECT_STATE autodetect_get_state (rdpAutoDetect *autodetect)
 
rdpAutoDetect * autodetect_get (rdpContext *context)
 

Macro Definition Documentation

◆ RDP_BW_PAYLOAD_REQUEST_TYPE

#define RDP_BW_PAYLOAD_REQUEST_TYPE   0x0002

◆ RDP_BW_RESULTS_RESPONSE_TYPE_CONNECTTIME

#define RDP_BW_RESULTS_RESPONSE_TYPE_CONNECTTIME   0x0003

◆ RDP_BW_RESULTS_RESPONSE_TYPE_CONTINUOUS

#define RDP_BW_RESULTS_RESPONSE_TYPE_CONTINUOUS   0x000B

◆ RDP_BW_START_REQUEST_TYPE_CONNECTTIME

#define RDP_BW_START_REQUEST_TYPE_CONNECTTIME   0x1014

◆ RDP_BW_START_REQUEST_TYPE_CONTINUOUS

#define RDP_BW_START_REQUEST_TYPE_CONTINUOUS   0x0014

◆ RDP_BW_START_REQUEST_TYPE_TUNNEL

#define RDP_BW_START_REQUEST_TYPE_TUNNEL   0x0114

◆ RDP_BW_STOP_REQUEST_TYPE_CONNECTTIME

#define RDP_BW_STOP_REQUEST_TYPE_CONNECTTIME   0x002B

◆ RDP_BW_STOP_REQUEST_TYPE_CONTINUOUS

#define RDP_BW_STOP_REQUEST_TYPE_CONTINUOUS   0x0429

◆ RDP_BW_STOP_REQUEST_TYPE_TUNNEL

#define RDP_BW_STOP_REQUEST_TYPE_TUNNEL   0x0629

◆ RDP_NETCHAR_RESULTS_0x0840

#define RDP_NETCHAR_RESULTS_0x0840   0x0840U

◆ RDP_NETCHAR_RESULTS_0x0880

#define RDP_NETCHAR_RESULTS_0x0880   0x0880U

◆ RDP_NETCHAR_RESULTS_0x08C0

#define RDP_NETCHAR_RESULTS_0x08C0   0x08C0U

◆ RDP_NETCHAR_SYNC_RESPONSE_TYPE

#define RDP_NETCHAR_SYNC_RESPONSE_TYPE   0x0018

◆ RDP_RTT_REQUEST_TYPE_CONNECTTIME

#define RDP_RTT_REQUEST_TYPE_CONNECTTIME   0x1001

◆ RDP_RTT_REQUEST_TYPE_CONTINUOUS

#define RDP_RTT_REQUEST_TYPE_CONTINUOUS   0x0001

◆ RDP_RTT_RESPONSE_TYPE

#define RDP_RTT_RESPONSE_TYPE   0x0000

◆ TYPE_ID_AUTODETECT_REQUEST

#define TYPE_ID_AUTODETECT_REQUEST   0x00

FreeRDP: A Remote Desktop Protocol Implementation Auto-Detect PDUs

Copyright 2014 Dell Software Mike..nosp@m.McDo.nosp@m.nald@.nosp@m.soft.nosp@m.ware..nosp@m.dell.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.

◆ TYPE_ID_AUTODETECT_RESPONSE

#define TYPE_ID_AUTODETECT_RESPONSE   0x01

Function Documentation

◆ autodetect_free()

void autodetect_free ( rdpAutoDetect *  autoDetect)
Here is the caller graph for this function:

◆ autodetect_get()

rdpAutoDetect* autodetect_get ( rdpContext *  context)

◆ autodetect_get_state()

AUTODETECT_STATE autodetect_get_state ( rdpAutoDetect *  autodetect)
Here is the caller graph for this function:

◆ autodetect_new()

rdpAutoDetect* autodetect_new ( rdpContext *  context)
Here is the caller graph for this function:

◆ autodetect_recv_bandwidth_measure_payload()

static BOOL autodetect_recv_bandwidth_measure_payload ( rdpAutoDetect *  autodetect,
RDP_TRANSPORT_TYPE  transport,
wStream s,
const AUTODETECT_REQ_PDU *  autodetectReqPdu 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ autodetect_recv_bandwidth_measure_results()

static BOOL autodetect_recv_bandwidth_measure_results ( rdpAutoDetect *  autodetect,
RDP_TRANSPORT_TYPE  transport,
wStream s,
const AUTODETECT_RSP_PDU *  autodetectRspPdu 
)
static
Here is the caller graph for this function:

◆ autodetect_recv_bandwidth_measure_start()

static BOOL autodetect_recv_bandwidth_measure_start ( rdpAutoDetect *  autodetect,
RDP_TRANSPORT_TYPE  transport,
wStream s,
const AUTODETECT_REQ_PDU *  autodetectReqPdu 
)
static
Here is the caller graph for this function:

◆ autodetect_recv_bandwidth_measure_stop()

static BOOL autodetect_recv_bandwidth_measure_stop ( rdpAutoDetect *  autodetect,
RDP_TRANSPORT_TYPE  transport,
wStream s,
const AUTODETECT_REQ_PDU *  autodetectReqPdu 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ autodetect_recv_netchar_request()

static BOOL autodetect_recv_netchar_request ( rdpAutoDetect *  autodetect,
RDP_TRANSPORT_TYPE  transport,
wStream s,
const AUTODETECT_REQ_PDU *  autodetectReqPdu 
)
static
Here is the caller graph for this function:

◆ autodetect_recv_netchar_result()

static BOOL autodetect_recv_netchar_result ( rdpAutoDetect *  autodetect,
RDP_TRANSPORT_TYPE  transport,
wStream s,
const AUTODETECT_RSP_PDU *  autodetectRspPdu 
)
static
Here is the caller graph for this function:

◆ autodetect_recv_request_packet()

state_run_t autodetect_recv_request_packet ( rdpAutoDetect *  autodetect,
RDP_TRANSPORT_TYPE  transport,
wStream s 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ autodetect_recv_response_packet()

state_run_t autodetect_recv_response_packet ( rdpAutoDetect *  autodetect,
RDP_TRANSPORT_TYPE  transport,
wStream s 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ autodetect_recv_rtt_measure_request()

static BOOL autodetect_recv_rtt_measure_request ( rdpAutoDetect *  autodetect,
RDP_TRANSPORT_TYPE  transport,
wStream s,
const AUTODETECT_REQ_PDU *  autodetectReqPdu 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ autodetect_recv_rtt_measure_response()

static BOOL autodetect_recv_rtt_measure_response ( rdpAutoDetect *  autodetect,
RDP_TRANSPORT_TYPE  transport,
wStream s,
const AUTODETECT_RSP_PDU *  autodetectRspPdu 
)
static
Here is the caller graph for this function:

◆ autodetect_register_server_callbacks()

void autodetect_register_server_callbacks ( rdpAutoDetect *  autodetect)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ autodetect_request_type_to_string()

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

◆ autodetect_send_bandwidth_measure_payload()

BOOL autodetect_send_bandwidth_measure_payload ( rdpAutoDetect *  autodetect,
RDP_TRANSPORT_TYPE  transport,
UINT16  payloadLength,
UINT16  sequenceNumber 
)
Here is the call graph for this function:

◆ autodetect_send_bandwidth_measure_results()

static BOOL autodetect_send_bandwidth_measure_results ( rdpAutoDetect *  autodetect,
RDP_TRANSPORT_TYPE  transport,
UINT16  responseType,
UINT16  sequenceNumber 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ autodetect_send_bandwidth_measure_start()

static BOOL autodetect_send_bandwidth_measure_start ( rdpAutoDetect *  autodetect,
RDP_TRANSPORT_TYPE  transport,
UINT16  sequenceNumber,
UINT16  requestType 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ autodetect_send_bandwidth_measure_stop()

static BOOL autodetect_send_bandwidth_measure_stop ( rdpAutoDetect *  autodetect,
RDP_TRANSPORT_TYPE  transport,
UINT16  payloadLength,
UINT16  sequenceNumber,
UINT16  requestType 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ autodetect_send_connecttime_bandwidth_measure_start()

BOOL autodetect_send_connecttime_bandwidth_measure_start ( rdpAutoDetect *  autodetect,
RDP_TRANSPORT_TYPE  transport,
UINT16  sequenceNumber 
)
Here is the call graph for this function:

◆ autodetect_send_connecttime_bandwidth_measure_stop()

BOOL autodetect_send_connecttime_bandwidth_measure_stop ( rdpAutoDetect *  autodetect,
RDP_TRANSPORT_TYPE  transport,
UINT16  payloadLength,
UINT16  sequenceNumber 
)
Here is the call graph for this function:

◆ autodetect_send_connecttime_rtt_measure_request()

BOOL autodetect_send_connecttime_rtt_measure_request ( rdpAutoDetect *  autodetect,
RDP_TRANSPORT_TYPE  transport,
UINT16  sequenceNumber 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ autodetect_send_continuous_bandwidth_measure_start()

static BOOL autodetect_send_continuous_bandwidth_measure_start ( rdpAutoDetect *  autodetect,
RDP_TRANSPORT_TYPE  transport,
UINT16  sequenceNumber 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ autodetect_send_continuous_bandwidth_measure_stop()

static BOOL autodetect_send_continuous_bandwidth_measure_stop ( rdpAutoDetect *  autodetect,
RDP_TRANSPORT_TYPE  transport,
UINT16  sequenceNumber 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ autodetect_send_continuous_rtt_measure_request()

static BOOL autodetect_send_continuous_rtt_measure_request ( rdpAutoDetect *  autodetect,
RDP_TRANSPORT_TYPE  transport,
UINT16  sequenceNumber 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ autodetect_send_netchar_result()

static BOOL autodetect_send_netchar_result ( rdpAutoDetect *  autodetect,
RDP_TRANSPORT_TYPE  transport,
UINT16  sequenceNumber 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ autodetect_send_netchar_sync()

static BOOL autodetect_send_netchar_sync ( rdpAutoDetect *  autodetect,
RDP_TRANSPORT_TYPE  transport,
UINT16  sequenceNumber 
)
static
Here is the call graph for this function:

◆ autodetect_send_rtt_measure_request()

static BOOL autodetect_send_rtt_measure_request ( rdpAutoDetect *  autodetect,
RDP_TRANSPORT_TYPE  transport,
UINT16  sequenceNumber,
UINT16  requestType 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ autodetect_send_rtt_measure_response()

static BOOL autodetect_send_rtt_measure_response ( rdpAutoDetect *  autodetect,
UINT16  sequenceNumber 
)
static
Here is the call graph for this function:
Here is the caller graph for this function: