lazybios 3.0.0
Lightweight SMBIOS/DMI parsing library
Loading...
Searching...
No Matches
type0.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 type0.h
21 * @brief Public API for SMBIOS Type 0 BIOS Information.
22 * @author LazySeldi
23 */
24
25#ifndef LAZYBIOS_TYPE0_H
26#define LAZYBIOS_TYPE0_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 0 fields. */
55
56/**
57 * @brief Decoded forms of the Type 0 encoded fields.
58 *
59 * Each member holds the decoded form of the raw field it is named for.
60 * Consult the matching `field_status` member before using one.
61 */
69
70/**
71 * @brief Parsed SMBIOS Type 0 BIOS Information.
72 * @ingroup api_type0
73 */
94
95/**
96 * @brief A parsed set of SMBIOS Type 0 structures.
97 * @ingroup api_type0
98 */
103
104/** @addtogroup api_type0
105 * @{
106 */
107
108/**
109 * @brief Parses all SMBIOS Type 0 structures.
110 * @param DMIData Raw DMI table container to parse.
111 * @return Newly allocated set, empty when the table holds no Type 0 structure,
112 * or NULL when the arguments are unusable or an allocation fails.
113 */
115
116/**
117 * @brief Releases a parsed set of SMBIOS Type 0 structures.
118 * @param Type0 Set to release; may be NULL.
119 */
121
122/** @} */
123
124#ifdef __cplusplus
125}
126#endif
127
128#endif
void lazybiosFreeType0(lazybiosType0Array_t *Type0)
Releases a parsed set of SMBIOS Type 0 structures.
LAZYBIOS_WARN_UNUSED lazybiosType0Array_t * lazybiosGetType0(const lazybiosDMI_t *DMIData)
Parses all SMBIOS Type 0 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 0 structures.
Definition type0.h:99
lazybiosType0_t * entries
Definition type0.h:100
Decoded forms of the Type 0 encoded fields.
Definition type0.h:62
char * characteristics_ext_byte2
Definition type0.h:67
char extended_rom_size_unit[5]
Definition type0.h:64
char * characteristics_ext_byte1
Definition type0.h:66
char * characteristics
Definition type0.h:65
uint16_t extended_rom_size
Definition type0.h:63
Availability metadata for SMBIOS Type 0 fields.
Definition type0.h:39
lazybiosFieldStatus_t firmware_char_ext_bytes_count
Definition type0.h:46
lazybiosFieldStatus_t release_date
Definition type0.h:42
lazybiosFieldStatus_t firmware_char_ext_bytes
Definition type0.h:47
lazybiosFieldStatus_t vendor
Definition type0.h:40
lazybiosFieldStatus_t characteristics
Definition type0.h:45
lazybiosFieldStatus_t bios_starting_segment
Definition type0.h:43
lazybiosFieldStatus_t rom_size
Definition type0.h:44
lazybiosFieldStatus_t version
Definition type0.h:41
lazybiosFieldStatus_t ec_major_release
Definition type0.h:50
lazybiosFieldStatus_t ec_minor_release
Definition type0.h:51
lazybiosFieldStatus_t platform_major_release
Definition type0.h:48
lazybiosFieldStatus_t platform_minor_release
Definition type0.h:49
lazybiosFieldStatus_t extended_rom_size
Definition type0.h:52
lazybiosFieldStatus_t unit
Definition type0.h:53
Parsed SMBIOS Type 0 BIOS Information.
Definition type0.h:74
lazybiosType0Decoded_t decoded
Definition type0.h:91
uint32_t rom_size
Definition type0.h:81
uint8_t length
Definition type0.h:76
uint8_t platform_major_release
Definition type0.h:85
uint16_t bios_starting_segment
Definition type0.h:80
lazybiosType0FieldStatus_t field_status
Definition type0.h:92
uint8_t ec_minor_release
Definition type0.h:88
size_t firmware_char_ext_bytes_count
Definition type0.h:83
char unit[5]
Definition type0.h:90
uint64_t characteristics
Definition type0.h:82
uint16_t extended_rom_size
Definition type0.h:89
uint8_t * firmware_char_ext_bytes
Definition type0.h:84
const char * release_date
Definition type0.h:79
const char * version
Definition type0.h:78
uint16_t handle
Definition type0.h:75
uint8_t ec_major_release
Definition type0.h:87
const char * vendor
Definition type0.h:77
uint8_t platform_minor_release
Definition type0.h:86