FreeRDP
pf_modules.c File Reference
#include <winpr/assert.h>
#include <winpr/file.h>
#include <winpr/wlog.h>
#include <winpr/path.h>
#include <winpr/library.h>
#include <freerdp/api.h>
#include <freerdp/build-config.h>
#include <freerdp/server/proxy/proxy_log.h>
#include <freerdp/server/proxy/proxy_modules_api.h>
#include <freerdp/server/proxy/proxy_context.h>
#include "proxy_modules.h"

Macros

#define TAG   PROXY_TAG("modules")
 
#define MODULE_ENTRY_POINT   "proxy_module_entry_point"
 

Functions

static const char * pf_modules_get_filter_type_string (PF_FILTER_TYPE result)
 
static const char * pf_modules_get_hook_type_string (PF_HOOK_TYPE result)
 
static BOOL pf_modules_proxy_ArrayList_ForEachFkt (void *data, size_t index, va_list ap)
 
BOOL pf_modules_run_hook (proxyModule *module, PF_HOOK_TYPE type, proxyData *pdata, void *custom)
 
static BOOL pf_modules_ArrayList_ForEachFkt (void *data, size_t index, va_list ap)
 
BOOL pf_modules_run_filter (proxyModule *module, PF_FILTER_TYPE type, proxyData *pdata, void *param)
 
static BOOL pf_modules_set_plugin_data (proxyPluginsManager *mgr, const char *plugin_name, proxyData *pdata, void *data)
 
static void * pf_modules_get_plugin_data (proxyPluginsManager *mgr, const char *plugin_name, proxyData *pdata)
 
static void pf_modules_abort_connect (proxyPluginsManager *mgr, proxyData *pdata)
 
static BOOL pf_modules_register_ArrayList_ForEachFkt (void *data, size_t index, va_list ap)
 
static BOOL pf_modules_register_plugin (proxyPluginsManager *mgr, const proxyPlugin *plugin_to_register)
 
static BOOL pf_modules_load_ArrayList_ForEachFkt (void *data, size_t index, va_list ap)
 
BOOL pf_modules_is_plugin_loaded (proxyModule *module, const char *plugin_name)
 
static BOOL pf_modules_print_ArrayList_ForEachFkt (void *data, size_t index, va_list ap)
 
void pf_modules_list_loaded_plugins (proxyModule *module)
 
static BOOL pf_modules_load_module (const char *module_path, proxyModule *module, void *userdata)
 
static void free_handle (void *obj)
 
static void free_plugin (void *obj)
 
static void * new_plugin (const void *obj)
 
proxyModule * pf_modules_new (const char *root_dir, const char **modules, size_t count)
 
void pf_modules_free (proxyModule *module)
 
BOOL pf_modules_add (proxyModule *module, proxyModuleEntryPoint ep, void *userdata)
 pf_modules_add Registers a new plugin More...
 

Variables

static const char * FILTER_TYPE_STRINGS []
 
static const char * HOOK_TYPE_STRINGS []
 

Macro Definition Documentation

◆ MODULE_ENTRY_POINT

#define MODULE_ENTRY_POINT   "proxy_module_entry_point"

◆ TAG

#define TAG   PROXY_TAG("modules")

FreeRDP: A Remote Desktop Protocol Implementation FreeRDP Proxy Server modules API

Copyright 2019 Kobi Mizrachi kmizr.nosp@m.achi.nosp@m.18@gm.nosp@m.ail..nosp@m.com Copyright 2019 Idan Freiberg speid.nosp@m.y@gm.nosp@m.ail.c.nosp@m.om Copyright 2021 Armin Novak anova.nosp@m.k@th.nosp@m.incas.nosp@m.t.co.nosp@m.m Copyright 2021 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

◆ free_handle()

static void free_handle ( void *  obj)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ free_plugin()

static void free_plugin ( void *  obj)
static
Here is the caller graph for this function:

◆ new_plugin()

static void* new_plugin ( const void *  obj)
static
Here is the caller graph for this function:

◆ pf_modules_abort_connect()

