pacemaker
2.0.5-ba59be712
Scalable High-Availability cluster resource manager
|
#include <stdbool.h>
#include <stdint.h>
#include <sys/uio.h>
#include <sys/types.h>
#include <glib.h>
#include <libxml/tree.h>
#include <qb/qbipcs.h>
#include <crm_config.h>
#include <crm/common/ipc.h>
#include <crm/common/mainloop.h>
Go to the source code of this file.
Data Structures | |
struct | pcmk__remote_s |
struct | pcmk__client_s |
Macros | |
#define | PCMK__SPECIAL_PID 1 |
#define | PCMK__SPECIAL_PID_AS_0(p) (p) |
#define | PCMK__CLIENT_TYPE(client) ((client)->flags & UINT64_C(0xff00000000)) |
#define | pcmk__set_client_flags(client, flags_to_set) |
#define | pcmk__clear_client_flags(client, flags_to_clear) |
#define | pcmk__set_ipc_flags(ipc_flags, ipc_name, flags_to_set) |
#define | pcmk__clear_ipc_flags(ipc_flags, ipc_name, flags_to_clear) |
#define | pcmk__ipc_send_ack(c, req, flags, tag, st) pcmk__ipc_send_ack_as(__func__, __LINE__, (c), (req), (flags), (tag), (st)) |
Typedefs | |
typedef struct pcmk__client_s | pcmk__client_t |
Enumerations | |
enum | pcmk__client_flags { pcmk__client_ipc = (UINT64_C(1) << 32), pcmk__client_tcp = (UINT64_C(1) << 33), pcmk__client_proxied = (UINT64_C(1) << 40), pcmk__client_privileged = (UINT64_C(1) << 41), pcmk__client_to_proxy = (UINT64_C(1) << 42) } |
Functions | |
int | pcmk__ipc_is_authentic_process_active (const char *name, uid_t refuid, gid_t refgid, pid_t *gotpid) |
guint | pcmk__ipc_client_count (void) |
void | pcmk__foreach_ipc_client (GHFunc func, gpointer user_data) |
void | pcmk__client_cleanup (void) |
pcmk__client_t * | pcmk__find_client (qb_ipcs_connection_t *c) |
pcmk__client_t * | pcmk__find_client_by_id (const char *id) |
const char * | pcmk__client_name (pcmk__client_t *c) |
const char * | pcmk__client_type_str (uint64_t client_type) |
pcmk__client_t * | pcmk__new_unauth_client (void *key) |
Allocate a new pcmk__client_t object and generate its ID. More... | |
pcmk__client_t * | pcmk__new_client (qb_ipcs_connection_t *c, uid_t uid, gid_t gid) |
void | pcmk__free_client (pcmk__client_t *c) |
void | pcmk__drop_all_clients (qb_ipcs_service_t *s) |
bool | pcmk__set_client_queue_max (pcmk__client_t *client, const char *qmax) |
int | pcmk__ipc_send_ack_as (const char *function, int line, pcmk__client_t *c, uint32_t request, uint32_t flags, const char *tag, crm_exit_t status) |
int | pcmk__ipc_prepare_iov (uint32_t request, xmlNode *message, uint32_t max_send_size, struct iovec **result, ssize_t *bytes) |
int | pcmk__ipc_send_xml (pcmk__client_t *c, uint32_t request, xmlNode *message, uint32_t flags) |
int | pcmk__ipc_send_iov (pcmk__client_t *c, struct iovec *iov, uint32_t flags) |
xmlNode * | pcmk__client_data2xml (pcmk__client_t *c, void *data, uint32_t *id, uint32_t *flags) |
int | pcmk__client_pid (qb_ipcs_connection_t *c) |
void | pcmk__serve_attrd_ipc (qb_ipcs_service_t **ipcs, struct qb_ipcs_service_handlers *cb) |
void | pcmk__serve_fenced_ipc (qb_ipcs_service_t **ipcs, struct qb_ipcs_service_handlers *cb) |
qb_ipcs_service_t * | pcmk__serve_controld_ipc (struct qb_ipcs_service_handlers *cb) |
void | pcmk__serve_based_ipc (qb_ipcs_service_t **ipcs_ro, qb_ipcs_service_t **ipcs_rw, qb_ipcs_service_t **ipcs_shm, struct qb_ipcs_service_handlers *ro_cb, struct qb_ipcs_service_handlers *rw_cb) |
void | pcmk__stop_based_ipc (qb_ipcs_service_t *ipcs_ro, qb_ipcs_service_t *ipcs_rw, qb_ipcs_service_t *ipcs_shm) |
#define pcmk__clear_client_flags | ( | client, | |
flags_to_clear | |||
) |
Definition at line 169 of file ipc_internal.h.
#define pcmk__clear_ipc_flags | ( | ipc_flags, | |
ipc_name, | |||
flags_to_clear | |||
) |
Definition at line 183 of file ipc_internal.h.
#define PCMK__CLIENT_TYPE | ( | client | ) | ((client)->flags & UINT64_C(0xff00000000)) |
Definition at line 131 of file ipc_internal.h.
#define pcmk__ipc_send_ack | ( | c, | |
req, | |||
flags, | |||
tag, | |||
st | |||
) | pcmk__ipc_send_ack_as(__func__, __LINE__, (c), (req), (flags), (tag), (st)) |
Definition at line 209 of file ipc_internal.h.
#define pcmk__set_client_flags | ( | client, | |
flags_to_set | |||
) |
Definition at line 162 of file ipc_internal.h.
#define pcmk__set_ipc_flags | ( | ipc_flags, | |
ipc_name, | |||
flags_to_set | |||
) |
Definition at line 176 of file ipc_internal.h.
#define PCMK__SPECIAL_PID 1 |
Definition at line 41 of file ipc_internal.h.
#define PCMK__SPECIAL_PID_AS_0 | ( | p | ) | (p) |
Definition at line 50 of file ipc_internal.h.
typedef struct pcmk__client_s pcmk__client_t |
Definition at line 93 of file ipc_internal.h.
enum pcmk__client_flags |
Enumerator | |
---|---|
pcmk__client_ipc | |
pcmk__client_tcp | |
pcmk__client_proxied | |
pcmk__client_privileged | |
pcmk__client_to_proxy |
Definition at line 115 of file ipc_internal.h.
void pcmk__client_cleanup | ( | void | ) |
Definition at line 104 of file ipc_server.c.
xmlNode* pcmk__client_data2xml | ( | pcmk__client_t * | c, |
void * | data, | ||
uint32_t * | id, | ||
uint32_t * | flags | ||
) |
Definition at line 383 of file ipc_server.c.
const char* pcmk__client_name | ( | pcmk__client_t * | c | ) |
Definition at line 90 of file ipc_server.c.
int pcmk__client_pid | ( | qb_ipcs_connection_t * | c | ) |
Definition at line 362 of file ipc_server.c.
const char* pcmk__client_type_str | ( | uint64_t | client_type | ) |
Definition at line 90 of file ipc_common.c.
void pcmk__drop_all_clients | ( | qb_ipcs_service_t * | s | ) |
Definition at line 118 of file ipc_server.c.
pcmk__client_t* pcmk__find_client | ( | qb_ipcs_connection_t * | c | ) |
Definition at line 59 of file ipc_server.c.
pcmk__client_t* pcmk__find_client_by_id | ( | const char * | id | ) |
Definition at line 70 of file ipc_server.c.
void pcmk__foreach_ipc_client | ( | GHFunc | func, |
gpointer | user_data | ||
) |
Definition at line 51 of file ipc_server.c.
void pcmk__free_client | ( | pcmk__client_t * | c | ) |
Definition at line 295 of file ipc_server.c.
guint pcmk__ipc_client_count | ( | void | ) |
Definition at line 36 of file ipc_server.c.
int pcmk__ipc_is_authentic_process_active | ( | const char * | name, |
uid_t | refuid, | ||
gid_t | refgid, | ||
pid_t * | gotpid | ||
) |
Definition at line 1356 of file ipc_client.c.
int pcmk__ipc_prepare_iov | ( | uint32_t | request, |
xmlNode * | message, | ||
uint32_t | max_send_size, | ||
struct iovec ** | result, | ||
ssize_t * | bytes | ||
) |
Definition at line 577 of file ipc_server.c.
int pcmk__ipc_send_ack_as | ( | const char * | function, |
int | line, | ||
pcmk__client_t * | c, | ||
uint32_t | request, | ||
uint32_t | flags, | ||
const char * | tag, | ||
crm_exit_t | status | ||
) |
Definition at line 779 of file ipc_server.c.
int pcmk__ipc_send_iov | ( | pcmk__client_t * | c, |
struct iovec * | iov, | ||
uint32_t | flags | ||
) |
Definition at line 662 of file ipc_server.c.
int pcmk__ipc_send_xml | ( | pcmk__client_t * | c, |
uint32_t | request, | ||
xmlNode * | message, | ||
uint32_t | flags | ||
) |
Definition at line 741 of file ipc_server.c.
pcmk__client_t* pcmk__new_client | ( | qb_ipcs_connection_t * | c, |
uid_t | uid, | ||
gid_t | gid | ||
) |
Definition at line 214 of file ipc_server.c.
pcmk__client_t* pcmk__new_unauth_client | ( | void * | key | ) |
Allocate a new pcmk__client_t object and generate its ID.
[in] | key | What to use as connections hash table key (NULL to use ID) |
Definition at line 205 of file ipc_server.c.
void pcmk__serve_attrd_ipc | ( | qb_ipcs_service_t ** | ipcs, |
struct qb_ipcs_service_handlers * | cb | ||
) |
Definition at line 878 of file ipc_server.c.
void pcmk__serve_based_ipc | ( | qb_ipcs_service_t ** | ipcs_ro, |
qb_ipcs_service_t ** | ipcs_rw, | ||
qb_ipcs_service_t ** | ipcs_shm, | ||
struct qb_ipcs_service_handlers * | ro_cb, | ||
struct qb_ipcs_service_handlers * | rw_cb | ||
) |
Definition at line 812 of file ipc_server.c.
qb_ipcs_service_t* pcmk__serve_controld_ipc | ( | struct qb_ipcs_service_handlers * | cb | ) |
Definition at line 864 of file ipc_server.c.
void pcmk__serve_fenced_ipc | ( | qb_ipcs_service_t ** | ipcs, |
struct qb_ipcs_service_handlers * | cb | ||
) |
Definition at line 899 of file ipc_server.c.
bool pcmk__set_client_queue_max | ( | pcmk__client_t * | client, |
const char * | qmax | ||
) |
Definition at line 346 of file ipc_server.c.
void pcmk__stop_based_ipc | ( | qb_ipcs_service_t * | ipcs_ro, |
qb_ipcs_service_t * | ipcs_rw, | ||
qb_ipcs_service_t * | ipcs_shm | ||
) |
Definition at line 846 of file ipc_server.c.