Source
zbx_uint32_t zbx_discovery_pack_usage_stats(unsigned char **data, const zbx_vector_dbl_t *usage, int count)
/*
** Copyright (C) 2001-2024 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/>.
**/
static int discoverer_initialized = 0;
void zbx_discoverer_init(void)
{
discoverer_initialized = DISCOVERER_INITIALIZED_YES;
}
/******************************************************************************
* *
* Purpose: frees discovery check *
* *
******************************************************************************/
void zbx_discovery_dcheck_free(zbx_dc_dcheck_t *dcheck)
{
zbx_free(dcheck->key_);
zbx_free(dcheck->ports);
if (SVC_SNMPv1 == dcheck->type || SVC_SNMPv2c == dcheck->type || SVC_SNMPv3 == dcheck->type)
{
zbx_free(dcheck->snmp_community);
zbx_free(dcheck->snmpv3_securityname);
zbx_free(dcheck->snmpv3_authpassphrase);
zbx_free(dcheck->snmpv3_privpassphrase);
zbx_free(dcheck->snmpv3_contextname);
}
zbx_free(dcheck);
}
/******************************************************************************
* *
* Purpose: frees discovery rule *
* *
******************************************************************************/
void zbx_discovery_drule_free(zbx_dc_drule_t *drule)
{
zbx_free(drule->delay_str);