lazybios 3.0.0
Lightweight SMBIOS/DMI parsing library
Loading...
Searching...
No Matches
dell_type212.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 dell_type212.h
21 * @brief Public API for Dell Indexed I/O Access (Dell OEM SMBIOS Type 212).
22 * @author LazySeldi
23 */
24
25#ifndef LAZYBIOS_OEM_DELL_TYPE212_H
26#define LAZYBIOS_OEM_DELL_TYPE212_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
39
40/** @brief Availability metadata for DELL OEM SMBIOS Type 212 fields. */
50
51/**
52 * @brief Decoded forms of the Dell Type 212 encoded fields.
53 */
54typedef struct {
55 const char* checksum_type;
57
58typedef struct {
59 uint16_t token_id;
60 uint8_t location;
61 uint8_t and_mask;
62 uint8_t or_mask;
64
65/**
66 * @brief Parsed Dell Indexed I/O Access information.
67 * @ingroup api_dell_type212
68 */
83
84/**
85 * @brief A parsed set of Dell OEM Type 212 structures.
86 * @ingroup api_dell_type212
87 */
92
93/** @addtogroup api_dell_type212
94 * @{
95 */
96
97/**
98 * @brief Parses all Dell OEM SMBIOS Type 212 structures.
99 * @param DMIData Raw DMI table container to parse.
100 * @return Newly allocated set, empty when the table holds no such structure,
101 * or NULL when the arguments are unusable or an allocation fails.
102 */
104
105/**
106 * @brief Releases a parsed set of Dell OEM Type 212 structures.
107 * @param DellType212 Set to release; may be NULL.
108 */
110
111/** @} */
112
113#ifdef __cplusplus
114}
115#endif
116
117#endif
LAZYBIOS_WARN_UNUSED lazybiosOemDellType212Array_t * lazybiosGetOemDellType212(const lazybiosDMI_t *DMIData)
Parses all Dell OEM SMBIOS Type 212 structures.
void lazybiosFreeOemDellType212(lazybiosOemDellType212Array_t *DellType212)
Releases a parsed set of Dell OEM Type 212 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 Dell OEM Type 212 structures.
lazybiosOemDellType212_t * entries
Decoded forms of the Dell Type 212 encoded fields.
Availability metadata for DELL OEM SMBIOS Type 212 fields.
lazybiosFieldStatus_t value_index
lazybiosFieldStatus_t index_port
lazybiosFieldStatus_t end_index
lazybiosFieldStatus_t start_index
lazybiosFieldStatus_t checksum_type
lazybiosFieldStatus_t data_port
Parsed Dell Indexed I/O Access information.
lazybiosOemDellType212Decoded_t decoded
lazybiosOemDellType212Token_t * tokens
lazybiosOemDellType212FieldStatus_t field_status