FreeRDP
peer.c File Reference
#include <winpr/crt.h>
#include <winpr/winsock.h>
#include "info.h"
#include "certificate.h"
#include <freerdp/log.h>
#include "rdp.h"
#include "peer.h"

Macros

#define TAG   FREERDP_TAG("core.peer")
 

Functions

static HANDLE freerdp_peer_virtual_channel_open (freerdp_peer *client, const char *name, UINT32 flags)
 
static BOOL freerdp_peer_virtual_channel_close (freerdp_peer *client, HANDLE hChannel)
 
static int freerdp_peer_virtual_channel_write (freerdp_peer *client, HANDLE hChannel, const BYTE *buffer, UINT32 length)
 
static void * freerdp_peer_virtual_channel_get_data (freerdp_peer *client, HANDLE hChannel)
 
static int freerdp_peer_virtual_channel_set_data (freerdp_peer *client, HANDLE hChannel, void *data)
 
static BOOL freerdp_peer_initialize (freerdp_peer *client)
 
static BOOL freerdp_peer_get_fds (freerdp_peer *client, void **rfds, int *rcount)
 
static HANDLE freerdp_peer_get_event_handle (freerdp_peer *client)
 
static DWORD freerdp_peer_get_event_handles (freerdp_peer *client, HANDLE *events, DWORD count)
 
static BOOL freerdp_peer_check_fds (freerdp_peer *peer)
 
static BOOL peer_recv_data_pdu (freerdp_peer *client, wStream *s, UINT16 totalLength)
 
static int peer_recv_tpkt_pdu (freerdp_peer *client, wStream *s)
 
static int peer_recv_fastpath_pdu (freerdp_peer *client, wStream *s)
 
static int peer_recv_pdu (freerdp_peer *client, wStream *s)
 
static int peer_recv_callback (rdpTransport *transport, wStream *s, void *extra)
 
static BOOL freerdp_peer_close (freerdp_peer *client)
 
static void freerdp_peer_disconnect (freerdp_peer *client)
 
static BOOL freerdp_peer_send_channel_data (freerdp_peer *client, UINT16 channelId, const BYTE *data, size_t size)
 
static BOOL freerdp_peer_is_write_blocked (freerdp_peer *peer)
 
static int freerdp_peer_drain_output_buffer (freerdp_peer *peer)
 
static BOOL freerdp_peer_has_more_to_read (freerdp_peer *peer)
 
static LicenseCallbackResult freerdp_peer_nolicense (freerdp_peer *peer, wStream *s)
 
BOOL freerdp_peer_context_new (freerdp_peer *client)
 
void freerdp_peer_context_free (freerdp_peer *client)
 
freerdp_peer * freerdp_peer_new (int sockfd)
 
void freerdp_peer_free (freerdp_peer *client)
 

Macro Definition Documentation

◆ TAG

#define TAG   FREERDP_TAG("core.peer")

FreeRDP: A Remote Desktop Protocol Implementation RDP Server Peer

Copyright 2011 Vic Lee Copyright 2014 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

◆ freerdp_peer_check_fds()

static BOOL freerdp_peer_check_fds ( freerdp_peer *  peer)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_peer_close()

static BOOL freerdp_peer_close ( freerdp_peer *  client)
static

if negotiation has failed, we're not MCS connected. So don't send anything else, or some mstsc will consider that as an error

[MS-RDPBCGR] 1.3.1.4.2 User-Initiated Disconnection Sequence on Server The server first sends the client a Deactivate All PDU followed by an optional MCS Disconnect Provider Ultimatum PDU.

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

◆ freerdp_peer_context_free()

void freerdp_peer_context_free ( freerdp_peer *  client)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_peer_context_new()

BOOL freerdp_peer_context_new ( freerdp_peer *  client)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_peer_disconnect()

static void freerdp_peer_disconnect ( freerdp_peer *  client)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_peer_drain_output_buffer()

static int freerdp_peer_drain_output_buffer ( freerdp_peer *  peer)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_peer_free()

void freerdp_peer_free ( freerdp_peer *  client)
Here is the caller graph for this function:

◆ freerdp_peer_get_event_handle()

static HANDLE freerdp_peer_get_event_handle ( freerdp_peer *  client)
static
Here is the caller graph for this function:

◆ freerdp_peer_get_event_handles()

static DWORD freerdp_peer_get_event_handles ( freerdp_peer *  client,
HANDLE *  events,
DWORD  count 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_peer_get_fds()

static BOOL freerdp_peer_get_fds ( freerdp_peer *  client,
void **  rfds,
int *  rcount 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_peer_has_more_to_read()

static BOOL freerdp_peer_has_more_to_read ( freerdp_peer *  peer)
static
Here is the caller graph for this function:

◆ freerdp_peer_initialize()

static BOOL freerdp_peer_initialize ( freerdp_peer *  client)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_peer_is_write_blocked()

static BOOL freerdp_peer_is_write_blocked ( freerdp_peer *  peer)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_peer_new()

freerdp_peer* freerdp_peer_new ( int  sockfd)
Here is the call graph for this function:

◆ freerdp_peer_nolicense()

static LicenseCallbackResult freerdp_peer_nolicense ( freerdp_peer *  peer,
wStream *  s 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_peer_send_channel_data()

static BOOL freerdp_peer_send_channel_data ( freerdp_peer *  client,
UINT16  channelId,
const BYTE data,
size_t  size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_peer_virtual_channel_close()

static BOOL freerdp_peer_virtual_channel_close ( freerdp_peer *  client,
HANDLE  hChannel 
)
static
Here is the caller graph for this function:

◆ freerdp_peer_virtual_channel_get_data()

static void* freerdp_peer_virtual_channel_get_data ( freerdp_peer *  client,
HANDLE  hChannel 
)
static
Here is the caller graph for this function:

◆ freerdp_peer_virtual_channel_open()

static HANDLE freerdp_peer_virtual_channel_open ( freerdp_peer *  client,
const char *  name,
UINT32  flags 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_peer_virtual_channel_set_data()

static int freerdp_peer_virtual_channel_set_data ( freerdp_peer *  client,
HANDLE  hChannel,
void *  data 
)
static
Here is the caller graph for this function:

◆ freerdp_peer_virtual_channel_write()

static int freerdp_peer_virtual_channel_write ( freerdp_peer *  client,
HANDLE  hChannel,
const BYTE buffer,
UINT32  length 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ peer_recv_callback()

static int peer_recv_callback ( rdpTransport *  transport,
wStream *  s,
void *  extra 
)
static

During reactivation sequence the client might sent some input or channel data before receiving the Deactivate All PDU. We need to process them as usual.

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

◆ peer_recv_data_pdu()

static BOOL peer_recv_data_pdu ( freerdp_peer *  client,
wStream *  s,
UINT16  totalLength 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ peer_recv_fastpath_pdu()

static int peer_recv_fastpath_pdu ( freerdp_peer *  client,
wStream *  s 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ peer_recv_pdu()

static int peer_recv_pdu ( freerdp_peer *  client,
wStream *  s 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ peer_recv_tpkt_pdu()

static int peer_recv_tpkt_pdu ( freerdp_peer *  client,
wStream *  s 
)
static
Here is the call graph for this function:
Here is the caller graph for this function: