EDGESEC  0.1.0-alpha.0+sha.ca29a8277b72f80785649ea9ef9cd7edf642d939
Secure router - reference implementation
Functions
protobuf_utils.h File Reference

File containing the definition of the protobuf encoding utilities. More...

#include <protobuf-c/protobuf-c.h>
Include dependency graph for protobuf_utils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

size_t protobuf_c_message_del_get_packed_size (const ProtobufCMessage *message)
 Determine the number of bytes required to store the length delimited serialised message. More...
 
size_t protobuf_c_message_del_pack (const ProtobufCMessage *message, uint8_t *out)
 Serialise a message from its in-memory representation adding the lenght delimiter. More...
 

Detailed Description

File containing the definition of the protobuf encoding utilities.

Author
Alexandru Mereacre
Date
2022

Function Documentation

◆ protobuf_c_message_del_get_packed_size()

size_t protobuf_c_message_del_get_packed_size ( const ProtobufCMessage *  message)

Determine the number of bytes required to store the length delimited serialised message.

Parameters
message[in]The message object to serialise.
Returns
number of bytes

◆ protobuf_c_message_del_pack()

size_t protobuf_c_message_del_pack ( const ProtobufCMessage *  message,
uint8_t *  out 
)

Serialise a message from its in-memory representation adding the lenght delimiter.

Parameters
message[in]The message object to serialise.
buffer[out]Buffer to store the bytes of the serialised message The buffer siza can be obtained with protobuf_c_message_del_get_packed_size
Returns
the output buffer size