Source
63
63
ZBX_PTR_VECTOR_DECL(rtc_hook, zbx_rtc_hook_t *)
64
64
65
65
typedef struct
66
66
{
67
67
zbx_ipc_service_t service;
68
68
zbx_vector_rtc_sub_t subs;
69
69
zbx_vector_rtc_hook_t hooks;
70
70
}
71
71
zbx_rtc_t;
72
72
73
-
typedef int (*zbx_rtc_process_request_ex_func_t)(zbx_rtc_t *, int, const unsigned char *, char **);
73
+
typedef int (*zbx_rtc_process_request_ex_func_t)(zbx_rtc_t *, zbx_uint32_t, const unsigned char *, char **);
74
74
75
75
/* provider API */
76
76
int zbx_rtc_init(zbx_rtc_t *rtc ,char **error);
77
77
void zbx_rtc_dispatch(zbx_rtc_t *rtc, zbx_ipc_client_t *client, zbx_ipc_message_t *message,
78
78
zbx_rtc_process_request_ex_func_t cb_proc_req);
79
79
int zbx_rtc_wait_config_sync(zbx_rtc_t *rtc, zbx_rtc_process_request_ex_func_t cb_proc_req);
80
80
void zbx_rtc_shutdown_subs(zbx_rtc_t *rtc);
81
81
82
82
/* client API */
83
83
void zbx_rtc_notify_config_sync(int config_timeout, zbx_ipc_async_socket_t *rtc);
85
85
void zbx_rtc_subscribe(unsigned char proc_type, int proc_num, zbx_uint32_t *msgs, int msgs_num, int config_timeout,
86
86
zbx_ipc_async_socket_t *rtc);
87
87
void zbx_rtc_subscribe_service(unsigned char proc_type, int proc_num, zbx_uint32_t *msgs, int msgs_num,
88
88
int config_timeout, const char *service);
89
89
int zbx_rtc_wait(zbx_ipc_async_socket_t *rtc, const zbx_thread_info_t *info, zbx_uint32_t *cmd,
90
90
unsigned char **data, int timeout);
91
91
int zbx_rtc_reload_config_cache(char **error);
92
92
93
93
int zbx_rtc_parse_options(const char *opt, zbx_uint32_t *code, struct zbx_json *j, char **error);
94
94
int zbx_rtc_notify(zbx_rtc_t *rtc, unsigned char process_type, int process_num, zbx_uint32_t code,
95
-
const unsigned char *data, zbx_uint32_t size);
95
+
const char *data, zbx_uint32_t size);
96
96
97
97
int zbx_rtc_async_exchange(char **data, zbx_uint32_t code, int config_timeout, char **error);
98
98
99
99
int zbx_rtc_get_command_target(const char *data, pid_t *pid, int *proc_type, int *proc_num, int *scope,
100
100
char **result);
101
101
102
102
void zbx_rtc_sub_free(zbx_rtc_sub_t *sub);
103
103
#endif