Source
/*
** 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/>.
**/
/*************************************************************************************
* *
* Purpose: performs active agent auto registration *
* *
* Parameters: *
* host - [IN] name of host to be added or updated *
* ip - [IN] IP address of host *
* port - [IN] port of host *
* connection_type - [IN] ZBX_TCP_SEC_UNENCRYPTED, *
* ZBX_TCP_SEC_TLS_PSK or ZBX_TCP_SEC_TLS_CERT *
* flag *
* host_metadata - [IN] *
* flag - [IN] flag describing interface type *
* interface - [IN] interface value if flag is not default *
* events_cbs - [IN] *
* config_timeout - [IN] *
* autoreg_update_host_func_cb - [IN] *
* *
* Comments: helper function for get_hostid_by_host *
* *
*************************************************************************************/
static void db_register_host(const char *host, const char *ip, unsigned short port, unsigned int connection_type,
const char *host_metadata, zbx_conn_flags_t flag, const char *interface,
const zbx_events_funcs_t *events_cbs, int config_timeout,
zbx_autoreg_update_host_func_t autoreg_update_host_func_cb)