lazybios 3.0.0
Lightweight SMBIOS/DMI parsing library
Loading...
Searching...
No Matches
type9.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 type9.h
21 * @brief Public API for SMBIOS Type 9 System Slots.
22 * @author LazySeldi
23 */
24
25#ifndef LAZYBIOS_TYPE9_H
26#define LAZYBIOS_TYPE9_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 9 peer group. */
45
46/**
47 * @brief Decoded forms of the encoded fields in one peer group.
48 */
53
54/**
55 * @brief Parsed SMBIOS Type 9 peer grouping entry.
56 * @ingroup api_type9
57 */
66
67/** @brief Availability metadata for SMBIOS Type 9 fields. */
88
89/**
90 * @brief Decoded forms of the Type 9 encoded fields.
91 *
92 * Each member holds the decoded form of the raw field it is named for.
93 * Consult the matching `field_status` member before using one.
94 */
107
108/**
109 * @brief Parsed SMBIOS Type 9 System Slots Information.
110 * @ingroup api_type9
111 */
136
137/**
138 * @brief A parsed set of SMBIOS Type 9 structures.
139 * @ingroup api_type9
140 */
145
146/** @addtogroup api_type9
147 * @{
148 */
149
150/**
151 * @brief Parses all SMBIOS Type 9 structures.
152 * @param DMIData Raw DMI table container to parse.
153 * @return Newly allocated set, empty when the table holds no Type 9 structure,
154 * or NULL when the arguments are unusable or an allocation fails.
155 */
157/**
158 * @brief Releases a parsed set of SMBIOS Type 9 structures.
159 * @param Type9 Set to release; may be NULL.
160 */
162
163/** @} */
164
165#ifdef __cplusplus
166}
167#endif
168
169#endif
void lazybiosFreeType9(lazybiosType9Array_t *Type9)
Releases a parsed set of SMBIOS Type 9 structures.
LAZYBIOS_WARN_UNUSED lazybiosType9Array_t * lazybiosGetType9(const lazybiosDMI_t *DMIData)
Parses all SMBIOS Type 9 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 9 structures.
Definition type9.h:141
lazybiosType9_t * entries
Definition type9.h:142
Decoded forms of the Type 9 encoded fields.
Definition type9.h:95
const char * data_bus_width
Definition type9.h:97
char * slot_characteristics_1
Definition type9.h:103
const char * slot_physical_width
Definition type9.h:101
const char * slot_length
Definition type9.h:100
const char * current_usage
Definition type9.h:96
char * slot_characteristics_2
Definition type9.h:104
const char * slot_data_bus_width
Definition type9.h:98
const char * slot_type
Definition type9.h:102
const char * slot_height
Definition type9.h:99
char * device_function_number
Definition type9.h:105
Availability metadata for SMBIOS Type 9 fields.
Definition type9.h:68
lazybiosFieldStatus_t slot_designation
Definition type9.h:69
lazybiosFieldStatus_t bus_number
Definition type9.h:78
lazybiosFieldStatus_t slot_data_bus_width
Definition type9.h:71
lazybiosFieldStatus_t slot_physical_width
Definition type9.h:84
lazybiosFieldStatus_t slot_characteristics_2
Definition type9.h:76
lazybiosFieldStatus_t slot_characteristics_1
Definition type9.h:75
lazybiosFieldStatus_t peer_groups
Definition type9.h:82
lazybiosFieldStatus_t data_bus_width
Definition type9.h:80
lazybiosFieldStatus_t device_function_number
Definition type9.h:79
lazybiosFieldStatus_t current_usage
Definition type9.h:72
lazybiosFieldStatus_t slot_height
Definition type9.h:86
lazybiosFieldStatus_t slot_information
Definition type9.h:83
lazybiosFieldStatus_t slot_type
Definition type9.h:70
lazybiosFieldStatus_t slot_pitch
Definition type9.h:85
lazybiosFieldStatus_t slot_id
Definition type9.h:74
lazybiosFieldStatus_t slot_length
Definition type9.h:73
lazybiosFieldStatus_t segment_group_number
Definition type9.h:77
lazybiosFieldStatus_t peer_grouping_count
Definition type9.h:81
Decoded forms of the encoded fields in one peer group.
Definition type9.h:49
const char * data_bus_width
Definition type9.h:50
Availability metadata for a Type 9 peer group.
Definition type9.h:39
lazybiosFieldStatus_t bus_number
Definition type9.h:41
lazybiosFieldStatus_t segment_group_number
Definition type9.h:40
lazybiosFieldStatus_t device_function_number
Definition type9.h:42
lazybiosFieldStatus_t data_bus_width
Definition type9.h:43
Parsed SMBIOS Type 9 peer grouping entry.
Definition type9.h:58
uint16_t segment_group_number
Definition type9.h:59
lazybiosType9PeerGroupFieldStatus_t field_status
Definition type9.h:63
uint8_t device_function_number
Definition type9.h:61
lazybiosType9PeerGroupDecoded_t decoded
Definition type9.h:64
Parsed SMBIOS Type 9 System Slots Information.
Definition type9.h:112
uint16_t segment_group_number
Definition type9.h:123
uint8_t slot_information
Definition type9.h:129
uint8_t slot_physical_width
Definition type9.h:130
uint16_t slot_id
Definition type9.h:120
uint8_t slot_data_bus_width
Definition type9.h:117
uint8_t slot_type
Definition type9.h:116
uint8_t slot_characteristics_2
Definition type9.h:122
const char * slot_designation
Definition type9.h:115
uint8_t data_bus_width
Definition type9.h:126
uint8_t peer_grouping_count
Definition type9.h:127
lazybiosType9PeerGroup_t * peer_groups
Definition type9.h:128
uint8_t slot_length
Definition type9.h:119
lazybiosType9FieldStatus_t field_status
Definition type9.h:134
uint8_t current_usage
Definition type9.h:118
uint8_t bus_number
Definition type9.h:124
uint8_t slot_characteristics_1
Definition type9.h:121
uint16_t slot_pitch
Definition type9.h:131
uint8_t slot_height
Definition type9.h:132
uint16_t handle
Definition type9.h:113
uint8_t length
Definition type9.h:114
uint8_t device_function_number
Definition type9.h:125
lazybiosType9Decoded_t decoded
Definition type9.h:133