rq_symbol3
Generate raptorq encoding symbol
Usage
#include <lcrq.h>
int rq_symbol(rq_t *rq, rq_pid_t *pid, uint8_t *sym, int flags);
Compile and link with -llcrq.
Overview
Generates a RaptorQ encoding symbol ready for sending.
Before calling rq_symbol() the intermediate symbols must first be created with a call to rq_encode(3).
rq must be a pointer to valid rq_t context
pid will be set to the FEC payload ID as per Section 3.2 of RFC6330:
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SBN | Encoding Symbol ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
SBN (Source Block Number) is an 8 bit unsigned integer. The Encoding Symbol ID (ESI) is a 24 bit unsigned integer in network byte order.
On success, sym will be a pointer to the encoding symbol.
flags can be set to:
RQ_RAND-
Generate a random repair symbol instead of returning the next ESI.
Return value
Returns a pointer to the encoded symbol.
Errors
None.
Releases
Unchanged in 2 releases since Debian 12 (Bookworm).