lazybios 3.0.0
Lightweight SMBIOS/DMI parsing library
Loading...
Searching...
No Matches
type12.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 type12.h
21 * @brief Public API for SMBIOS Type 12 System Configuration Options.
22 * @author LazySeldi
23 */
24
25#ifndef LAZYBIOS_TYPE12_H
26#define LAZYBIOS_TYPE12_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 12 fields. */
43
44/**
45 * @brief Parsed SMBIOS Type 12 System Configuration Options Information.
46 * @ingroup api_type12
47 */
48typedef struct {
49 uint16_t handle;
50 uint8_t length;
51 uint8_t option_count;
52 const char** options;
55
56/**
57 * @brief A parsed set of SMBIOS Type 12 structures.
58 * @ingroup api_type12
59 */
64
65/** @addtogroup api_type12
66 * @{
67 */
68
69/**
70 * @brief Parses all SMBIOS Type 12 structures.
71 * @param DMIData Raw DMI table container to parse.
72 * @return Newly allocated set, empty when the table holds no Type 12 structure,
73 * or NULL when the arguments are unusable or an allocation fails.
74 */
76
77/**
78 * @brief Releases a parsed set of SMBIOS Type 12 structures.
79 * @param Type12 Set to release; may be NULL.
80 */
82
83/** @} */
84
85#ifdef __cplusplus
86}
87#endif
88
89#endif
LAZYBIOS_WARN_UNUSED lazybiosType12Array_t * lazybiosGetType12(const lazybiosDMI_t *DMIData)
Parses all SMBIOS Type 12 structures.
void lazybiosFreeType12(lazybiosType12Array_t *Type12)
Releases a parsed set of SMBIOS Type 12 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 12 structures.
Definition type12.h:60
lazybiosType12_t * entries
Definition type12.h:61
Availability metadata for SMBIOS Type 12 fields.
Definition type12.h:39
lazybiosFieldStatus_t option_count
Definition type12.h:40
lazybiosFieldStatus_t options
Definition type12.h:41
Parsed SMBIOS Type 12 System Configuration Options Information.
Definition type12.h:48
lazybiosType12FieldStatus_t field_status
Definition type12.h:53
uint16_t handle
Definition type12.h:49
uint8_t length
Definition type12.h:50
const char ** options
Definition type12.h:52
uint8_t option_count
Definition type12.h:51