RQ_SYMBOL(3)
π RQ_SYMBOL π
okay so bestie, welcome to rq_symbol(3) from the Librecast Programmer's Manual π β this is the little function that pops out a RaptorQ encoding symbol so you can yeet it across the network. sit down, grab a strawberry π, let's go.
β¨ NAME β¨
rq_symbol β generate RaptorQ encoding symbol
πΈ SYNOPSIS πΈ
#include <lcrq.h>
int rq_symbol(rq_t *rq, rq_pid_t *pid, uint8_t *sym, int flags);
Compile and link with -llcrq.
π¦ DESCRIPTION π¦
It generates a RaptorQ encoding symbol that is ready for sending. that's it, that's the job, and it does it flawlessly π
β οΈ before you even think about callingrq_symbol(), the intermediate symbols have to exist already β you get those by callingrq_encode(3)first. no intermediate symbols, no symbol. periodt.
rq has to be a pointer to a valid rq_t context. not vibes, an actual valid context.
pid will be set to the FEC payload ID, exactly as described in 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 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
so like, break it down: 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. iconic little layout honestly π
On success, sym will be a pointer to the encoding symbol. slay.
flags can be set to:
RQ_RANDβ generate a random repair symbol instead of returning the next ESI. a little chaos, a little mystery, we love her for it π
β RETURN VALUE β
Returns a pointer to the encoded symbol. that's the whole thing, she delivers π«Ά
π ERRORS π
None. literally none. no cap, there is nothing here.
π SEE ALSO π
rq_init(3), rq_free(3), rq_encode(3), rq_decode(3), rq_query(3), lcrq(7), errno(3)
mwah π that's the page. this one is LCRQ, dated 2022-07-07 β go forth and encode, bestie, you're gonna eat π β¨
π¦ where this page comes from
- debian bookworm: liblcrq0.0 0.0.1-2 Β· GPL-2.0-only OR GPL-3.0-only
- debian trixie: liblcrq0.0 0.2.3-1 Β· GPL-2.0-only OR GPL-3.0-only
- nixos 26.05: lcrq 0.3.1
- nixpkgs unstable: lcrq 0.4.1
- ubuntu noble: liblcrq0.0 0.1.2-1 Β· GPL-2.0-only OR GPL-3.0-only
- ubuntu questing: liblcrq0.0 0.2.3-1
- ubuntu resolute: liblcrq0.0 0.3.1-1 Β· GPL-2.0-only OR GPL-3.0-only
- ubuntu stonking: liblcrq0.0 0.3.1-1 Β· GPL-2.0-only OR GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms