FreeRDP
bitmap-filter.cpp File Reference
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <map>
#include <memory>
#include <mutex>
#include <freerdp/server/proxy/proxy_modules_api.h>
#include <freerdp/server/proxy/proxy_context.h>
#include <freerdp/channels/drdynvc.h>
#include <freerdp/channels/rdpgfx.h>
#include <freerdp/utils/gfx.h>

Macros

#define TAG   MODULE_TAG("persist-bitmap-filter")
 

Functions

static BOOL filter_client_pre_connect (proxyPlugin *plugin, proxyData *pdata, void *custom)
 
static BOOL filter_dyn_channel_intercept_list (proxyPlugin *plugin, proxyData *pdata, void *arg)
 
static BOOL filter_static_channel_intercept_list (proxyPlugin *plugin, proxyData *pdata, void *arg)
 
static size_t drdynvc_cblen_to_bytes (UINT8 cbLen)
 
static UINT32 drdynvc_read_variable_uint (wStream *s, UINT8 cbLen)
 
static BOOL drdynvc_try_read_header (wStream *s, size_t &channelId, size_t &length)
 
static DynChannelState * filter_get_plugin_data (proxyPlugin *plugin, proxyData *pdata)
 
static BOOL filter_set_plugin_data (proxyPlugin *plugin, proxyData *pdata, DynChannelState *data)
 
static UINT8 drdynvc_value_to_cblen (UINT32 value)
 
static BOOL drdynvc_write_variable_uint (wStream *s, UINT32 value, UINT8 cbLen)
 
static BOOL drdynvc_write_header (wStream *s, UINT32 channelId)
 
static BOOL filter_forward_empty_offer (const char *sessionID, proxyDynChannelInterceptData *data, size_t startPosition, UINT32 channelId)
 
static BOOL filter_dyn_channel_intercept (proxyPlugin *plugin, proxyData *pdata, void *arg)
 
static BOOL filter_server_session_started (proxyPlugin *plugin, proxyData *pdata, void *)
 
static BOOL filter_server_session_end (proxyPlugin *plugin, proxyData *pdata, void *)
 
FREERDP_API BOOL proxy_module_entry_point (proxyPluginsManager *plugins_manager, void *userdata)
 

Variables

static constexpr char plugin_name [] = "bitmap-filter"
 
static constexpr char plugin_desc []
 
static const std::vector< std::string > plugin_static_intercept = { DRDYNVC_SVC_CHANNEL_NAME }
 
static const std::vector< std::string > plugin_dyn_intercept = { RDPGFX_DVC_CHANNEL_NAME }
 

Macro Definition Documentation

◆ TAG

#define TAG   MODULE_TAG("persist-bitmap-filter")

FreeRDP: A Remote Desktop Protocol Implementation FreeRDP Proxy Server persist-bitmap-filter Module

this module is designed to deactivate all persistent bitmap cache settings a client might send.

Copyright 2023 Armin Novak anova.nosp@m.k@th.nosp@m.incas.nosp@m.t.co.nosp@m.m Copyright 2023 Thincast Technologies GmbH

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

◆ drdynvc_cblen_to_bytes()

static size_t drdynvc_cblen_to_bytes ( UINT8  cbLen)
static
Here is the caller graph for this function:

◆ drdynvc_read_variable_uint()

static UINT32 drdynvc_read_variable_uint ( wStream s,
UINT8  cbLen 
)
static
Here is the caller graph for this function:

◆ drdynvc_try_read_header()

static BOOL drdynvc_try_read_header ( wStream s,
size_t &  channelId,
size_t &  length 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ drdynvc_value_to_cblen()

static UINT8 drdynvc_value_to_cblen ( UINT32  value)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ drdynvc_write_header()

static BOOL drdynvc_write_header ( wStream s,
UINT32  channelId 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ drdynvc_write_variable_uint()

static BOOL drdynvc_write_variable_uint ( wStream s,
UINT32  value,
UINT8  cbLen 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ filter_client_pre_connect()

static BOOL filter_client_pre_connect ( proxyPlugin *  plugin,
proxyData *  pdata,
void *  custom 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ filter_dyn_channel_intercept()

static BOOL filter_dyn_channel_intercept ( proxyPlugin *  plugin,
proxyData *  pdata,
void *  arg 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ filter_dyn_channel_intercept_list()

static BOOL filter_dyn_channel_intercept_list ( proxyPlugin *  plugin,
proxyData *  pdata,
void *  arg 
)
static
Here is the caller graph for this function:

◆ filter_forward_empty_offer()

static BOOL filter_forward_empty_offer ( const char *  sessionID,
proxyDynChannelInterceptData data,
size_t  startPosition,
UINT32  channelId 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ filter_get_plugin_data()

static DynChannelState* filter_get_plugin_data ( proxyPlugin *  plugin,
proxyData *  pdata 
)
static
Here is the caller graph for this function:

◆ filter_server_session_end()

static BOOL filter_server_session_end ( proxyPlugin *  plugin,
proxyData *  pdata,
void *   
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ filter_server_session_started()

static BOOL filter_server_session_started ( proxyPlugin *  plugin,
proxyData *  pdata,
void *   
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ filter_set_plugin_data()

static BOOL filter_set_plugin_data ( proxyPlugin *  plugin,
proxyData *  pdata,
DynChannelState *  data 
)
static
Here is the caller graph for this function:

◆ filter_static_channel_intercept_list()

static BOOL filter_static_channel_intercept_list ( proxyPlugin *  plugin,
proxyData *  pdata,
void *  arg 
)
static
Here is the caller graph for this function:

◆ proxy_module_entry_point()

BOOL proxy_module_entry_point ( proxyPluginsManager *  plugins_manager,
void *  userdata 
)
Here is the call graph for this function:

Variable Documentation

◆ plugin_desc

constexpr char plugin_desc[]
staticconstexpr
Initial value:
=
"this plugin deactivates and filters persistent bitmap cache."

◆ plugin_dyn_intercept

const std::vector<std::string> plugin_dyn_intercept = { RDPGFX_DVC_CHANNEL_NAME }
static

◆ plugin_name

constexpr char plugin_name[] = "bitmap-filter"
staticconstexpr

◆ plugin_static_intercept

const std::vector<std::string> plugin_static_intercept = { DRDYNVC_SVC_CHANNEL_NAME }
static