FreeRDP
server/rail_main.c File Reference
#include <freerdp/types.h>
#include <freerdp/constants.h>
#include <freerdp/channels/log.h>
#include <winpr/crt.h>
#include <winpr/synch.h>
#include <winpr/thread.h>
#include <winpr/stream.h>
#include "rail_main.h"

Macros

#define TAG   CHANNELS_TAG("rail.server")
 

Functions

static UINT rail_send (RailServerContext *context, wStream *s, ULONG length)
 
UINT rail_send_pdu (RailServerContext *context, wStream *s, UINT16 orderType)
 
static UINT rail_write_local_move_size_order (wStream *s, const RAIL_LOCALMOVESIZE_ORDER *localMoveSize)
 
static UINT rail_write_min_max_info_order (wStream *s, const RAIL_MINMAXINFO_ORDER *minMaxInfo)
 
static UINT rail_write_taskbar_info_order (wStream *s, const RAIL_TASKBAR_INFO_ORDER *taskbarInfo)
 
static UINT rail_write_langbar_info_order (wStream *s, const RAIL_LANGBAR_INFO_ORDER *langbarInfo)
 
static UINT rail_write_exec_result_order (wStream *s, const RAIL_EXEC_RESULT_ORDER *execResult)
 
static UINT rail_write_z_order_sync_order (wStream *s, const RAIL_ZORDER_SYNC *zOrderSync)
 
static UINT rail_write_cloak_order (wStream *s, const RAIL_CLOAK *cloak)
 
static UINT rail_write_power_display_request_order (wStream *s, const RAIL_POWER_DISPLAY_REQUEST *powerDisplayRequest)
 
static UINT rail_write_get_app_id_resp_order (wStream *s, const RAIL_GET_APPID_RESP_ORDER *getAppidResp)
 
static UINT rail_write_get_appid_resp_ex_order (wStream *s, const RAIL_GET_APPID_RESP_EX *getAppidRespEx)
 
static UINT rail_send_server_handshake (RailServerContext *context, const RAIL_HANDSHAKE_ORDER *handshake)
 
static UINT rail_send_server_handshake_ex (RailServerContext *context, const RAIL_HANDSHAKE_EX_ORDER *handshakeEx)
 
static UINT rail_send_server_sysparam (RailServerContext *context, const RAIL_SYSPARAM_ORDER *sysparam)
 
static UINT rail_send_server_local_move_size (RailServerContext *context, const RAIL_LOCALMOVESIZE_ORDER *localMoveSize)
 
static UINT rail_send_server_min_max_info (RailServerContext *context, const RAIL_MINMAXINFO_ORDER *minMaxInfo)
 
static UINT rail_send_server_taskbar_info (RailServerContext *context, const RAIL_TASKBAR_INFO_ORDER *taskbarInfo)
 
static UINT rail_send_server_langbar_info (RailServerContext *context, const RAIL_LANGBAR_INFO_ORDER *langbarInfo)
 
static UINT rail_send_server_exec_result (RailServerContext *context, const RAIL_EXEC_RESULT_ORDER *execResult)
 
static UINT rail_send_server_z_order_sync (RailServerContext *context, const RAIL_ZORDER_SYNC *zOrderSync)
 
static UINT rail_send_server_cloak (RailServerContext *context, const RAIL_CLOAK *cloak)
 
static UINT rail_send_server_power_display_request (RailServerContext *context, const RAIL_POWER_DISPLAY_REQUEST *powerDisplayRequest)
 
static UINT rail_send_server_get_app_id_resp (RailServerContext *context, const RAIL_GET_APPID_RESP_ORDER *getAppidResp)
 
static UINT rail_send_server_get_appid_resp_ex (RailServerContext *context, const RAIL_GET_APPID_RESP_EX *getAppidRespEx)
 
static UINT rail_read_client_status_order (wStream *s, RAIL_CLIENT_STATUS_ORDER *clientStatus)
 
static UINT rail_read_exec_order (wStream *s, RAIL_EXEC_ORDER *exec)
 
