2010-11-05 14:22:13 +00:00
|
|
|
/*
|
2012-12-13 15:31:53 +00:00
|
|
|
* virsysinfo.h: get SMBIOS/sysinfo information from the host
|
2010-11-05 14:22:13 +00:00
|
|
|
*
|
2011-02-07 23:16:04 +00:00
|
|
|
* Copyright (C) 2010-2011 Red Hat, Inc.
|
2010-11-05 14:22:13 +00:00
|
|
|
* Copyright (C) 2010 Daniel Veillard
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library 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
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2012-09-20 22:30:55 +00:00
|
|
|
* License along with this library. If not, see
|
2012-07-21 10:06:23 +00:00
|
|
|
* <http://www.gnu.org/licenses/>.
|
2010-11-05 14:22:13 +00:00
|
|
|
*
|
|
|
|
* Author: Daniel Veillard <veillard@redhat.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __VIR_SYSINFOS_H__
|
|
|
|
# define __VIR_SYSINFOS_H__
|
|
|
|
|
|
|
|
# include "internal.h"
|
2012-12-13 17:44:57 +00:00
|
|
|
# include "virutil.h"
|
2012-12-04 12:04:07 +00:00
|
|
|
# include "virbuffer.h"
|
2010-11-05 14:22:13 +00:00
|
|
|
|
2011-05-27 09:47:30 +00:00
|
|
|
enum virSysinfoType {
|
|
|
|
VIR_SYSINFO_SMBIOS,
|
2010-11-05 14:22:13 +00:00
|
|
|
|
2011-05-27 09:47:30 +00:00
|
|
|
VIR_SYSINFO_LAST
|
2010-11-05 14:22:13 +00:00
|
|
|
};
|
|
|
|
|
2011-06-27 07:39:34 +00:00
|
|
|
typedef struct _virSysinfoProcessorDef virSysinfoProcessorDef;
|
|
|
|
typedef virSysinfoProcessorDef *virSysinfoProcessorDefPtr;
|
|
|
|
struct _virSysinfoProcessorDef {
|
2011-06-24 05:42:02 +00:00
|
|
|
char *processor_socket_destination;
|
|
|
|
char *processor_type;
|
|
|
|
char *processor_family;
|
|
|
|
char *processor_manufacturer;
|
|
|
|
char *processor_signature;
|
|
|
|
char *processor_version;
|
|
|
|
char *processor_external_clock;
|
|
|
|
char *processor_max_speed;
|
|
|
|
char *processor_status;
|
|
|
|
char *processor_serial_number;
|
|
|
|
char *processor_part_number;
|
|
|
|
};
|
|
|
|
|
2011-06-27 07:39:34 +00:00
|
|
|
typedef struct _virSysinfoMemoryDef virSysinfoMemoryDef;
|
|
|
|
typedef virSysinfoMemoryDef *virSysinfoMemoryDefPtr;
|
|
|
|
struct _virSysinfoMemoryDef {
|
2011-06-24 06:05:48 +00:00
|
|
|
char *memory_size;
|
|
|
|
char *memory_form_factor;
|
|
|
|
char *memory_locator;
|
|
|
|
char *memory_bank_locator;
|
|
|
|
char *memory_type;
|
|
|
|
char *memory_type_detail;
|
|
|
|
char *memory_speed;
|
|
|
|
char *memory_manufacturer;
|
|
|
|
char *memory_serial_number;
|
|
|
|
char *memory_part_number;
|
|
|
|
};
|
|
|
|
|
2010-11-05 14:22:13 +00:00
|
|
|
typedef struct _virSysinfoDef virSysinfoDef;
|
|
|
|
typedef virSysinfoDef *virSysinfoDefPtr;
|
|
|
|
struct _virSysinfoDef {
|
|
|
|
int type;
|
|
|
|
|
|
|
|
char *bios_vendor;
|
|
|
|
char *bios_version;
|
|
|
|
char *bios_date;
|
|
|
|
char *bios_release;
|
|
|
|
|
|
|
|
char *system_manufacturer;
|
|
|
|
char *system_product;
|
|
|
|
char *system_version;
|
|
|
|
char *system_serial;
|
|
|
|
char *system_uuid;
|
|
|
|
char *system_sku;
|
2010-12-02 00:07:41 +00:00
|
|
|
char *system_family;
|
2011-06-24 05:42:02 +00:00
|
|
|
|
|
|
|
size_t nprocessor;
|
2011-06-27 07:39:34 +00:00
|
|
|
virSysinfoProcessorDefPtr processor;
|
2011-06-24 06:05:48 +00:00
|
|
|
|
|
|
|
size_t nmemory;
|
2011-06-27 07:39:34 +00:00
|
|
|
virSysinfoMemoryDefPtr memory;
|
2010-11-05 14:22:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
virSysinfoDefPtr virSysinfoRead(void);
|
|
|
|
|
|
|
|
void virSysinfoDefFree(virSysinfoDefPtr def);
|
|
|
|
|
2011-09-21 23:28:01 +00:00
|
|
|
int virSysinfoFormat(virBufferPtr buf, virSysinfoDefPtr def)
|
2011-02-07 23:16:04 +00:00
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
|
|
|
|
2011-05-27 09:47:30 +00:00
|
|
|
bool virSysinfoIsEqual(virSysinfoDefPtr src,
|
|
|
|
virSysinfoDefPtr dst);
|
|
|
|
|
|
|
|
VIR_ENUM_DECL(virSysinfo)
|
|
|
|
|
2010-11-05 14:22:13 +00:00
|
|
|
#endif /* __VIR_SYSINFOS_H__ */
|