remotecontrol.c
Go to the documentation of this file.
57PADICO_MODULE_ATTR(connection, "ControlConnection", "connection mode for RemoteControl", string, "none");
167 struct puk_parse_entity_s pe = puk_xml_parse_buffer(cmd->msg, strlen(cmd->msg), PUK_TRUST_CONTROL);
237 padico_tm_bgthread_start(remote_control.pool, &remote_control_node_send, cmd, "remote_control_node_send");
245 remote_control.in_io = padico_io_register(fd, PADICO_IO_EVENT_READ, &remote_control_control_callback, NULL);
345 padico_warning("missing module attributes- expected: ControlHost, ControlPort, ControlConnection\n");
412 puk_component_t sf_assembly = padico_ns_host_selector(peer_host, "inet", iface_sf, (uint16_t) remote_sa.sin_port, IPPROTO_TCP);
422 rc = (*remote_control.sf.driver->connect)(remote_control.sf._status, (struct sockaddr*) &remote_sa, sizeof(remote_sa),
432 padico_warning("cannot connect to %s:%d; rc=%d (%s). We tried with the following component: \n%s\n",
assert(slab_size > 0)
static puk_iface_t puk_iface_SocketFactory(void)
Definition SocketFactory.h:77
static void puk_instance_indirect_SocketFactory(puk_instance_t instance, const char *label, struct puk_receptacle_SocketFactory_s *receptacle)
Definition SocketFactory.h:77
puk_component_t padico_ns_host_selector(padico_topo_host_t host, const char *profile, puk_iface_t iface, uint16_t port, int protocol)
Definition ns-netselector.c:207
static void padico_control_send_async(padico_topo_node_t node, const char *cmd, padico_task_notifier_t notify, void *key)
Send an async request on the control channel.
Definition PadicoControl.h:108
static void padico_control_event_subscribe(padico_event_listener_t l)
Definition PadicoControl.h:237
void padico_tm_bgthread_start(padico_tm_bgthread_pool_t pool, padico_thread_fun_t f, void *arg, const char *name)
Definition tm-rttask.c:126
void padico_tm_bgthread_pool_wait(padico_tm_bgthread_pool_t pool)
finalize a pool of threads: waits for all thread to complete
Definition tm-rttask.c:78
padico_tm_bgthread_pool_t padico_tm_bgthread_pool_create(const char *name)
create a new thread pool
Definition tm-rttask.c:56
void padico_io_activate(padico_sysio_t io)
Activates the I/O handle - when not activated, the callback is not triggered.
Definition sysio.c:278
padico_sysio_t padico_io_register(int fd, unsigned int what, padico_sysio_callback_t callback, void *key)
Registers a file descriptor for polling.
Definition sysio.c:205
ssize_t padico_sysio_out(int fildes, const void *buf, size_t nbyte)
Definition sysio.c:808
padico_topo_host_t padico_topo_host_resolve_byinaddr(const struct in_addr *addr)
Get a host description record from an inet address (create if it didn't exist)
Definition topology.c:2452
const char * padico_topo_node_getname(padico_topo_node_t node)
Get the canonical name of a node.
Definition topology.c:1917
const struct in_addr * padico_topo_host_getaddr(padico_topo_host_t host)
Get the canonical IP address of a host.
Definition topology.c:1977
typdef struct padico_topo_node_vect_s * padico_topo_node_vect_t
Definition Topology.h:84
padico_topo_node_t padico_topo_getnodebyname(const char *nodename)
node lookup, by node name
Definition topology.c:2389
padico_topo_host_t padico_topo_host_resolvebyname(const char *hostname)
resolve a host from name
Definition topology.c:2681
static void remote_control_connector(void *key, int fd)
Definition remotecontrol.c:241
static puk_opt_type_int_t padico_module_attr_port_getvalue(void)
Definition remotecontrol.c:56
static void remotecontrol_getranks_handler(puk_parse_entity_t e)
Definition remotecontrol.c:327
static int remote_control_control_callback(int fd, void *key)
Definition remotecontrol.c:191
static void remote_control_connection_lost()
Definition remotecontrol.c:185
static void remote_control_control_send(struct remote_control_header_s *hdr, const char *data)
Definition remotecontrol.c:105
static void * remote_control_node_send(void *arg)
Definition remotecontrol.c:161
static puk_opt_type_string_t padico_module_attr_connection_getvalue(void)
Definition remotecontrol.c:57
static puk_opt_type_string_t padico_module_attr_host_getvalue(void)
Definition remotecontrol.c:55
static struct @64 remote_control
static void remote_control_event_listener(void *arg)
Definition remotecontrol.c:293
static void remote_control_unpack_hdr(struct remote_control_header_s *hdr)
Definition remotecontrol.c:98
static void remote_control_new_node(const padico_topo_node_t node)
Definition remotecontrol.c:259
static void remote_control_pack_hdr(struct remote_control_header_s *hdr)
Definition remotecontrol.c:91
static void remote_control_node_callback(padico_rc_t rc, void *key)
Definition remotecontrol.c:116
static void remote_control_del_node(const padico_topo_node_t node)
Definition remotecontrol.c:276
Definition PadicoControl.h:138
@ PADICO_CONTROL_EVENT_INIT_CONTROLER
initial event sent to new controlers to get the past events and current topology state
Definition PadicoControl.h:158
@ PADICO_CONTROL_EVENT_DELETE_NODE
a node was deleted/disconnected/became unreachable
Definition PadicoControl.h:144
@ PADICO_CONTROL_EVENT_NEW_NODE
a new node appeared in the known topology
Definition PadicoControl.h:142
a thread pool, to control and wait running threads
Definition PadicoTM.h:174
Definition remotecontrol.c:156
Definition remotecontrol.c:68