static UINT rail_read_activate_order (wStream *s, RAIL_ACTIVATE_ORDER *activate)
 
static UINT rail_read_sysmenu_order (wStream *s, RAIL_SYSMENU_ORDER *sysmenu)
 
static UINT rail_read_syscommand_order (wStream *s, RAIL_SYSCOMMAND_ORDER *syscommand)
 
static UINT rail_read_notify_event_order (wStream *s, RAIL_NOTIFY_EVENT_ORDER *notifyEvent)
 
static UINT rail_read_get_appid_req_order (wStream *s, RAIL_GET_APPID_REQ_ORDER *getAppidReq)
 
static UINT rail_read_window_move_order (wStream *s, RAIL_WINDOW_MOVE_ORDER *windowMove)
 
static UINT rail_read_snap_arange_order (wStream *s, RAIL_SNAP_ARRANGE *snapArrange)
 
static UINT rail_read_langbar_info_order (wStream *s, RAIL_LANGBAR_INFO_ORDER *langbarInfo)
 
static UINT rail_read_language_ime_info_order (wStream *s, RAIL_LANGUAGEIME_INFO_ORDER *languageImeInfo)
 
static UINT rail_read_compartment_info_order (wStream *s, RAIL_COMPARTMENT_INFO_ORDER *compartmentInfo)
 
static UINT rail_read_cloak_order (wStream *s, RAIL_CLOAK *cloak)
 
static UINT rail_recv_client_handshake_order (RailServerContext *context, RAIL_HANDSHAKE_ORDER *handshake, wStream *s)
 
static UINT rail_recv_client_client_status_order (RailServerContext *context, RAIL_CLIENT_STATUS_ORDER *clientStatus, wStream *s)
 
static UINT rail_recv_client_exec_order (RailServerContext *context, wStream *s)
 
static UINT rail_recv_client_sysparam_order (RailServerContext *context, RAIL_SYSPARAM_ORDER *sysparam, wStream *s)
 
static UINT rail_recv_client_activate_order (RailServerContext *context, RAIL_ACTIVATE_ORDER *activate, wStream *s)
 
static UINT rail_recv_client_sysmenu_order (RailServerContext *context, RAIL_SYSMENU_ORDER *sysmenu, wStream *s)
 
static UINT rail_recv_client_syscommand_order (RailServerContext *context, RAIL_SYSCOMMAND_ORDER *syscommand, wStream *s)
 
static UINT rail_recv_client_notify_event_order (RailServerContext *context, RAIL_NOTIFY_EVENT_ORDER *notifyEvent, wStream *s)
 
static UINT rail_recv_client_window_move_order (RailServerContext *context, RAIL_WINDOW_MOVE_ORDER *windowMove, wStream *s)
 
static UINT rail_recv_client_snap_arrange_order (RailServerContext *context, RAIL_SNAP_ARRANGE *snapArrange, wStream *s)
 
static UINT rail_recv_client_get_appid_req_order (RailServerContext *context, RAIL_GET_APPID_REQ_ORDER *getAppidReq, wStream *s)
 
static UINT rail_recv_client_langbar_info_order (RailServerContext *context, RAIL_LANGBAR_INFO_ORDER *langbarInfo, wStream *s)
 
static UINT rail_recv_client_language_ime_info_order (RailServerContext *context, RAIL_LANGUAGEIME_INFO_ORDER *languageImeInfo, wStream *s)
 
static UINT rail_recv_client_compartment_info (RailServerContext *context, RAIL_COMPARTMENT_INFO_ORDER *compartmentInfo, wStream *s)
 
static UINT rail_recv_client_cloak_order (RailServerContext *context, RAIL_CLOAK *cloak, wStream *s)
 
static DWORD WINAPI rail_server_thread (LPVOID arg)
 
static UINT rail_server_start (RailServerContext *context)
 
static BOOL rail_server_stop (RailServerContext *context)
 
RailServerContext * rail_server_context_new (HANDLE vcm)
 
