zabbix-agent2/src/zabbix_server/ipmi/checks_ipmi.c
/******************************************************************************
 *                                                                            *
 * Function: zbx_allocate_ipmi_host                                           *
 *                                                                            *
 * Purpose: create a new element in the global list 'hosts'                   *
 *                                                                            *
 * Return value: pointer to the new list element with host data               *
 *                                                                            *
 ******************************************************************************/
zbx_allocate_ipmi_host

Purpose: create a new element in the global list 'hosts'

Return value: pointer to the new list element with host data
zbx_allocate_ipmi_host Purpose : create a new element in the global list ' hosts ' Return value : pointer to the new list element with host data
static zbx_ipmi_host_t	*zbx_allocate_ipmi_host(const char *ip, int port, int authtype, int privilege,
		const char *username, const char *password)
{
	zbx_ipmi_host_t	*h;
	zabbix_log(LOG_LEVEL_DEBUG, "In %s() host:'[%s]:%d'", __func__, ip, port);
	h = (zbx_ipmi_host_t *)zbx_malloc(NULL, sizeof(zbx_ipmi_host_t));
	memset(h, 0, sizeof(zbx_ipmi_host_t));
	h->ip = strdup(ip);
	h->port = port;
	h->authtype = authtype;
	h->privilege = privilege;
	h->username = strdup(username);
	h->password = strdup(password);
	h->domain_nr = domain_nr++;
	h->next = hosts;
	hosts = h;
	zabbix_log(LOG_LEVEL_DEBUG, "End of %s():%p", __func__, (void *)h);
	return h;
}
static zbx_ipmi_host_t * zbx_allocate_ipmi_host ( const char * ip , int port , int authtype , int privilege , const char * username , const char * password ) { zbx_ipmi_host_t * h ; zabbix_log ( LOG_LEVEL_DEBUG , " " , __func__ , ip , port ) ; h = ( zbx_ipmi_host_t * ) zbx_malloc ( NULL , sizeof ( zbx_ipmi_host_t ) ) ; memset ( h , 0 , sizeof ( zbx_ipmi_host_t ) ) ; h -> ip = strdup ( ip ) ; h -> port = port ; h -> authtype = authtype ; h -> privilege = privilege ; h -> username = strdup ( username ) ; h -> password = strdup ( password ) ; h -> domain_nr = domain_nr ++ ; h -> next = hosts ; hosts = h ; zabbix_log ( LOG_LEVEL_DEBUG , " " , __func__ , ( void * ) h ) ; return h ; }
Function: zbx_allocate_ipmi_host                                           
                                                                            
 Purpose: create a new element in the global list 'hosts'                   
                                                                            
 Return value: pointer to the new list element with host data
Function : zbx_allocate_ipmi_host Purpose : create a new element in the global list ' hosts ' Return value : pointer to the new list element with host data