lazybios 3.0.0
Lightweight SMBIOS/DMI parsing library
Loading...
Searching...
No Matches
type42.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 type42.h
21 * @brief Public API for SMBIOS Type 42 Management Controller Host Interface.
22 * @author LazySeldi
23 */
24
25#ifndef LAZYBIOS_TYPE42_H
26#define LAZYBIOS_TYPE42_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 an SMBIOS Type 42 protocol record. */
44
45/**
46 * @brief Decoded forms of the encoded fields in one record.
47 */
51
52/**
53 * @brief Parsed protocol record from an SMBIOS Type 42 structure.
54 * @ingroup api_type42
55 */
63
64/** @brief Availability metadata for SMBIOS Type 42 fields. */
72
73/**
74 * @brief Decoded forms of the Type 42 encoded fields.
75 */
76typedef struct {
77 const char* interface_type;
79
80/**
81 * @brief Parsed SMBIOS Type 42 Management Controller Host Interface.
82 * @ingroup api_type42
83 */
96
97/**
98 * @brief A parsed set of SMBIOS Type 42 structures.
99 * @ingroup api_type42
100 */
105
106/** @addtogroup api_type42
107 * @{
108 */
109
110/**
111 * @brief Parses all SMBIOS Type 42 structures.
112 * @param DMIData Raw DMI table container to parse.
113 * @return Newly allocated set, empty when the table holds no Type 42 structure,
114 * or NULL when the arguments are unusable or an allocation fails.
115 */
117
118/**
119 * @brief Releases a parsed set of SMBIOS Type 42 structures.
120 * @param Type42 Set to release; may be NULL.
121 */
123
124/** @} */
125
126#ifdef __cplusplus
127}
128#endif
129
130#endif
LAZYBIOS_WARN_UNUSED lazybiosType42Array_t * lazybiosGetType42(const lazybiosDMI_t *DMIData)
Parses all SMBIOS Type 42 structures.
void lazybiosFreeType42(lazybiosType42Array_t *Type42)
Releases a parsed set of SMBIOS Type 42 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 42 structures.
Definition type42.h:101
lazybiosType42_t * entries
Definition type42.h:102
Decoded forms of the Type 42 encoded fields.
Definition type42.h:76
const char * interface_type
Definition type42.h:77
Availability metadata for SMBIOS Type 42 fields.
Definition type42.h:65
lazybiosFieldStatus_t protocol_records
Definition type42.h:70
lazybiosFieldStatus_t interface_type
Definition type42.h:66
lazybiosFieldStatus_t interface_type_specific_data_length
Definition type42.h:67
lazybiosFieldStatus_t interface_type_specific_data
Definition type42.h:68
lazybiosFieldStatus_t number_of_protocol_records
Definition type42.h:69
Decoded forms of the encoded fields in one record.
Definition type42.h:48
Availability metadata for an SMBIOS Type 42 protocol record.
Definition type42.h:39
lazybiosFieldStatus_t protocol_type_specific_data_length
Definition type42.h:41
lazybiosFieldStatus_t protocol_type_specific_data
Definition type42.h:42
lazybiosFieldStatus_t protocol_type
Definition type42.h:40
Parsed protocol record from an SMBIOS Type 42 structure.
Definition type42.h:56
lazybiosType42ProtocolRecordFieldStatus_t field_status
Definition type42.h:60
lazybiosType42ProtocolRecordDecoded_t decoded
Definition type42.h:61
uint8_t * protocol_type_specific_data
Definition type42.h:59
uint8_t protocol_type_specific_data_length
Definition type42.h:58
Parsed SMBIOS Type 42 Management Controller Host Interface.
Definition type42.h:84
lazybiosType42Decoded_t decoded
Definition type42.h:93
uint8_t * interface_type_specific_data
Definition type42.h:90
size_t interface_type_specific_data_size
Definition type42.h:89
uint8_t length
Definition type42.h:86
uint8_t interface_type
Definition type42.h:87
lazybiosType42FieldStatus_t field_status
Definition type42.h:94
uint8_t number_of_protocol_records
Definition type42.h:91
lazybiosType42ProtocolRecord_t * protocol_records
Definition type42.h:92
uint8_t interface_type_specific_data_length
Definition type42.h:88
uint16_t handle
Definition type42.h:85