void rail_server_context_free (RailServerContext *context)
 
UINT rail_server_handle_messages (RailServerContext *context)
 

Macro Definition Documentation

#define TAG   CHANNELS_TAG("rail.server")

FreeRDP: A Remote Desktop Protocol Implementation RAIL Virtual Channel Plugin

Copyright 2019 Mati Shabtay matis.nosp@m.habt.nosp@m.ay@gm.nosp@m.ail..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

static UINT rail_read_activate_order ( wStream *  s,
RAIL_ACTIVATE_ORDER *  activate 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_read_client_status_order ( wStream *  s,
RAIL_CLIENT_STATUS_ORDER *  clientStatus 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_read_cloak_order ( wStream *  s,
RAIL_CLOAK *  cloak 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_read_compartment_info_order ( wStream *  s,
RAIL_COMPARTMENT_INFO_ORDER *  compartmentInfo 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_read_exec_order ( wStream *  s,
RAIL_EXEC_ORDER *  exec 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_read_get_appid_req_order ( wStream *  s,
RAIL_GET_APPID_REQ_ORDER *  getAppidReq 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_read_langbar_info_order ( wStream *  s,
RAIL_LANGBAR_INFO_ORDER *  langbarInfo 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_read_language_ime_info_order ( wStream *  s,
RAIL_LANGUAGEIME_INFO_ORDER *  languageImeInfo 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_read_notify_event_order ( wStream *  s,
RAIL_NOTIFY_EVENT_ORDER *  notifyEvent 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_read_snap_arange_order ( wStream *  s,
RAIL_SNAP_ARRANGE *  snapArrange 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_read_syscommand_order ( wStream *  s,
RAIL_SYSCOMMAND_ORDER *  syscommand 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_read_sysmenu_order ( wStream *  s,
RAIL_SYSMENU_ORDER *  sysmenu 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_read_window_move_order ( wStream *  s,
RAIL_WINDOW_MOVE_ORDER *  windowMove 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_recv_client_activate_order ( RailServerContext *  context,
RAIL_ACTIVATE_ORDER *  activate,
wStream *  s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_recv_client_client_status_order ( RailServerContext *  context,
RAIL_CLIENT_STATUS_ORDER *  clientStatus,
wStream *  s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_recv_client_cloak_order ( RailServerContext *  context,
RAIL_CLOAK *  cloak,
wStream *  s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_recv_client_compartment_info ( RailServerContext *  context,
RAIL_COMPARTMENT_INFO_ORDER *  compartmentInfo,
wStream *  s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_recv_client_exec_order ( RailServerContext *  context,
wStream *  s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_recv_client_get_appid_req_order ( RailServerContext *  context,
RAIL_GET_APPID_REQ_ORDER *  getAppidReq,
wStream *  s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_recv_client_handshake_order ( RailServerContext *  context,
RAIL_HANDSHAKE_ORDER *  handshake,
wStream *  s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_recv_client_langbar_info_order ( RailServerContext *  context,
RAIL_LANGBAR_INFO_ORDER *  langbarInfo,
wStream *  s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_recv_client_language_ime_info_order ( RailServerContext *  context,
RAIL_LANGUAGEIME_INFO_ORDER *  languageImeInfo,
wStream *  s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_recv_client_notify_event_order ( RailServerContext *  context,
RAIL_NOTIFY_EVENT_ORDER *  notifyEvent,
wStream *  s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_recv_client_snap_arrange_order ( RailServerContext *  context,
RAIL_SNAP_ARRANGE *  snapArrange,
wStream *  s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_recv_client_syscommand_order ( RailServerContext *  context,
RAIL_SYSCOMMAND_ORDER *  syscommand,
wStream *  s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_recv_client_sysmenu_order ( RailServerContext *  context,
RAIL_SYSMENU_ORDER *  sysmenu,
wStream *  s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_recv_client_sysparam_order ( RailServerContext *  context,
RAIL_SYSPARAM_ORDER *  sysparam,
wStream *  s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_recv_client_window_move_order ( RailServerContext *  context,
RAIL_WINDOW_MOVE_ORDER *  windowMove,
wStream *  s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_send ( RailServerContext *  context,
wStream *  s,
ULONG  length 
)
static

Sends a single rail PDU on the channel

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

UINT rail_send_pdu ( RailServerContext *  context,
wStream *  s,
UINT16  orderType 
)

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_send_server_cloak ( RailServerContext *  context,
const RAIL_CLOAK *  cloak 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_send_server_exec_result ( RailServerContext *  context,
const RAIL_EXEC_RESULT_ORDER *  execResult 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_send_server_get_app_id_resp ( RailServerContext *  context,
const RAIL_GET_APPID_RESP_ORDER *  getAppidResp 
)
static

Function description

Returns
0 on success, otherwise a Win32 error coie

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_send_server_get_appid_resp_ex ( RailServerContext *  context,
const RAIL_GET_APPID_RESP_EX *  getAppidRespEx 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_send_server_handshake ( RailServerContext *  context,
const RAIL_HANDSHAKE_ORDER *  handshake 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_send_server_handshake_ex ( RailServerContext *  context,
const RAIL_HANDSHAKE_EX_ORDER *  handshakeEx 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_send_server_langbar_info ( RailServerContext *  context,
const RAIL_LANGBAR_INFO_ORDER *  langbarInfo 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_send_server_local_move_size ( RailServerContext *  context,
const RAIL_LOCALMOVESIZE_ORDER *  localMoveSize 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_send_server_min_max_info ( RailServerContext *  context,
const RAIL_MINMAXINFO_ORDER *  minMaxInfo 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_send_server_power_display_request ( RailServerContext *  context,
const RAIL_POWER_DISPLAY_REQUEST *  powerDisplayRequest 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_send_server_sysparam ( RailServerContext *  context,
const RAIL_SYSPARAM_ORDER *  sysparam 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_send_server_taskbar_info ( RailServerContext *  context,
const RAIL_TASKBAR_INFO_ORDER *  taskbarInfo 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_send_server_z_order_sync ( RailServerContext *  context,
const RAIL_ZORDER_SYNC *  zOrderSync 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

void rail_server_context_free ( RailServerContext *  context)

Here is the call graph for this function:

Here is the caller graph for this function:

RailServerContext* rail_server_context_new ( HANDLE  vcm)

Here is the call graph for this function:

Here is the caller graph for this function:

UINT rail_server_handle_messages ( RailServerContext *  context)

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_server_start ( RailServerContext *  context)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL rail_server_stop ( RailServerContext *  context)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static DWORD WINAPI rail_server_thread ( LPVOID  arg)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_write_cloak_order ( wStream *  s,
const RAIL_CLOAK *  cloak 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_write_exec_result_order ( wStream *  s,
const RAIL_EXEC_RESULT_ORDER *  execResult 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_write_get_app_id_resp_order ( wStream *  s,
const RAIL_GET_APPID_RESP_ORDER *  getAppidResp 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_write_get_appid_resp_ex_order ( wStream *  s,
const RAIL_GET_APPID_RESP_EX *  getAppidRespEx 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_write_langbar_info_order ( wStream *  s,
const RAIL_LANGBAR_INFO_ORDER *  langbarInfo 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_write_local_move_size_order ( wStream *  s,
const RAIL_LOCALMOVESIZE_ORDER *  localMoveSize 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_write_min_max_info_order ( wStream *  s,
const RAIL_MINMAXINFO_ORDER *  minMaxInfo 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_write_power_display_request_order ( wStream *  s,
const RAIL_POWER_DISPLAY_REQUEST *  powerDisplayRequest 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_write_taskbar_info_order ( wStream *  s,
const RAIL_TASKBAR_INFO_ORDER *  taskbarInfo 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT rail_write_z_order_sync_order ( wStream *  s,
const RAIL_ZORDER_SYNC *  zOrderSync 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function: