lazybios 3.0.0
Lightweight SMBIOS/DMI parsing library
Loading...
Searching...
No Matches
type8.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 type8.h
21 * @brief Public API for SMBIOS Type 8 Port Connector Information.
22 * @author LazySeldi
23 */
24
25#ifndef LAZYBIOS_TYPE8_H
26#define LAZYBIOS_TYPE8_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 8 fields. */
46
47/**
48 * @brief Decoded forms of the Type 8 encoded fields.
49 *
50 * Each member holds the decoded form of the raw field it is named for.
51 * Consult the matching `field_status` member before using one.
52 */
53typedef struct {
56 const char* port_type;
58
59/**
60 * @brief Parsed SMBIOS Type 8 Port Connector Information.
61 * @ingroup api_type8
62 */
74
75/**
76 * @brief A parsed set of SMBIOS Type 8 structures.
77 * @ingroup api_type8
78 */
83
84/** @addtogroup api_type8
85 * @{
86 */
87
88/**
89 * @brief Parses all SMBIOS Type 8 structures.
90 * @param DMIData Raw DMI table container to parse.
91 * @return Newly allocated set, empty when the table holds no Type 8 structure,
92 * or NULL when the arguments are unusable or an allocation fails.
93 */
95/**
96 * @brief Releases a parsed set of SMBIOS Type 8 structures.
97 * @param Type8 Set to release; may be NULL.
98 */
100
101/** @} */
102
103#ifdef __cplusplus
104}
105#endif
106
107#endif
LAZYBIOS_WARN_UNUSED lazybiosType8Array_t * lazybiosGetType8(const lazybiosDMI_t *DMIData)
Parses all SMBIOS Type 8 structures.
void lazybiosFreeType8(lazybiosType8Array_t *Type8)
Releases a parsed set of SMBIOS Type 8 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 8 structures.
Definition type8.h:79
lazybiosType8_t * entries
Definition type8.h:80
Decoded forms of the Type 8 encoded fields.
Definition type8.h:53
const char * external_connector_type
Definition type8.h:54
const char * port_type
Definition type8.h:56
const char * internal_connector_type
Definition type8.h:55
Availability metadata for SMBIOS Type 8 fields.
Definition type8.h:39
lazybiosFieldStatus_t internal_connector_type
Definition type8.h:41
lazybiosFieldStatus_t external_reference_designator
Definition type8.h:42
lazybiosFieldStatus_t internal_reference_designator
Definition type8.h:40
lazybiosFieldStatus_t port_type
Definition type8.h:44
lazybiosFieldStatus_t external_connector_type
Definition type8.h:43
Parsed SMBIOS Type 8 Port Connector Information.
Definition type8.h:63
const char * internal_reference_designator
Definition type8.h:66
uint16_t handle
Definition type8.h:64
const char * external_reference_designator
Definition type8.h:68
lazybiosType8FieldStatus_t field_status
Definition type8.h:72
uint8_t external_connector_type
Definition type8.h:69
uint8_t internal_connector_type
Definition type8.h:67
uint8_t port_type
Definition type8.h:70
lazybiosType8Decoded_t decoded
Definition type8.h:71
uint8_t length
Definition type8.h:65