static void pf_modules_abort_connect ( proxyPluginsManager *  mgr,
proxyData *  pdata 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pf_modules_add()

BOOL pf_modules_add ( proxyModule *  module,
proxyModuleEntryPoint  ep,
void *  userdata 
)

pf_modules_add Registers a new plugin

Parameters
epA module entry point function, must NOT be NULL
Returns
TRUE for success, FALSE otherwise
Here is the caller graph for this function:

◆ pf_modules_ArrayList_ForEachFkt()

static BOOL pf_modules_ArrayList_ForEachFkt ( void *  data,
size_t  index,
va_list  ap 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pf_modules_free()

void pf_modules_free ( proxyModule *  module)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pf_modules_get_filter_type_string()

static const char* pf_modules_get_filter_type_string ( PF_FILTER_TYPE  result)
static
Here is the caller graph for this function:

◆ pf_modules_get_hook_type_string()

static const char* pf_modules_get_hook_type_string ( PF_HOOK_TYPE  result)
static
Here is the caller graph for this function:

◆ pf_modules_get_plugin_data()

static void* pf_modules_get_plugin_data ( proxyPluginsManager *  mgr,
const char *  plugin_name,
proxyData *  pdata 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pf_modules_is_plugin_loaded()

BOOL pf_modules_is_plugin_loaded ( proxyModule *  module,
const char *  plugin_name 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pf_modules_list_loaded_plugins()

void pf_modules_list_loaded_plugins ( proxyModule *  module)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pf_modules_load_ArrayList_ForEachFkt()

static BOOL pf_modules_load_ArrayList_ForEachFkt ( void *  data,
size_t  index,
va_list  ap 
)
static
Here is the caller graph for this function:

◆ pf_modules_load_module()

static BOOL pf_modules_load_module ( const char *  module_path,
proxyModule *  module,
void *  userdata 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pf_modules_new()

proxyModule* pf_modules_new ( const char *  root_dir,
const char **  modules,
size_t  count 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pf_modules_print_ArrayList_ForEachFkt()

static BOOL pf_modules_print_ArrayList_ForEachFkt ( void *  data,
size_t  index,
va_list  ap 
)
static
Here is the caller graph for this function:

◆ pf_modules_proxy_ArrayList_ForEachFkt()

static BOOL pf_modules_proxy_ArrayList_ForEachFkt ( void *  data,
size_t  index,
va_list  ap 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pf_modules_register_ArrayList_ForEachFkt()

static BOOL pf_modules_register_ArrayList_ForEachFkt ( void *  data,
size_t  index,
va_list  ap 
)
static
Here is the caller graph for this function:

◆ pf_modules_register_plugin()

static BOOL pf_modules_register_plugin ( proxyPluginsManager *  mgr,
const proxyPlugin *  plugin_to_register 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pf_modules_run_filter()

BOOL pf_modules_run_filter ( proxyModule *  module,
PF_FILTER_TYPE  type,
proxyData *  pdata,
void *  param 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pf_modules_run_hook()

BOOL pf_modules_run_hook ( proxyModule *  module,
PF_HOOK_TYPE  type,
proxyData *  pdata,
void *  custom 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pf_modules_set_plugin_data()

static BOOL pf_modules_set_plugin_data ( proxyPluginsManager *  mgr,
const char *  plugin_name,
proxyData *  pdata,
void *  data 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ FILTER_TYPE_STRINGS

const char* FILTER_TYPE_STRINGS[]
static
Initial value:
= { "KEYBOARD_EVENT", "MOUSE_EVENT", "CLIENT_CHANNEL_DATA",
"SERVER_CHANNEL_DATA", "SERVER_FETCH_TARGET_ADDR" }

◆ HOOK_TYPE_STRINGS

const char* HOOK_TYPE_STRINGS[]
static
Initial value:
= {
"CLIENT_PRE_CONNECT", "CLIENT_POST_CONNECT", "CLIENT_LOGIN_FAILURE", "CLIENT_END_PAINT",
"SERVER_POST_CONNECT", "SERVER_CHANNELS_INIT", "SERVER_CHANNELS_FREE", "SERVER_SESSION_END",
}