ipc_glue.c File Reference
`#include <config.h>`
`#include <stdlib.h>`
`#include <stdio.h>`
`#include <errno.h>`
`#include <assert.h>`
`#include <sys/uio.h>`
`#include <string.h>`
`#include <qb/qbdefs.h>`
`#include <qb/qblist.h>`
`#include <qb/qbutil.h>`
`#include <qb/qbloop.h>`
`#include <qb/qbipcs.h>`
`#include <corosync/swab.h>`
`#include <corosync/corotypes.h>`
`#include <corosync/corodefs.h>`
`#include <corosync/totem/totempg.h>`
`#include <corosync/logsys.h>`
`#include <corosync/icmap.h>`
`#include "sync.h"`
`#include "timer.h"`
`#include "main.h"`
`#include "util.h"`
`#include "apidef.h"`
`#include "service.h"`
`#include "ipcs_stats.h"`
`#include "stats.h"`
Include dependency graph for ipc_glue.c:

Go to the source code of this file.

## Data Structures

struct | cs_ipcs_mapper
struct | outq_item

## Macros

#define | CS_IPCS_MAPPER_SERV_NAME 256

## Functions

| LOGSYS_DECLARE_SUBSYS ("MAIN")
void | cs_ipc_allow_connections (int32_t allow)
int32_t | cs_ipcs_service_destroy (int32_t service_id)
void | cs_ipc_refcnt_inc (void *conn)
void | cs_ipc_refcnt_dec (void *conn)
void * | cs_ipcs_private_data_get (void *conn)
int | cs_ipcs_response_iov_send (void *conn, const struct iovec *iov, unsigned int iov_len)
int | cs_ipcs_response_send (void *conn, const void *msg, size_t mlen)
int | cs_ipcs_dispatch_send (void *conn, const void *msg, size_t mlen)
int | cs_ipcs_dispatch_iov_send (void *conn, const struct iovec *iov, unsigned int iov_len)
int32_t | cs_ipcs_q_level_get (void)
void | cs_ipcs_sync_state_changed (int32_t sync_in_process)
void | cs_ipcs_get_global_stats (struct ipcs_global_stats *ipcs_stats)
cs_error_t | cs_ipcs_get_conn_stats (int service_id, uint32_t pid, void *conn_ptr, struct ipcs_conn_stats *ipcs_stats)
void | cs_ipcs_clear_stats (void)
const char * | cs_ipcs_service_init (struct corosync_service_engine *service)
void | cs_ipcs_init (void)

## Macro Definition Documentation

## CS_IPCS_MAPPER_SERV_NAME

#define CS_IPCS_MAPPER_SERV_NAME 256

Definition at line 75 of file ipc_glue.c.

Referenced by cs_ipcs_service_init().

## Function Documentation

## cs_ipc_allow_connections()

void cs_ipc_allow_connections | ( | int32_t | allow | ) |

Definition at line 159 of file ipc_glue.c.

## cs_ipc_refcnt_dec()

void cs_ipc_refcnt_dec | ( | void * | conn | ) |

Definition at line 307 of file ipc_glue.c.

## cs_ipc_refcnt_inc()

void cs_ipc_refcnt_inc | ( | void * | conn | ) |

Definition at line 302 of file ipc_glue.c.

## cs_ipcs_clear_stats()

void cs_ipcs_clear_stats | ( | void |  | ) |

Definition at line 709 of file ipc_glue.c.

References ipcs_conn_stats::cnx, ipcs_conn_stats::conn, cs_ipcs_conn_context::invalid_request, cs_ipcs_conn_context::overload, cs_ipcs_conn_context::sent, and SERVICES_COUNT_MAX.

Referenced by stats_map_set().

## cs_ipcs_dispatch_iov_send()

int cs_ipcs_dispatch_iov_send | ( | void * | conn,
|  | const struct iovec * | iov,
|  | unsigned int | iov_len )

Definition at line 483 of file ipc_glue.c.

## cs_ipcs_dispatch_send()

int cs_ipcs_dispatch_send | ( | void * | conn,
|  | const void * | msg,
|  | size_t | mlen )

Definition at line 474 of file ipc_glue.c.

## cs_ipcs_get_conn_stats()

cs_error_t cs_ipcs_get_conn_stats | ( | int | service_id,
|  | uint32_t | pid,
|  | void * | conn_ptr,
|  | struct ipcs_conn_stats * | ipcs_stats )

Definition at line 675 of file ipc_glue.c.

References ipcs_conn_stats::cnx, ipcs_conn_stats::conn, corosync_service, CS_ERR_NOT_EXIST, CS_OK, and ipcs_conn_stats::srv.

Referenced by stats_map_get().

## cs_ipcs_get_global_stats()

void cs_ipcs_get_global_stats | ( | struct ipcs_global_stats * | ipcs_stats | ) |

Definition at line 670 of file ipc_glue.c.

Referenced by stats_map_get().

## cs_ipcs_init()

void cs_ipcs_init | ( | void |  | ) |

Definition at line 818 of file ipc_glue.c.

References apidef_get(), cs_poll_handle_get(), and totempg_queue_level_register_callback().

## cs_ipcs_private_data_get()

void * cs_ipcs_private_data_get | ( | void * | conn | ) |

Definition at line 312 of file ipc_glue.c.

References cs_ipcs_conn_context::data.

## cs_ipcs_q_level_get()

int32_t cs_ipcs_q_level_get | ( | void |  | ) |

Definition at line 601 of file ipc_glue.c.

Referenced by corosync_recheck_the_q_level().

## cs_ipcs_response_iov_send()

int cs_ipcs_response_iov_send | ( | void * | conn,
|  | const struct iovec * | iov,
|  | unsigned int | iov_len )

Definition at line 363 of file ipc_glue.c.

## cs_ipcs_response_send()

int cs_ipcs_response_send | ( | void * | conn,
|  | const void * | msg,
|  | size_t | mlen )

Definition at line 374 of file ipc_glue.c.

## cs_ipcs_service_destroy()

int32_t cs_ipcs_service_destroy | ( | int32_t | service_id | ) |

Definition at line 164 of file ipc_glue.c.

## cs_ipcs_service_init()

const char * cs_ipcs_service_init | ( | struct corosync_service_engine * | service | ) |

Definition at line 778 of file ipc_glue.c.

References CS_IPCS_MAPPER_SERV_NAME, corosync_service_engine::id, corosync_service_engine::lib_engine_count, log_printf, LOGSYS_LEVEL_DEBUG, and LOGSYS_LEVEL_ERROR.

Referenced by corosync_service_link_and_init().

## cs_ipcs_sync_state_changed()

void cs_ipcs_sync_state_changed | ( | int32_t | sync_in_process | ) |

Definition at line 664 of file ipc_glue.c.

## LOGSYS_DECLARE_SUBSYS()

LOGSYS_DECLARE_SUBSYS | ( | "MAIN" |  | ) |