lazybios 3.0.0
Lightweight SMBIOS/DMI parsing library
Loading...
Searching...
No Matches
lazybios_json.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 lazybios_json.h
21 * @brief cJSON serialization API for parsed SMBIOS structures.
22 * @ingroup api_extensions
23 * @author LazySeldi
24 */
25
26#ifndef LAZYBIOS_JSON_H
27#define LAZYBIOS_JSON_H
28
29#include "lazybios/lazybios.h"
30#include "cJSON.h"
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
36/** @addtogroup api_extensions
37 * @{
38 */
39
40/**
41@brief Output contract shared by the per-type lazybiosExtJSONAddTypeN() functions.
42
43 Each attaches its result to @p root under the matching "TypeN" key:
44 an array of record objects, an empty array when the table contains no
45 structure of that type, or JSON null when the serialiser was handed a
46 NULL set. That mirrors the getters, where a non-NULL result with a zero
47 count means "none present" and NULL means the call failed.
48
49 Within a record, the top-level members are the raw encodings the
50 firmware reported, and their human-readable forms live in a nested
51 "decoded" object. Every record also carries "handle" and "length".
52 Fields that are absent or unreachable are written as null.
53*/
54
55/**
56@brief Serialises lazybios library metadata and the parsed SMBIOS entry
57 point into a cJSON object and attaches it to @p root under the key
58 "smbios_info".
59@param DMIData Raw DMI container holding the parsed entry point.
60@param backend Backend that was used to obtain the data; controls whether
61 the table address field is included.
62@param root cJSON object to attach the resulting object to.
63*/
65 lazybiosBackend_t backend, cJSON* root);
66
67/**
68@brief Serialises an array of parsed SMBIOS Type 0 (BIOS Information)
69 structures into a cJSON array and attaches it to @p root under
70 the key "Type0".
71@param type0 Parsed set to serialise.
72@param root cJSON object to attach the resulting array to.
73*/
75
76/**
77@brief Serialises an array of parsed SMBIOS Type 1 (System Information)
78 structures into a cJSON array and attaches it to @p root under
79 the key "Type1".
80@param type1 Parsed set to serialise.
81@param root cJSON object to attach the resulting array to.
82*/
84
85/**
86@brief Serialises an array of parsed SMBIOS Type 2 (Baseboard Information)
87 structures into a cJSON array and attaches it to @p root under
88 the key "Type2".
89@param type2 Parsed set to serialise.
90@param root cJSON object to attach the resulting array to.
91*/
93
94/**
95@brief Serialises an array of parsed SMBIOS Type 3 (Chassis Information)
96 structures into a cJSON array and attaches it to @p root under
97 the key "Type3".
98@param type3 Parsed set to serialise.
99@param root cJSON object to attach the resulting array to.
100*/
102
103/**
104@brief Serialises an array of parsed SMBIOS Type 4 (Processor Information)
105 structures into a cJSON array and attaches it to @p root under
106 the key "Type4".
107@param type4 Parsed set to serialise.
108@param root cJSON object to attach the resulting array to.
109*/
111
112/**
113@brief Serialises an array of parsed SMBIOS Type 5 (Memory Controller
114 Information, obsolete) structures into a cJSON array and attaches
115 it to @p root under the key "Type5".
116@param type5 Parsed set to serialise.
117@param root cJSON object to attach the resulting array to.
118*/
120
121/**
122@brief Serialises an array of parsed SMBIOS Type 6 (Memory Module
123 Information, obsolete) structures into a cJSON array and attaches
124 it to @p root under the key "Type6".
125@param type6 Parsed set to serialise.
126@param root cJSON object to attach the resulting array to.
127*/
129
130/**
131@brief Serialises an array of parsed SMBIOS Type 7 (Cache Information)
132 structures into a cJSON array and attaches it to @p root under
133 the key "Type7".
134@param type7 Parsed set to serialise.
135@param root cJSON object to attach the resulting array to.
136*/
138
139/**
140@brief Serialises an array of parsed SMBIOS Type 8 (Port Connector
141 Information) structures into a cJSON array and attaches it to
142 @p root under the key "Type8".
143@param type8 Parsed set to serialise.
144@param root cJSON object to attach the resulting array to.
145*/
147
148/**
149@brief Serialises an array of parsed SMBIOS Type 9 (System Slots
150 Information) structures into a cJSON array and attaches it to
151 @p root under the key "Type9".
152@param type9 Parsed set to serialise.
153@param root cJSON object to attach the resulting array to.
154*/
156
157/**
158@brief Serialises an array of parsed SMBIOS Type 10 (On Board Devices
159 Information, obsolete) structures into a cJSON array and attaches
160 it to @p root under the key "Type10".
161@param type10 Parsed set to serialise.
162@param root cJSON object to attach the resulting array to.
163*/
165
166/**
167@brief Serialises an array of parsed SMBIOS Type 11 (OEM Strings)
168 structures into a cJSON array and attaches it to @p root under
169 the key "Type11".
170@param type11 Parsed set to serialise.
171@param root cJSON object to attach the resulting array to.
172*/
174
175/**
176@brief Serialises an array of parsed SMBIOS Type 12 (System Configuration
177 Options) structures into a cJSON array and attaches it to @p root
178 under the key "Type12".
179@param type12 Parsed set to serialise.
180@param root cJSON object to attach the resulting array to.
181*/
183
184/**
185@brief Serialises an array of parsed SMBIOS Type 13 (Firmware Language
186 Information) structures into a cJSON array and attaches it to
187 @p root under the key "Type13".
188@param type13 Parsed set to serialise.
189@param root cJSON object to attach the resulting array to.
190*/
192
193/**
194@brief Serialises an array of parsed SMBIOS Type 14 (Group Associations)
195 structures into a cJSON array and attaches it to @p root under
196 the key "Type14".
197@param type14 Parsed set to serialise.
198@param root cJSON object to attach the resulting array to.
199*/
201
202/**
203@brief Serialises an array of parsed SMBIOS Type 15 (System Event Log)
204 structures into a cJSON array and attaches it to @p root under
205 the key "Type15".
206@param type15 Parsed set to serialise.
207@param root cJSON object to attach the resulting array to.
208*/
210
211/**
212@brief Serialises an array of parsed SMBIOS Type 16 (Physical Memory Array)
213 structures into a cJSON array and attaches it to @p root under
214 the key "Type16".
215@param type16 Parsed set to serialise.
216@param root cJSON object to attach the resulting array to.
217*/
219
220/**
221@brief Serialises an array of parsed SMBIOS Type 17 (Memory Device)
222 structures into a cJSON array and attaches it to @p root under
223 the key "Type17".
224@param type17 Parsed set to serialise.
225@param root cJSON object to attach the resulting array to.
226*/
228
229/**
230@brief Serialises an array of parsed SMBIOS Type 18 (32-Bit Memory Error Info)
231 structures into a cJSON array and attaches it to @p root under
232 the key "Type18".
233@param type18 Parsed set to serialise.
234@param root cJSON object to attach the resulting array to.
235*/
237
238/**
239@brief Serialises an array of parsed SMBIOS Type 19 (Memory Array Mapped Address)
240 structures into a cJSON array and attaches it to @p root under
241 the key "Type19".
242@param type19 Parsed set to serialise.
243@param root cJSON object to attach the resulting array to.
244*/
246
247/**
248@brief Serialises an array of parsed SMBIOS Type 20 (Memory Device Mapped Address)
249 structures into a cJSON array and attaches it to @p root under
250 the key "Type20".
251@param type20 Parsed set to serialise.
252@param root cJSON object to attach the resulting array to.
253*/
255
256/**
257@brief Serialises an array of parsed SMBIOS Type 21 (Built-in Pointing Device)
258 structures into a cJSON array and attaches it to @p root under
259 the key "Type21".
260@param type21 Parsed set to serialise.
261@param root cJSON object to attach the resulting array to.
262*/
264
265/**
266@brief Serialises an array of parsed SMBIOS Type 22 (Portable Battery)
267 structures into a cJSON array and attaches it to @p root under
268 the key "Type22".
269@param type22 Parsed set to serialise.
270@param root cJSON object to attach the resulting array to.
271*/
273
274/**
275@brief Serialises an array of parsed SMBIOS Type 23 (System Reset)
276 structures into a cJSON array and attaches it to @p root under
277 the key "Type23".
278@param type23 Parsed set to serialise.
279@param root cJSON object to attach the resulting array to.
280*/
282
283/**
284@brief Serialises an array of parsed SMBIOS Type 24 (Hardware Security)
285 structures into a cJSON array and attaches it to @p root under
286 the key "Type24".
287@param type24 Parsed set to serialise.
288@param root cJSON object to attach the resulting array to.
289*/
291
292/**
293@brief Serialises an array of parsed SMBIOS Type 25 (System Power Controls)
294 structures into a cJSON array and attaches it to @p root under
295 the key "Type25".
296@param type25 Parsed set to serialise.
297@param root cJSON object to attach the resulting array to.
298*/
300
301/**
302@brief Serialises an array of parsed SMBIOS Type 26 (Voltage Probe)
303 structures into a cJSON array and attaches it to @p root under
304 the key "Type26".
305@param type26 Parsed set to serialise.
306@param root cJSON object to attach the resulting array to.
307*/
309
310/**
311@brief Serialises an array of parsed SMBIOS Type 27 (Cooling Device)
312 structures into a cJSON array and attaches it to @p root under
313 the key "Type27".
314@param type27 Parsed set to serialise.
315@param root cJSON object to attach the resulting array to.
316*/
318
319/**
320@brief Serialises an array of parsed SMBIOS Type 28 (Temperature Probe)
321 structures into a cJSON array and attaches it to @p root under
322 the key "Type28".
323@param type28 Parsed set to serialise.
324@param root cJSON object to attach the resulting array to.
325*/
327
328/**
329@brief Serialises an array of parsed SMBIOS Type 29 (Electrical Current Probe)
330 structures into a cJSON array and attaches it to @p root under
331 the key "Type29".
332@param type29 Parsed set to serialise.
333@param root cJSON object to attach the resulting array to.
334*/
336
337/**
338@brief Serialises an array of parsed SMBIOS Type 30 (Out-of-Band Remote Access)
339 structures into a cJSON array and attaches it to @p root under
340 the key "Type30".
341@param type30 Parsed set to serialise.
342@param root cJSON object to attach the resulting array to.
343*/
345
346/**
347@brief Serialises an array of parsed SMBIOS Type 31 (Boot Integrity Services)
348 structures into a cJSON array and attaches it to @p root under
349 the key "Type31".
350@param type31 Parsed set to serialise.
351@param root cJSON object to attach the resulting array to.
352*/
354
355/**
356@brief Serialises an array of parsed SMBIOS Type 32 (System Boot)
357 structures into a cJSON array and attaches it to @p root under
358 the key "Type32".
359@param type32 Parsed set to serialise.
360@param root cJSON object to attach the resulting array to.
361*/
363
364/**
365@brief Serialises an array of parsed SMBIOS Type 33 (64-Bit Memory Error Info)
366 structures into a cJSON array and attaches it to @p root under
367 the key "Type33".
368@param type33 Parsed set to serialise.
369@param root cJSON object to attach the resulting array to.
370*/
372
373/**
374@brief Serialises an array of parsed SMBIOS Type 34 (Management Device)
375 structures into a cJSON array and attaches it to @p root under
376 the key "Type34".
377@param type34 Parsed set to serialise.
378@param root cJSON object to attach the resulting array to.
379*/
381
382/**
383@brief Serialises an array of parsed SMBIOS Type 35 (Management Device Component)
384 structures into a cJSON array and attaches it to @p root under
385 the key "Type35".
386@param type35 Parsed set to serialise.
387@param root cJSON object to attach the resulting array to.
388*/
390
391/**
392@brief Serialises an array of parsed SMBIOS Type 36 (Management Device Threshold Data)
393 structures into a cJSON array and attaches it to @p root under
394 the key "Type36".
395@param type36 Parsed set to serialise.
396@param root cJSON object to attach the resulting array to.
397*/
399
400/**
401@brief Serialises an array of parsed SMBIOS Type 37 (Memory Channel)
402 structures into a cJSON array and attaches it to @p root under
403 the key "Type37".
404@param type37 Parsed set to serialise.
405@param root cJSON object to attach the resulting array to.
406*/
408
409/**
410@brief Serialises an array of parsed SMBIOS Type 38 (IPMI Device)
411 structures into a cJSON array and attaches it to @p root under
412 the key "Type38".
413@param type38 Parsed set to serialise.
414@param root cJSON object to attach the resulting array to.
415*/
417
418/**
419@brief Serialises an array of parsed SMBIOS Type 39 (System Power Supply)
420 structures into a cJSON array and attaches it to @p root under
421 the key "Type39".
422@param type39 Parsed set to serialise.
423@param root cJSON object to attach the resulting array to.
424*/
426
427/**
428@brief Serialises an array of parsed SMBIOS Type 40 (Additional Information)
429 structures into a cJSON array and attaches it to @p root under
430 the key "Type40".
431@param type40 Parsed set to serialise.
432@param root cJSON object to attach the resulting array to.
433*/
435
436/**
437@brief Serialises an array of parsed SMBIOS Type 41 (Onboard Devices Extended Information)
438 structures into a cJSON array and attaches it to @p root under
439 the key "Type41".
440@param type41 Parsed set to serialise.
441@param root cJSON object to attach the resulting array to.
442*/
444
445/**
446@brief Serialises an array of parsed SMBIOS Type 42 (Management Controller Host Interface)
447 structures into a cJSON array and attaches it to @p root under
448 the key "Type42".
449@param type42 Parsed set to serialise.
450@param root cJSON object to attach the resulting array to.
451*/
453
454/**
455@brief Serialises an array of parsed SMBIOS Type 43 (TPM Device)
456 structures into a cJSON array and attaches it to @p root under
457 the key "Type43".
458@param type43 Parsed set to serialise.
459@param root cJSON object to attach the resulting array to.
460*/
462
463/**
464@brief Serialises an array of parsed SMBIOS Type 44 (Processor Additional Information)
465 structures into a cJSON array and attaches it to @p root under
466 the key "Type44".
467@param type44 Parsed set to serialise.
468@param root cJSON object to attach the resulting array to.
469*/
471
472/**
473@brief Serialises an array of parsed SMBIOS Type 45 (Firmware Inventory Information)
474 structures into a cJSON array and attaches it to @p root under
475 the key "Type45".
476@param type45 Parsed set to serialise.
477@param root cJSON object to attach the resulting array to.
478*/
480
481/**
482@brief Serialises an array of parsed SMBIOS Type 46 (String Property)
483 structures into a cJSON array and attaches it to @p root under
484 the key "Type46".
485@param type46 Parsed set to serialise.
486@param root cJSON object to attach the resulting array to.
487*/
489
490/**
491@brief OEM serialisers nest their output as oem.&lt;vendor&gt;.TypeN, mirroring
492 ctx->oem->dell->TypeN, because an OEM structure number is only
493 meaningful together with its vendor.
494*/
495
496/**
497@brief Serialises an array of parsed Dell OEM Type 177 (Dell BIOS Flags)
498 structures into a cJSON array and attaches it to @p root under
499 the key "DellType177".
500@param dell177 Parsed set to serialise.
501@param root cJSON object to attach the resulting array to.
502*/
504
505/**
506@brief Serialises an array of parsed Dell OEM Type 212 (Dell Indexed I/O
507 Access) structures into a cJSON array and attaches it to @p root
508 under the key "DellType212".
509
510 Port addresses, indices, and token fields are written as hexadecimal
511 strings. Each element carries a "token_count" and a "tokens" array of
512 {token_id, location, and_mask, or_mask} objects.
513@param dell212 Parsed set to serialise.
514@param root cJSON object to attach the resulting array to.
515*/
517
518/**
519@brief Serialises an array of parsed Dell OEM Type 218 (Dell Token Interface)
520 structures into a cJSON array and attaches it to @p root under the
521 key "DellType218".
522
523 The command port, command code, class bitmap, and token fields are
524 written as hexadecimal strings. Each element carries a "token_count"
525 and a "tokens" array of {token_id, location, value} objects.
526@param dell218 Parsed set to serialise.
527@param root cJSON object to attach the resulting array to.
528*/
530
531/**
532@brief Serialises an array of parsed HP OEM Type 204 (HPE ProLiant
533 System/Rack Locator) structures into a cJSON array and attaches it
534 to @p root under the key "HpType204".
535@param hp204 Parsed set to serialise.
536@param root cJSON object to attach the resulting array to.
537*/
539
540/**
541 * @brief Parses every implemented structure type and serializes the lot into @p root.
542 * @ingroup api_extensions
543 *
544 * Equivalent to calling @ref lazybiosParseAll followed by every
545 * `lazybiosExtJSONAdd*()` function, including `smbios_info`. Types already
546 * parsed in @p ctx are reused rather than parsed again, so this is safe to call
547 * after parsing some types by hand.
548 *
549 * The parsed structures stay owned by @p ctx; the serializers copy what they
550 * need, so the resulting tree outlives @ref lazybiosCleanup. Release @p root
551 * with `cJSON_Delete()`.
552 *
553 * @param ctx Context holding loaded SMBIOS data.
554 * @param root cJSON object to attach the results to.
555 * @return 0 on success, or -1 if @p ctx holds no usable table or @p root is NULL.
556 */
557LAZYBIOS_WARN_UNUSED int lazybiosParseJSONAll(lazybiosCTX_t* ctx, cJSON* root);
558
559/** @} */
560
561#ifdef __cplusplus
562}
563#endif
564
565#endif
lazybiosBackend_t
Selects the platform backend used to obtain SMBIOS data.
Definition lazybios.h:42
void lazybiosExtJSONAddOemHpType204(const lazybiosOemHpType204Array_t *hp204, cJSON *root)
Serialises an array of parsed HP OEM Type 204 (HPE ProLiant System/Rack Locator) structures into a cJ...
void lazybiosExtJSONAddType6(const lazybiosType6Array_t *type6, cJSON *root)
Serialises an array of parsed SMBIOS Type 6 (Memory Module Information, obsolete) structures into a c...
void lazybiosExtJSONAddType44(const lazybiosType44Array_t *type44, cJSON *root)
Serialises an array of parsed SMBIOS Type 44 (Processor Additional Information) structures into a cJS...
void lazybiosExtJSONAddType15(const lazybiosType15Array_t *type15, cJSON *root)
Serialises an array of parsed SMBIOS Type 15 (System Event Log) structures into a cJSON array and att...
void lazybiosExtJSONAddType46(const lazybiosType46Array_t *type46, cJSON *root)
Serialises an array of parsed SMBIOS Type 46 (String Property) structures into a cJSON array and atta...
void lazybiosExtJSONAddType4(const lazybiosType4Array_t *type4, cJSON *root)
Serialises an array of parsed SMBIOS Type 4 (Processor Information) structures into a cJSON array and...
void lazybiosExtJSONAddType30(const lazybiosType30Array_t *type30, cJSON *root)
Serialises an array of parsed SMBIOS Type 30 (Out-of-Band Remote Access) structures into a cJSON arra...
void lazybiosExtJSONAddType18(const lazybiosType18Array_t *type18, cJSON *root)
Serialises an array of parsed SMBIOS Type 18 (32-Bit Memory Error Info) structures into a cJSON array...
void lazybiosExtJSONAddType35(const lazybiosType35Array_t *type35, cJSON *root)
Serialises an array of parsed SMBIOS Type 35 (Management Device Component) structures into a cJSON ar...
void lazybiosExtJSONAddType7(const lazybiosType7Array_t *type7, cJSON *root)
Serialises an array of parsed SMBIOS Type 7 (Cache Information) structures into a cJSON array and att...
void lazybiosExtJSONAddType37(const lazybiosType37Array_t *type37, cJSON *root)
Serialises an array of parsed SMBIOS Type 37 (Memory Channel) structures into a cJSON array and attac...
void lazybiosExtJSONAddType13(const lazybiosType13Array_t *type13, cJSON *root)
Serialises an array of parsed SMBIOS Type 13 (Firmware Language Information) structures into a cJSON ...
void lazybiosExtJSONAddType26(const lazybiosType26Array_t *type26, cJSON *root)
Serialises an array of parsed SMBIOS Type 26 (Voltage Probe) structures into a cJSON array and attach...
void lazybiosExtJSONAddType21(const lazybiosType21Array_t *type21, cJSON *root)
Serialises an array of parsed SMBIOS Type 21 (Built-in Pointing Device) structures into a cJSON array...
void lazybiosExtJSONAddType17(const lazybiosType17Array_t *type17, cJSON *root)
Serialises an array of parsed SMBIOS Type 17 (Memory Device) structures into a cJSON array and attach...
void lazybiosExtJSONAddType3(const lazybiosType3Array_t *type3, cJSON *root)
Serialises an array of parsed SMBIOS Type 3 (Chassis Information) structures into a cJSON array and a...
void lazybiosExtJSONAddType34(const lazybiosType34Array_t *type34, cJSON *root)
Serialises an array of parsed SMBIOS Type 34 (Management Device) structures into a cJSON array and at...
void lazybiosExtJSONAddType16(const lazybiosType16Array_t *type16, cJSON *root)
Serialises an array of parsed SMBIOS Type 16 (Physical Memory Array) structures into a cJSON array an...
void lazybiosExtJSONAddType0(const lazybiosType0Array_t *type0, cJSON *root)
Serialises an array of parsed SMBIOS Type 0 (BIOS Information) structures into a cJSON array and atta...
void lazybiosExtJSONAddType32(const lazybiosType32Array_t *type32, cJSON *root)
Serialises an array of parsed SMBIOS Type 32 (System Boot) structures into a cJSON array and attaches...
void lazybiosExtJSONAddType8(const lazybiosType8Array_t *type8, cJSON *root)
Serialises an array of parsed SMBIOS Type 8 (Port Connector Information) structures into a cJSON arra...
void lazybiosExtJSONAddType1(const lazybiosType1Array_t *type1, cJSON *root)
Serialises an array of parsed SMBIOS Type 1 (System Information) structures into a cJSON array and at...
void lazybiosExtJSONAddType19(const lazybiosType19Array_t *type19, cJSON *root)
Serialises an array of parsed SMBIOS Type 19 (Memory Array Mapped Address) structures into a cJSON ar...
void lazybiosExtJSONAddType9(const lazybiosType9Array_t *type9, cJSON *root)
Serialises an array of parsed SMBIOS Type 9 (System Slots Information) structures into a cJSON array ...
void lazybiosExtJSONAddType36(const lazybiosType36Array_t *type36, cJSON *root)
Serialises an array of parsed SMBIOS Type 36 (Management Device Threshold Data) structures into a cJS...
void lazybiosExtJSONAddType24(const lazybiosType24Array_t *type24, cJSON *root)
Serialises an array of parsed SMBIOS Type 24 (Hardware Security) structures into a cJSON array and at...
void lazybiosExtJSONAddType20(const lazybiosType20Array_t *type20, cJSON *root)
Serialises an array of parsed SMBIOS Type 20 (Memory Device Mapped Address) structures into a cJSON a...
void lazybiosExtJSONAddType29(const lazybiosType29Array_t *type29, cJSON *root)
Serialises an array of parsed SMBIOS Type 29 (Electrical Current Probe) structures into a cJSON array...
void lazybiosExtJSONAddType25(const lazybiosType25Array_t *type25, cJSON *root)
Serialises an array of parsed SMBIOS Type 25 (System Power Controls) structures into a cJSON array an...
void lazybiosExtJSONAddType38(const lazybiosType38Array_t *type38, cJSON *root)
Serialises an array of parsed SMBIOS Type 38 (IPMI Device) structures into a cJSON array and attaches...
void lazybiosExtJSONAddSMBIOSInfo(const lazybiosDMI_t *DMIData, lazybiosBackend_t backend, cJSON *root)
Output contract shared by the per-type lazybiosExtJSONAddTypeN() functions.
void lazybiosExtJSONAddType39(const lazybiosType39Array_t *type39, cJSON *root)
Serialises an array of parsed SMBIOS Type 39 (System Power Supply) structures into a cJSON array and ...
void lazybiosExtJSONAddType40(const lazybiosType40Array_t *type40, cJSON *root)
Serialises an array of parsed SMBIOS Type 40 (Additional Information) structures into a cJSON array a...
void lazybiosExtJSONAddType33(const lazybiosType33Array_t *type33, cJSON *root)
Serialises an array of parsed SMBIOS Type 33 (64-Bit Memory Error Info) structures into a cJSON array...
void lazybiosExtJSONAddOemDellType212(const lazybiosOemDellType212Array_t *dell212, cJSON *root)
Serialises an array of parsed Dell OEM Type 212 (Dell Indexed I/O Access) structures into a cJSON arr...
void lazybiosExtJSONAddType14(const lazybiosType14Array_t *type14, cJSON *root)
Serialises an array of parsed SMBIOS Type 14 (Group Associations) structures into a cJSON array and a...
void lazybiosExtJSONAddType45(const lazybiosType45Array_t *type45, cJSON *root)
Serialises an array of parsed SMBIOS Type 45 (Firmware Inventory Information) structures into a cJSON...
void lazybiosExtJSONAddType12(const lazybiosType12Array_t *type12, cJSON *root)
Serialises an array of parsed SMBIOS Type 12 (System Configuration Options) structures into a cJSON a...
void lazybiosExtJSONAddOemDellType177(const lazybiosOemDellType177Array_t *dell177, cJSON *root)
OEM serialisers nest their output as oem.<vendor>.TypeN, mirroring ctx->oem->dell->TypeN,...
void lazybiosExtJSONAddType10(const lazybiosType10Array_t *type10, cJSON *root)
Serialises an array of parsed SMBIOS Type 10 (On Board Devices Information, obsolete) structures into...
void lazybiosExtJSONAddType11(const lazybiosType11Array_t *type11, cJSON *root)
Serialises an array of parsed SMBIOS Type 11 (OEM Strings) structures into a cJSON array and attaches...
LAZYBIOS_WARN_UNUSED int lazybiosParseJSONAll(lazybiosCTX_t *ctx, cJSON *root)
Parses every implemented structure type and serializes the lot into root.
void lazybiosExtJSONAddOemDellType218(const lazybiosOemDellType218Array_t *dell218, cJSON *root)
Serialises an array of parsed Dell OEM Type 218 (Dell Token Interface) structures into a cJSON array ...
void lazybiosExtJSONAddType42(const lazybiosType42Array_t *type42, cJSON *root)
Serialises an array of parsed SMBIOS Type 42 (Management Controller Host Interface) structures into a...
void lazybiosExtJSONAddType5(const lazybiosType5Array_t *type5, cJSON *root)
Serialises an array of parsed SMBIOS Type 5 (Memory Controller Information, obsolete) structures into...
void lazybiosExtJSONAddType31(const lazybiosType31Array_t *type31, cJSON *root)
Serialises an array of parsed SMBIOS Type 31 (Boot Integrity Services) structures into a cJSON array ...
void lazybiosExtJSONAddType41(const lazybiosType41Array_t *type41, cJSON *root)
Serialises an array of parsed SMBIOS Type 41 (Onboard Devices Extended Information) structures into a...
void lazybiosExtJSONAddType23(const lazybiosType23Array_t *type23, cJSON *root)
Serialises an array of parsed SMBIOS Type 23 (System Reset) structures into a cJSON array and attache...
void lazybiosExtJSONAddType2(const lazybiosType2Array_t *type2, cJSON *root)
Serialises an array of parsed SMBIOS Type 2 (Baseboard Information) structures into a cJSON array and...
void lazybiosExtJSONAddType28(const lazybiosType28Array_t *type28, cJSON *root)
Serialises an array of parsed SMBIOS Type 28 (Temperature Probe) structures into a cJSON array and at...
void lazybiosExtJSONAddType27(const lazybiosType27Array_t *type27, cJSON *root)
Serialises an array of parsed SMBIOS Type 27 (Cooling Device) structures into a cJSON array and attac...
void lazybiosExtJSONAddType43(const lazybiosType43Array_t *type43, cJSON *root)
Serialises an array of parsed SMBIOS Type 43 (TPM Device) structures into a cJSON array and attaches ...
void lazybiosExtJSONAddType22(const lazybiosType22Array_t *type22, cJSON *root)
Serialises an array of parsed SMBIOS Type 22 (Portable Battery) structures into a cJSON array and att...
Public API for lazybios. Include this and nothing else.
#define LAZYBIOS_WARN_UNUSED
Expands to nothing on compilers without a return-value check.
Definition lazybios.h:150
Definition cJSON.h:104
Owns raw DMI table data and its parsed SMBIOS entry point.
Definition lazybios.h:218
A parsed set of Dell OEM Type 177 structures.
A parsed set of Dell OEM Type 212 structures.
A parsed set of Dell OEM Type 218 structures.
A parsed set of Hp OEM Type 204 structures.
Definition hp_type204.h:76
A parsed set of SMBIOS Type 0 structures.
Definition type0.h:99
A parsed set of SMBIOS Type 10 structures.
Definition type10.h:86
A parsed set of SMBIOS Type 11 structures.
Definition type11.h:60
A parsed set of SMBIOS Type 12 structures.
Definition type12.h:60
A parsed set of SMBIOS Type 13 structures.
Definition type13.h:75
A parsed set of SMBIOS Type 14 structures.
Definition type14.h:78
A parsed set of SMBIOS Type 15 structures.
Definition type15.h:116
A parsed set of SMBIOS Type 16 structures.
Definition type16.h:84
A parsed set of SMBIOS Type 17 structures.
Definition type17.h:159
A parsed set of SMBIOS Type 18 structures.
Definition type18.h:83
A parsed set of SMBIOS Type 19 structures.
Definition type19.h:80
A parsed set of SMBIOS Type 1 structures.
Definition type1.h:83
A parsed set of SMBIOS Type 20 structures.
Definition type20.h:86
A parsed set of SMBIOS Type 21 structures.
Definition type21.h:74
A parsed set of SMBIOS Type 22 structures.
Definition type22.h:99
A parsed set of SMBIOS Type 23 structures.
Definition type23.h:74
A parsed set of SMBIOS Type 24 structures.
Definition type24.h:72
A parsed set of SMBIOS Type 25 structures.
Definition type25.h:74
A parsed set of SMBIOS Type 26 structures.
Definition type26.h:86
A parsed set of SMBIOS Type 27 structures.
Definition type27.h:80
A parsed set of SMBIOS Type 28 structures.
Definition type28.h:87
A parsed set of SMBIOS Type 29 structures.
Definition type29.h:86
A parsed set of SMBIOS Type 2 structures.
Definition type2.h:90
A parsed set of SMBIOS Type 30 structures.
Definition type30.h:72
A parsed set of SMBIOS Type 31 structures.
Definition type31.h:72
A parsed set of SMBIOS Type 32 structures.
Definition type32.h:75
A parsed set of SMBIOS Type 33 structures.
Definition type33.h:83
A parsed set of SMBIOS Type 34 structures.
Definition type34.h:76
A parsed set of SMBIOS Type 35 structures.
Definition type35.h:64
A parsed set of SMBIOS Type 36 structures.
Definition type36.h:68
A parsed set of SMBIOS Type 37 structures.
Definition type37.h:91
A parsed set of SMBIOS Type 38 structures.
Definition type38.h:86
A parsed set of SMBIOS Type 39 structures.
Definition type39.h:96
A parsed set of SMBIOS Type 3 structures.
Definition type3.h:108
A parsed set of SMBIOS Type 40 structures.
Definition type40.h:83
A parsed set of SMBIOS Type 41 structures.
Definition type41.h:81
A parsed set of SMBIOS Type 42 structures.
Definition type42.h:101
A parsed set of SMBIOS Type 43 structures.
Definition type43.h:81
A parsed set of SMBIOS Type 44 structures.
Definition type44.h:75
A parsed set of SMBIOS Type 45 structures.
Definition type45.h:96
A parsed set of SMBIOS Type 46 structures.
Definition type46.h:73
A parsed set of SMBIOS Type 4 structures.
Definition type4.h:129
A parsed set of SMBIOS Type 5 structures.
Definition type5.h:96
A parsed set of SMBIOS Type 6 structures.
Definition type6.h:82
A parsed set of SMBIOS Type 7 structures.
Definition type7.h:99
A parsed set of SMBIOS Type 8 structures.
Definition type8.h:79
A parsed set of SMBIOS Type 9 structures.
Definition type9.h:141