Name Date Size #Lines LOC

..--

abi/x86_64/H--15,00515,004

docs/H--674464

evolutions/H--9064

include/H--12,5684,973

instance-db/H--

scripts/H--214116

src/H--21,32017,083

subprojects/H--43

tests/H--28,36922,822

tools/H--249213

.clang-formatH A D20-Oct-20233.6 KiB119116

.clang-tidyH A D30-May-20258.1 KiB226222

CHANGELOG.mdH A D28-Sep-202534.7 KiB959706

CONTRIBUTING.mdH A D10-Sep-202517.9 KiB503349

Doxyfile.inH A D04-Mar-202512.2 KiB361359

LICENSEH A D10-Oct-202211.1 KiB202169

OWNERSH A D17-Sep-20252 KiB6459

README.mdH A D10-Aug-20252.2 KiB8358

meson.buildH A D10-Aug-20253 KiB116100

meson.optionsH A D18-Sep-2025758 3433

README.md

1# libpldm
2
3This is a library which deals with the encoding and decoding of PLDM messages.
4It should be possible to use this library by projects other than OpenBMC, and
5hence certain constraints apply to it:
6
7- keeping it light weight
8- implementation in C
9- minimal dynamic memory allocations
10- endian-safe
11- no OpenBMC specific dependencies
12
13Source files are named according to the PLDM Type, for eg base.[h/c], fru.[h/c],
14etc.
15
16Given a PLDM command "foo", the library will provide the following API: For the
17Requester function:
18
19```c
20encode_foo_req() - encode a foo request
21decode_foo_resp() - decode a response to foo
22```
23
24For the Responder function:
25
26```c
27decode_foo_req() - decode a foo request
28encode_foo_resp() - encode a response to foo
29```
30
31The library also provides API to pack and unpack PLDM headers.
32
33## To Build
34
35`libpldm` is configured and built using `meson`. Python's `pip` or
36[`pipx`][pipx] can be used to install a recent version on your machine:
37
38[pipx]: https://pipx.pypa.io/latest/
39
40```sh
41pipx install meson
42```
43
44Once `meson` is installed:
45
46```sh
47meson setup build && meson compile -C build
48```
49
50## To run unit tests
51
52```sh
53meson test -C build
54```
55
56## Working with `libpldm`
57
58Components of the library ABI[^1] (loosely, functions) are separated into three
59categories:
60
61[^1]: ["library API + compiler ABI = library ABI"][libstdc++-library-abi]
62
63[libstdc++-library-abi]:
64  https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html
65
661. Stable
672. Testing
683. Deprecated
69
70Applications depending on `libpldm` should aim to only use functions from the
71stable category. However, this may not always be possible. What to do when
72required functions fall into the deprecated or testing categories is discussed
73in [CONTRIBUTING](CONTRIBUTING.md#Library-background).
74
75### Upgrading libpldm
76
77libpldm is maintained with the expectation that users move between successive
78releases when upgrading. This constraint allows the library to reintroduce types
79and functions of the same name in subsequent releases in the knowledge that
80there are no remaining users of previous definitions. While strategies are
81employed to avoid breaking existing APIs unnecessarily, the library is still to
82reach maturity, and we must allow for improvements to be made in the design.
83