lazybios 3.0.0
Lightweight SMBIOS/DMI parsing library
Loading...
Searching...
No Matches
hp_type204.h
Go to the documentation of this file.
1/*
2 * SPDX-License-Identifier: LGPL-2.1-or-later
3 *
4 * This file is part of lazybios.
5 *
6 * lazybios is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation, either version 2.1 of the License, or
9 * (at your option) any later version.
10 *
11 * lazybios is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with lazybios. If not, see <https://www.gnu.org/licenses/>.
18 */
19/**
20 * @file hp_type204.h
21 * @brief Public API for HPE ProLiant System/Rack Locator (HP OEM SMBIOS Type 204).
22 * @author LazySeldi
23 *
24 * @note Experimental: This HP OEM type is newly added and has not been tested
25 * with real hardware dumps.
26 * @warning Untested.
27 */
28
29#ifndef LAZYBIOS_OEM_HP_TYPE204_H
30#define LAZYBIOS_OEM_HP_TYPE204_H
31
32#ifndef LAZYBIOS_SHARED_API_H
33#define LAZYBIOS_TYPE_HEADER_ONLY
34#include "lazybios/lazybios.h"
35#undef LAZYBIOS_TYPE_HEADER_ONLY
36#endif
37
38#ifdef __cplusplus
39extern "C" {
40#endif
41
42/** @brief Availability metadata for HP OEM SMBIOS Type 204 fields. */
52
53/**
54 * @brief Parsed HPE ProLiant System/Rack Locator information.
55 * @ingroup api_hp_type204
56 *
57 * @note Experimental and untested.
58 */
59typedef struct {
60 uint16_t handle;
61 uint8_t length;
62 const char* rack_name;
63 const char* enclosure_name;
64 const char* enclosure_model;
65 const char* enclosure_serial;
67 const char* server_bay;
68 uint8_t bays_filled;
71
72/**
73 * @brief A parsed set of Hp OEM Type 204 structures.
74 * @ingroup api_hp_type204
75 */
80
81/** @addtogroup api_hp_type204
82 * @{
83 */
84
85/**
86 * @brief Parses all Hp OEM SMBIOS Type 204 structures.
87 * @param DMIData Raw DMI table container to parse.
88 * @return Newly allocated set, empty when the table holds no such structure,
89 * or NULL when the arguments are unusable or an allocation fails.
90 */
92
93/**
94 * @brief Releases a parsed set of Hp OEM Type 204 structures.
95 * @param HpType204 Set to release; may be NULL.
96 */
98
99/** @} */
100
101#ifdef __cplusplus
102}
103#endif
104
105#endif
LAZYBIOS_WARN_UNUSED lazybiosOemHpType204Array_t * lazybiosGetOemHpType204(const lazybiosDMI_t *DMIData)
Parses all Hp OEM SMBIOS Type 204 structures.
void lazybiosFreeOemHpType204(lazybiosOemHpType204Array_t *HpType204)
Releases a parsed set of Hp OEM Type 204 structures.
Public API for lazybios. Include this and nothing else.
uint8_t lazybiosFieldStatus_t
Storage for one field's availability.
Definition lazybios.h:115
#define LAZYBIOS_WARN_UNUSED
Expands to nothing on compilers without a return-value check.
Definition lazybios.h:150
Owns raw DMI table data and its parsed SMBIOS entry point.
Definition lazybios.h:218
A parsed set of Hp OEM Type 204 structures.
Definition hp_type204.h:76
lazybiosOemHpType204_t * entries
Definition hp_type204.h:77
Availability metadata for HP OEM SMBIOS Type 204 fields.
Definition hp_type204.h:43
lazybiosFieldStatus_t enclosure_bays
Definition hp_type204.h:48
lazybiosFieldStatus_t enclosure_serial
Definition hp_type204.h:47
lazybiosFieldStatus_t rack_name
Definition hp_type204.h:44
lazybiosFieldStatus_t server_bay
Definition hp_type204.h:49
lazybiosFieldStatus_t enclosure_model
Definition hp_type204.h:46
lazybiosFieldStatus_t bays_filled
Definition hp_type204.h:50
lazybiosFieldStatus_t enclosure_name
Definition hp_type204.h:45
Parsed HPE ProLiant System/Rack Locator information.
Definition hp_type204.h:59
const char * enclosure_serial
Definition hp_type204.h:65
const char * server_bay
Definition hp_type204.h:67
const char * rack_name
Definition hp_type204.h:62
const char * enclosure_name
Definition hp_type204.h:63
lazybiosOemHpType204FieldStatus_t field_status
Definition hp_type204.h:69
const char * enclosure_model
Definition hp_type204.h:64