Source
xxxxxxxxxx
95
95
96
96
#ifdef HAVE_NETSNMP
97
97
typedef struct zbx_snmp_context zbx_snmp_context_t;
98
98
99
99
void *zbx_async_check_snmp_get_arg(zbx_snmp_context_t *snmp_context);
100
100
101
101
zbx_dc_item_context_t *zbx_async_check_snmp_get_item_context(zbx_snmp_context_t *snmp_context);
102
102
103
103
char *zbx_async_check_snmp_get_reverse_dns(zbx_snmp_context_t *snmp_context);
104
104
void zbx_async_check_snmp_clean(zbx_snmp_context_t *snmp_context);
105
-
106
105
int zbx_async_check_snmp(zbx_dc_item_t *item, AGENT_RESULT *result,
107
106
zbx_async_task_process_result_cb_t async_task_process_result_snmp_cb,
108
-
void *arg, void *arg_action, struct event_base *base, struct evdns_base *dnsbase,
109
-
const char *config_source_ip, zbx_async_resolve_reverse_dns_t resolve_reverse_dns, int retries);
107
+
void *arg, void *arg_action, struct event_base *base, zbx_channel_t *channel,
108
+
struct evdns_base *dnsbase, const char *config_source_ip,
109
+
zbx_async_resolve_reverse_dns_t resolve_reverse_dns, int retries);
110
110
111
111
void zbx_set_snmp_bulkwalk_options(const char *progname);
112
112
#endif
113
113
114
114
typedef struct
115
115
{
116
116
zbx_dc_item_context_t item;
117
117
void *arg;
118
118
void *arg_action;
119
119
zbx_socket_t s;
130
130
zbx_async_rdns_step_t rdns_step;
131
131
char *reverse_dns;
132
132
struct zbx_json j;
133
133
}
134
134
zbx_agent_context;
135
135
136
136
void zbx_async_check_agent_clean(zbx_agent_context *agent_context);
137
137
138
138
int zbx_async_check_agent(zbx_dc_item_t *item, AGENT_RESULT *result,
139
139
zbx_async_task_process_result_cb_t async_task_process_result_agent_cb,
140
-
void *arg, void *arg_action, struct event_base *base, struct evdns_base *dnsbase,
141
-
const char *config_source_ip, zbx_async_resolve_reverse_dns_t resolve_reverse_dns);
140
+
void *arg, void *arg_action, struct event_base *base, zbx_channel_t *channel,
141
+
struct evdns_base *dnsbase, const char *config_source_ip,
142
+
zbx_async_resolve_reverse_dns_t resolve_reverse_dns);
142
143
143
144
typedef struct zbx_async_manager zbx_async_manager_t;
144
145
145
146
typedef struct
146
147
{
147
148
zbx_async_manager_t *manager;
148
149
const zbx_thread_info_t *info;
149
150
int state;
150
151
int clear_cache;
151
152
int process_num;
157
158
int config_unreachable_delay;
158
159
int config_unreachable_period;
159
160
int config_max_concurrent_checks_per_poller;
160
161
int config_timeout;
161
162
const char *config_source_ip;
162
163
const char *config_ssl_ca_location;
163
164
const char *config_ssl_cert_location;
164
165
const char *config_ssl_key_location;
165
166
struct event *async_wake_timer;
166
167
struct event *async_timer;
168
+
#ifdef HAVE_ARES
169
+
struct event *async_timeout_timer;
170
+
#endif
167
171
struct event_base *base;
168
172
struct evdns_base *dnsbase;
173
+
zbx_channel_t *channel;
169
174
zbx_hashset_t interfaces;
175
+
zbx_hashset_t fd_events;
170
176
#ifdef HAVE_LIBCURL
171
177
CURLM *curl_handle;
172
178
#endif
173
179
}
174
180
zbx_poller_config_t;
175
181
176
182
#endif /* ZABBIX_ZBX_POLLER_H*/