Source
16
16
** along with this program; if not, write to the Free Software
17
17
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18
18
**/
19
19
20
20
#ifndef ZABBIX_ZBXPROXYBUFFER_H
21
21
#define ZABBIX_ZBXPROXYBUFFER_H
22
22
23
23
#include "zbxalgo.h"
24
24
#include "zbxtime.h"
25
25
#include "zbxjson.h"
26
+
#include "zbxshmem.h"
26
27
27
28
typedef struct
28
29
{
29
30
zbx_uint64_t mem_used;
30
31
zbx_uint64_t mem_total;
31
32
}
32
33
zbx_pb_mem_info_t;
33
34
34
35
typedef struct
35
36
{
45
46
int zbx_pb_parse_mode(const char *str, int *mode);
46
47
int zbx_pb_init(int mode, zbx_uint64_t size, int age, int offline_buffer, char **error);
47
48
void zbx_pb_destroy(void);
48
49
49
50
void zbx_pb_update_state(int more);
50
51
void zbx_pb_disable(void);
51
52
void zbx_pb_flush(void);
52
53
53
54
int zbx_pb_get_mem_info(zbx_pb_mem_info_t *info, char **error);
54
55
void zbx_pb_get_state_info(zbx_pb_state_info_t *info);
56
+
void zbx_pb_get_mem_stats(zbx_shmem_stats_t *stats);
55
57
56
58
/* discovery */
57
59
58
60
typedef struct zbx_pb_discovery_data zbx_pb_discovery_data_t;
59
61
60
62
zbx_pb_discovery_data_t *zbx_pb_discovery_open(void);
61
63
62
64
void zbx_pb_discovery_close(zbx_pb_discovery_data_t *data);
63
65
64
66
void zbx_pb_discovery_write_service(zbx_pb_discovery_data_t *data, zbx_uint64_t druleid, zbx_uint64_t dcheckid,