int process_sender_history_data(zbx_socket_t *sock, struct zbx_json_parse *jp, zbx_timespec_t *ts, char **info);
#define ZBX_PROXYMODE_ACTIVE 0
#define ZBX_PROXYMODE_PASSIVE 1
#define ZBX_PROXY_UPLOAD_UNDEFINED 0
#define ZBX_PROXY_UPLOAD_DISABLED 1
#define ZBX_PROXY_UPLOAD_ENABLED 2
#define ZBX_PROXY_ACTIVE_CHECK_AVAIL_TIMEOUT 30
ZBX_TEMPLATE_LINK_MANUAL = 0,
ZBX_TEMPLATE_LINK_LLD = 1
zbx_host_template_link_type;
int get_active_proxy_from_request(struct zbx_json_parse *jp, DC_PROXY *proxy, char **error);
int zbx_proxy_check_permissions(const DC_PROXY *proxy, const zbx_socket_t *sock, char **error);
int get_proxyconfig_data(zbx_uint64_t proxy_hostid, struct zbx_json *j, char **error);
int process_proxyconfig(struct zbx_json_parse *jp_data, struct zbx_json_parse *jp_kvs_paths);
int get_interface_availability_data(struct zbx_json *json, int *ts);
int proxy_get_hist_data(struct zbx_json *j, zbx_uint64_t *lastid, int *more);
int proxy_get_dhis_data(struct zbx_json *j, zbx_uint64_t *lastid, int *more);
int proxy_get_areg_data(struct zbx_json *j, zbx_uint64_t *lastid, int *more);
void proxy_set_hist_lastid(const zbx_uint64_t lastid);
void proxy_set_dhis_lastid(const zbx_uint64_t lastid);
void proxy_set_areg_lastid(const zbx_uint64_t lastid);
int proxy_get_host_active_availability(struct zbx_json *j);
int proxy_get_history_count(void);