SocketFactory for socket over reversed SSH tunnel. More...
#include <Padico/PadicoTM.h>#include <Padico/VLink-internals.h>#include <Padico/Module.h>#include <Padico/SocketFactory.h>
Go to the source code of this file.
Data Structures | |
| struct | sfsrtun_instance_s |
| instance of SocketFactory-srtun More... | |
Functions | |
| static int | sfsrtun_module_init (void) |
| static void | sfsrtun_module_finalize (void) |
| static void | padico_module_create_initializer__SocketFactory_Reversed_SSH_Tunnel (void) |
| static int | sfsrtun_create (void *_instance, int family, int type, int protocol) |
| static int | sfsrtun_connect (void *_instance, const struct sockaddr *addr, socklen_t addrlen, padico_socketfactory_connector_t notifier, void *key) |
| static int | sfsrtun_close (void *_instance) |
| static void * | sfsrtun_instantiate (puk_instance_t, puk_context_t) |
| static void | sfsrtun_destroy (void *) |
| static int | sfsrtun_callback_connector (int fd, void *key) |
| static void | sfsrtun_connect_server_end_handler (puk_parse_entity_t e) |
| static void | sfsrtun_close_end_handler (puk_parse_entity_t e) |
| static int | sfsrtun_launch_server (struct sfsrtun_instance_s *instance, struct sockaddr_in *inaddr) |
| static void * | sfsrtun_connector_finalizer (void *_instance) |
| static void | sfsrtun_server_set_error (puk_parse_entity_t e, char *error) |
| Server. | |
Detailed Description
SocketFactory for socket over reversed SSH tunnel.
- Note
- obsolete, probably broken
Definition in file sf-srtun.c.
Function Documentation
◆ padico_module_create_initializer__SocketFactory_Reversed_SSH_Tunnel()
Definition at line 39 of file sf-srtun.c.
◆ sfsrtun_callback_connector()
Definition at line 404 of file sf-srtun.c.
References assert(), done, fd, instance, key, padico_tm_bgthread_start(), sfsrtun, and sfsrtun_connector_finalizer().
Referenced by sfsrtun_create().
◆ sfsrtun_close()
Definition at line 361 of file sf-srtun.c.
References __attribute__, __puk_abi_wrap__errno, done, instance, NULL, padico_control_send_oneway(), padico_io_deactivate(), padico_io_unregister(), padico_topo_getlocalhost, padico_topo_host_getname(), padico_topo_host_getnode(), PUK_ABI_FSYS_WRAP, and rc.
Referenced by sfsrtun_destroy().
◆ sfsrtun_close_end_handler()
|
static |
Definition at line 426 of file sf-srtun.c.
Referenced by sfsrtun_module_init().
◆ sfsrtun_connect()
|
static |
Definition at line 281 of file sf-srtun.c.
References __puk_abi_wrap__errno, done, instance, key, NULL, padico_io_activate(), padico_tm_msleep(), padico_topo_host_getname(), padico_topo_host_resolve_byinaddr(), padico_topo_host_resolvebyname(), PUK_ABI_FSYS_WRAP, rc, retry, and sfsrtun_launch_server().
◆ sfsrtun_connect_server_end_handler()
|
static |
Definition at line 435 of file sf-srtun.c.
References assert(), done, e, NULL, padico_topo_host_resolvebyname(), padico_topo_hostname, pid, PUK_ABI_PROC_REAL, puk_abi_real_errno, puk_spinlock_acquire(), puk_spinlock_release(), rc, sfsrtun_server, and sfsrtun_server_set_error().
Referenced by sfsrtun_module_init().
◆ sfsrtun_connector_finalizer()
Definition at line 397 of file sf-srtun.c.
References done, instance, and NULL.
Referenced by sfsrtun_callback_connector().
◆ sfsrtun_create()
< the fildes is writable
Definition at line 215 of file sf-srtun.c.
References assert(), done, fd, instance, PADICO_IO_EVENT_WRITE, padico_io_register(), padico_sysio_errno(), padico_sysio_socket(), sfsrtun_callback_connector(), and type.
◆ sfsrtun_destroy()
Definition at line 191 of file sf-srtun.c.
References done, instance, puk_abi_real_errno, puk_spinlock_acquire(), puk_spinlock_release(), rc, and sfsrtun_close().
◆ sfsrtun_instantiate()
|
static |
Definition at line 167 of file sf-srtun.c.
References done, instance, NULL, sfsrtun, and sfsrtun_instance_s::ssh_port.
◆ sfsrtun_launch_server()
|
static |
Definition at line 234 of file sf-srtun.c.
References done, instance, NULL, padico_control_send(), padico_tm_req_wait(), padico_topo_host_getname(), padico_topo_host_getnode(), rc, and req.
Referenced by sfsrtun_connect().
◆ sfsrtun_module_finalize()
Definition at line 159 of file sf-srtun.c.
References padico_tm_bgthread_pool_wait(), and sfsrtun.
◆ sfsrtun_module_init()
Definition at line 124 of file sf-srtun.c.
References done, NULL, padico_tm_bgthread_pool_create(), sfsrtun, sfsrtun_close_end_handler(), sfsrtun_component_driver, sfsrtun_connect_server_end_handler(), sfsrtun_server, and sfsrtun_sf_driver.
◆ sfsrtun_server_set_error()
|
static |
Server.
Definition at line 418 of file sf-srtun.c.
Referenced by sfsrtun_connect_server_end_handler().
Variable Documentation
◆ connections_mtx
| pthread_mutex_t connections_mtx |
Definition at line 106 of file sf-srtun.c.
◆ iface_sf
| puk_iface_t iface_sf |
Definition at line 104 of file sf-srtun.c.
◆ next_id
Definition at line 105 of file sf-srtun.c.
◆ padico_mod_binary__SocketFactory_Reversed_SSH_Tunnel
| struct puk_mod_binary_s padico_mod_binary__SocketFactory_Reversed_SSH_Tunnel = { .name = "SocketFactory_Reversed_SSH_Tunnel", .funcs = &padico_mod_funcs__SocketFactory_Reversed_SSH_Tunnel , .mod = NULL, .profile = { .total_mem = 0, .max_mem = 0, .num_malloc = 0, .num_free = 0 } , .auto_deps = & puk_mod_dep_0 , .n_deps = sizeof((char*[]){ 0, "SysIO", "Topology", "PadicoControl" }) / sizeof(char*), .deps = { NULL, "SysIO", "Topology", "PadicoControl" } } |
Definition at line 39 of file sf-srtun.c.
◆ padico_mod_funcs__SocketFactory_Reversed_SSH_Tunnel
|
static |
Definition at line 39 of file sf-srtun.c.
◆ pid
| int pid |
Definition at line 112 of file sf-srtun.c.
Referenced by bench_cond(), bench_cond(), jxta_rdvclient_listener_run(), jxta_rdvserver_run(), padico_shm_directory_clean(), sfsnc_connect(), sfsrtun_connect_server_end_handler(), sfssh2_connect(), sfstun_build_tunnel(), sh_unit_start(), topology_populate(), and waiting_child().
◆ pool
Definition at line 107 of file sf-srtun.c.
◆ port_offset
| int port_offset |
Definition at line 102 of file sf-srtun.c.
Referenced by ssh2_control_bootstrap_auto_port(), and sysio_control_bootstrap_auto_port().
◆ [struct]
| struct { ... } sfsrtun |
Referenced by sfsrtun_callback_connector(), sfsrtun_instantiate(), sfsrtun_module_finalize(), and sfsrtun_module_init().
◆ [struct]
| struct { ... } sfsrtun_server |
Referenced by sfsrtun_connect_server_end_handler(), and sfsrtun_module_init().