lazybios 3.0.0
Lightweight SMBIOS/DMI parsing library
Loading...
Searching...
No Matches
type32.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 type32.h
21 * @brief Public API for SMBIOS Type 32 System Boot Information.
22 * @author LazySeldi
23 */
24
25#ifndef LAZYBIOS_TYPE32_H
26#define LAZYBIOS_TYPE32_H
27
28#ifndef LAZYBIOS_SHARED_API_H
29#define LAZYBIOS_TYPE_HEADER_ONLY
30#include "lazybios/lazybios.h"
31#undef LAZYBIOS_TYPE_HEADER_ONLY
32#endif
33
34#ifdef __cplusplus
35extern "C" {
36#endif
37
38/** @brief Availability metadata for SMBIOS Type 32 fields. */
45
46/**
47 * @brief Decoded forms of the Type 32 encoded fields.
48 *
49 * Each member holds the decoded form of the raw field it is named for.
50 * Consult the matching `field_status` member before using one.
51 */
52typedef struct {
53 const char* boot_status;
55
56/**
57 * @brief Parsed SMBIOS Type 32 System Boot Information.
58 * @ingroup api_type32
59 */
70
71/**
72 * @brief A parsed set of SMBIOS Type 32 structures.
73 * @ingroup api_type32
74 */
79
80/** @addtogroup api_type32
81 * @{
82 */
83
84/**
85 * @brief Parses all SMBIOS Type 32 structures.
86 * @param DMIData Raw DMI table container to parse.
87 * @return Newly allocated set, empty when the table holds no Type 32 structure,
88 * or NULL when the arguments are unusable or an allocation fails.
89 */
91
92/**
93 * @brief Releases a parsed set of SMBIOS Type 32 structures.
94 * @param Type32 Set to release; may be NULL.
95 */
97
98/** @} */
99
100#ifdef __cplusplus
101}
102#endif
103
104#endif
LAZYBIOS_WARN_UNUSED lazybiosType32Array_t * lazybiosGetType32(const lazybiosDMI_t *DMIData)
Parses all SMBIOS Type 32 structures.
void lazybiosFreeType32(lazybiosType32Array_t *Type32)
Releases a parsed set of SMBIOS Type 32 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 SMBIOS Type 32 structures.
Definition type32.h:75
lazybiosType32_t * entries
Definition type32.h:76
Decoded forms of the Type 32 encoded fields.
Definition type32.h:52
const char * boot_status
Definition type32.h:53
Availability metadata for SMBIOS Type 32 fields.
Definition type32.h:39
lazybiosFieldStatus_t additional_data
Definition type32.h:43
lazybiosFieldStatus_t reserved
Definition type32.h:40
lazybiosFieldStatus_t boot_status
Definition type32.h:41
lazybiosFieldStatus_t additional_data_size
Definition type32.h:42
Parsed SMBIOS Type 32 System Boot Information.
Definition type32.h:60
uint8_t length
Definition type32.h:62
uint8_t reserved[6]
Definition type32.h:63
lazybiosType32FieldStatus_t field_status
Definition type32.h:68
uint8_t * additional_data
Definition type32.h:66
uint8_t boot_status
Definition type32.h:64
lazybiosType32Decoded_t decoded
Definition type32.h:67
uint16_t handle
Definition type32.h:61
size_t additional_data_size
Definition type32.h:65