Source
zbx_snprintf(linebuf, linebuf_size, "%s %s 2>&1 <%s", config_icmpping->get_fping_location(), params, filename);
/*
** Zabbix
** Copyright (C) 2001-2023 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** 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 General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
static const zbx_config_icmpping_t *config_icmpping;
/* old official fping (2.4b2_to_ipv6) did not support source IP address */
/* old patched versions (2.4b2_to_ipv6) provided either -I or -S options */
/* since fping 3.x it provides -I option for binding to an interface and -S option for source IP address */
static ZBX_THREAD_LOCAL unsigned char source_ip_checked;
static ZBX_THREAD_LOCAL const char *source_ip_option;
static ZBX_THREAD_LOCAL unsigned char source_ip6_checked;
static ZBX_THREAD_LOCAL const char *source_ip6_option;
static ZBX_THREAD_LOCAL int packet_interval;
static ZBX_THREAD_LOCAL int packet_interval6;
static ZBX_THREAD_LOCAL int fping_ipv6_supported;
static ZBX_THREAD_LOCAL time_t fping_check_reset_at; /* time of the last fping options expiration */
static ZBX_THREAD_LOCAL char tmpfile_uniq[255] = {'\0'};
typedef struct
{
ZBX_FPING_HOST *hosts;
int hosts_count;
int requests_count;
unsigned char allow_redirect;
int rdns;
char fping_existence;