RadioLink framing, crypto, replay, and persistence implementation.
More...
#include "radio_link.h"
#include "stdio.h"
#include "memory.h"
|
| bool | RadioLink_BuildWireV3Frame (uint8_t *out, uint8_t outMax, uint8_t nodeId, uint32_t sessionSeqId, uint32_t msgCounter, const uint8_t *plain, uint8_t plainLen, uint8_t *outLen) |
| | Build a Wire v3 frame from plaintext input.
|
| |
| bool | RadioLink_ParseWireV3Frame (const uint8_t *rx, uint8_t rxLen, uint8_t *outPlain, uint8_t outPlainMax, uint8_t *outPlainLen) |
| | Parse, authenticate, replay-check, and decrypt a Wire v3 frame.
|
| |
| bool | RadioLink_SendString (SX1262_Handle *sx, const char *s) |
| | Send a string through RadioLink framing and crypto.
|
| |
| bool | RadioLink_TryDecodeToString (const uint8_t *rx, uint8_t rx_len, char *out, uint8_t out_max) |
| | Decode a received Wire v3 frame into a NUL-terminated string.
|
| |
| bool | RadioLink_SendBytes (SX1262_Handle *sx, const uint8_t *buf, uint8_t len) |
| | Send a raw byte payload through RadioLink framing and crypto.
|
| |
RadioLink framing, crypto, replay, and persistence implementation.
◆ RadioLink_BuildWireV3Frame()
| bool RadioLink_BuildWireV3Frame |
( |
uint8_t * | out, |
|
|
uint8_t | outMax, |
|
|
uint8_t | nodeId, |
|
|
uint32_t | sessionSeqId, |
|
|
uint32_t | msgCounter, |
|
|
const uint8_t * | plain, |
|
|
uint8_t | plainLen, |
|
|
uint8_t * | outLen ) |
Build a Wire v3 frame from plaintext input.
- Parameters
-
| out | Output frame buffer. |
| outMax | Size of the output frame buffer in bytes. |
| nodeId | Source node identifier. |
| sessionSeqId | Session sequence identifier. |
| msgCounter | Monotonic message counter. |
| plain | Plaintext payload buffer. |
| plainLen | Plaintext payload length in bytes. |
| outLen | Output pointer for the final frame length. |
- Returns
- true if the frame was built successfully, otherwise false.
◆ RadioLink_ParseWireV3Frame()
| bool RadioLink_ParseWireV3Frame |
( |
const uint8_t * | rx, |
|
|
uint8_t | rxLen, |
|
|
uint8_t * | outPlain, |
|
|
uint8_t | outPlainMax, |
|
|
uint8_t * | outPlainLen ) |
Parse, authenticate, replay-check, and decrypt a Wire v3 frame.
- Parameters
-
| rx | Pointer to the received frame bytes. |
| rxLen | Number of bytes in the received frame. |
| outPlain | Output plaintext buffer. |
| outPlainMax | Size of the output plaintext buffer in bytes. |
| outPlainLen | Output pointer for the plaintext length. |
- Returns
- true if the frame was accepted and decrypted, otherwise false.
◆ RadioLink_SendBytes()
| bool RadioLink_SendBytes |
( |
SX1262_Handle * | sx, |
|
|
const uint8_t * | buf, |
|
|
uint8_t | len ) |
Send a raw byte payload through RadioLink framing and crypto.
Encrypt, authenticate, and send a raw byte payload.
◆ RadioLink_SendString()
Send a string through RadioLink framing and crypto.
Encrypt, authenticate, and send a string payload.
◆ RadioLink_TryDecodeToString()
| bool RadioLink_TryDecodeToString |
( |
const uint8_t * | rx, |
|
|
uint8_t | rx_len, |
|
|
char * | out, |
|
|
uint8_t | out_max ) |
Decode a received Wire v3 frame into a NUL-terminated string.
Parse and decrypt a received Wire v3 frame into a string buffer.
◆ hcryp