xref: /openbmc/libpldm/src/control-internal.h (revision cc6f6434b70fc0ffc272db7ee156ff709bb160ee)
1 #pragma once
2 
3 #include <stdint.h>
4 #include <stdbool.h>
5 #include <string.h>
6 
7 #include <libpldm/pldm.h>
8 #include <libpldm/utils.h>
9 #include <compiler.h>
10 #include <msgbuf.h>
11 
12 #ifndef PLDM_CONTROL_MAX_VERSION_TYPES
13 #define PLDM_CONTROL_MAX_VERSION_TYPES 6
14 #endif
15 
16 struct pldm_type_versions {
17 	/* A buffer of ver32_t/uint32_t of version values, followed by crc32 */
18 	/* NULL for unused entries */
19 	const void *versions;
20 	/* Includes the trailing crc32 entry */
21 	uint8_t versions_count;
22 
23 	/* A buffer of 32 entries, for commands 0-0xff */
24 	const bitfield8_t *commands;
25 
26 	uint8_t pldm_type;
27 };
28 
29 struct pldm_control {
30 	struct pldm_type_versions types[PLDM_CONTROL_MAX_VERSION_TYPES];
31 };
32