lazybios 3.0.0
Lightweight SMBIOS/DMI parsing library
Loading...
Searching...
No Matches
type37.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 type37.h
21 * @brief Public API for SMBIOS Type 37 Memory Channel.
22 * @author LazySeldi
23 */
24
25#ifndef LAZYBIOS_TYPE37_H
26#define LAZYBIOS_TYPE37_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 a Type 37 memory-device entry. */
43
44/**
45 * @brief Parsed memory-device association in an SMBIOS Type 37 channel.
46 * @ingroup api_type37
47 */
53
54/** @brief Availability metadata for SMBIOS Type 37 fields. */
61
62/**
63 * @brief Decoded forms of the Type 37 encoded fields.
64 *
65 * Each member holds the decoded form of the raw field it is named for.
66 * Consult the matching `field_status` member before using one.
67 */
68typedef struct {
69 const char* channel_type;
71
72/**
73 * @brief Parsed SMBIOS Type 37 Memory Channel information.
74 * @ingroup api_type37
75 */
86
87/**
88 * @brief A parsed set of SMBIOS Type 37 structures.
89 * @ingroup api_type37
90 */
95
96/** @addtogroup api_type37
97 * @{
98 */
99
100/**
101 * @brief Parses all SMBIOS Type 37 structures.
102 * @param DMIData Raw DMI table container to parse.
103 * @return Newly allocated set, empty when the table holds no Type 37 structure,
104 * or NULL when the arguments are unusable or an allocation fails.
105 */
107
108/**
109 * @brief Releases a parsed set of SMBIOS Type 37 structures.
110 * @param Type37 Set to release; may be NULL.
111 */
113
114/** @} */
115
116#ifdef __cplusplus
117}
118#endif
119
120#endif
LAZYBIOS_WARN_UNUSED lazybiosType37Array_t * lazybiosGetType37(const lazybiosDMI_t *DMIData)
Parses all SMBIOS Type 37 structures.
void lazybiosFreeType37(lazybiosType37Array_t *Type37)
Releases a parsed set of SMBIOS Type 37 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 37 structures.
Definition type37.h:91
lazybiosType37_t * entries
Definition type37.h:92
Decoded forms of the Type 37 encoded fields.
Definition type37.h:68
const char * channel_type
Definition type37.h:69
Availability metadata for SMBIOS Type 37 fields.
Definition type37.h:55
lazybiosFieldStatus_t channel_type
Definition type37.h:56
lazybiosFieldStatus_t memory_devices
Definition type37.h:59
lazybiosFieldStatus_t maximum_channel_load
Definition type37.h:57
lazybiosFieldStatus_t memory_device_count
Definition type37.h:58
Availability metadata for a Type 37 memory-device entry.
Definition type37.h:39
lazybiosFieldStatus_t handle
Definition type37.h:41
Parsed memory-device association in an SMBIOS Type 37 channel.
Definition type37.h:48
lazybiosType37MemoryDeviceFieldStatus_t field_status
Definition type37.h:51
Parsed SMBIOS Type 37 Memory Channel information.
Definition type37.h:76
uint8_t maximum_channel_load
Definition type37.h:80
uint8_t channel_type
Definition type37.h:79
lazybiosType37FieldStatus_t field_status
Definition type37.h:84
uint8_t length
Definition type37.h:78
uint8_t memory_device_count
Definition type37.h:81
lazybiosType37Decoded_t decoded
Definition type37.h:83
lazybiosType37MemoryDevice_t * memory_devices
Definition type37.h:82
uint16_t handle
Definition type37.h:77