Source
zbx_ipmi_deserialize_request(message->data, &itemid, &addr, &port, &authtype, &privilege, &username, &password,
/*
** 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: registers IPMI poller with IPMI manager *
* *
* Parameters: socket - [IN] connections socket *
* *
******************************************************************************/
static void ipmi_poller_register(zbx_ipc_async_socket_t *socket)
{
pid_t ppid = getppid();
zbx_ipc_async_socket_send(socket, ZBX_IPC_IPMI_REGISTER, (unsigned char *)&ppid, sizeof(ppid));
}
/******************************************************************************
* *
* Purpose: sends IPMI poll result to manager *
* *
* Parameters: socket - [IN] connections socket *
* code - [IN] *
* errcode - [IN] result error code *
* value - [IN] resulting value/error message *
* *
******************************************************************************/
static void ipmi_poller_send_result(zbx_ipc_async_socket_t *socket, zbx_uint32_t code, int errcode,
const char *value)
{
unsigned char *data;
zbx_uint32_t data_len;
zbx_timespec_t ts;
zbx_timespec(&ts);
data_len = zbx_ipmi_serialize_result(&data, &ts, errcode, value);
zbx_ipc_async_socket_send(socket, code, data, data_len);