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

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

#include "../header_middleware/packet_decoder.h"
Include dependency graph for protobuf_encoder.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

ssize_t encode_protobuf_packet (struct tuple_packet *tp, uint8_t **buffer)
 Encodes the packet into a protobuf message. More...
 
ssize_t encode_protobuf_sync_wrapper (struct tuple_packet *tp, uint8_t **buffer)
 Encodes the packet into a wrapper protobuf message. More...
 

Detailed Description

File containing the definition of the protobuf encoder utilities.

Author
Alexandru Mereacre
Date
2022

Function Documentation

◆ encode_protobuf_packet()

ssize_t encode_protobuf_packet ( struct tuple_packet tp,
uint8_t **  buffer 
)

Encodes the packet into a protobuf message.

Parameters
[in]tpThe packet
[out]bufferThe encoded protobuf packet
Returns
the output buffer size, -1 on failure

◆ encode_protobuf_sync_wrapper()

ssize_t encode_protobuf_sync_wrapper ( struct tuple_packet tp,
uint8_t **  buffer 
)

Encodes the packet into a wrapper protobuf message.

Parameters
[in]tpThe packet
[out]bufferThe encoded wrapper protobuf packet
Returns
the output buffer size, -1 on failure