Source
zbx_discoverer_job_t *discoverer_job_create(zbx_dc_drule_t *drule, zbx_vector_ds_dcheck_ptr_t *ds_dchecks_common,
/*
** Copyright (C) 2001-2025 Zabbix SIA
**
** This program is free software: you can redistribute it and/or modify it under the terms of
** the GNU Affero General Public License as published by the Free Software Foundation, version 3.
**
** This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
** without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
** See the GNU Affero General Public License for more details.
**
** You should have received a copy of the GNU Affero General Public License along with this program.
** If not, see <https://www.gnu.org/licenses/>.
**/
ZBX_VECTOR_DECL(iprange, zbx_iprange_t)
ZBX_VECTOR_DECL(portrange, zbx_range_t)
typedef struct
{
zbx_dc_dcheck_t dcheck;
zbx_vector_portrange_t portranges;
}
zbx_ds_dcheck_t;
ZBX_PTR_VECTOR_DECL(ds_dcheck_ptr, zbx_ds_dcheck_t *)
typedef struct
{
zbx_uint64_t druleid;
zbx_list_t tasks;
zbx_uint64_t drule_revision;
int workers_used;
int concurrency_max;
unsigned char status;
zbx_vector_ds_dcheck_ptr_t *ds_dchecks_common;
zbx_vector_iprange_t *ipranges;
}
zbx_discoverer_job_t;
ZBX_PTR_VECTOR_DECL(discoverer_jobs_ptr, zbx_discoverer_job_t*)
typedef struct
{
struct
{
int ipaddress[8];
int index_ip;
int port;
int index_port;
int index_dcheck;
zbx_uint64_t count; /* max count of checks processed by parallel tasks within one range */