logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

rq_symbol - generate RaptorQ encoding symbol

Description

       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.

Errors

       None.

Name

       rq_symbol - generate RaptorQ encoding symbol

Return Value

       Returns a pointer to the encoded symbol.

See Also

rq_init(3), rq_free(3), rq_encode(3), rq_decode(3), rq_query(3), lcrq(7), errno(3)

LCRQ                                               2022-07-07                                       RQ_SYMBOL(3)

Synopsis

#include<lcrq.h>intrq_symbol(rq_t*rq,rq_pid_t*pid,uint8_t*sym,intflags);

       Compile and link with -llcrq.

See Also