seL4_projects_libs/libsel4nanopb
Gerwin Klein 46f6dc9c0c remove obsolete LICENSE_* files
These are already covered by the LICENSES/ directory and SPDX
identifiers.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2025-05-26 09:59:17 +02:00
..
include/sel4nanopb Convert to SPDX license tags 2020-11-28 17:19:21 +11:00
src trivial: Fixup compiler warnings 2021-12-08 15:25:38 +11:00
CMakeLists.txt Convert to SPDX license tags 2020-11-28 17:19:21 +11:00
README.md Convert to SPDX license tags 2020-11-28 17:19:21 +11:00

README.md

libsel4nanopb

A interface between sel4 IPC buffers and nanopb.

Nanopb

Nanopb is a small code-size Protocol Buffers implementation in ANSI C. The nanopb generator is implemented as a plug-in for the Google's own protoc compiler. Therefore, you need Google's Protocol Buffers installed in order to run the generator.

This library

Nanopb uses streams for accessing the data in encoded format. This library implements a simple wrapper which allows you to treat the IPC message buffer as a protobuf stream.

Message message = Message_init_zero;
message.somepart = content;
pb_ostream_t output = pb_ostream_from_IPC(0);
if (!pb_encode_delimited(&output, Control_fields, &ctrlmsg))
{
    ZF_LOGE("Encoding failed: %s\n", PB_GET_ERROR(&output));
}