Man page - rq_init(3)

Packages contains this manual

Manual

RQ_INIT

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
EXAMPLE
Program source
SEE ALSO

NAME

rq_init, rq_free - create and free RaptorQ contexts

SYNOPSIS

#include <lcrq.h>

rq_t *rq_init(const uint64_t F , const uint16_t T );
void rq_free(rq_t
*rq );

Compile and link with -llcrq .

DESCRIPTION

rq_init () creates a new RaptorQ context and sets up the environment.

F The size of the object to encode. This must be a positive integer up to 946270874880.

T The symbol size. This is generally the size of the packet payload we intend to send. This must be a multiple of the Alignment parameter (4).

Call rq_free (3) when done.

rq_free () invalidates and frees a RaptorQ context created with rq_init (3)

RETURN VALUE

rq_init () returns a pointer to a rq_t handle. On error returns NULL and sets errno to ENOMEM .

The rq_free () function returns no value.

ERRORS

rq_init () can fail with the following errors:

ENOMEM

Out of memory. Possibly, the application hit the RLIMIT_AS or RLIMIT_DATA limit described in getrlimit (2).

EXAMPLE

Program source

rq_t *rq;
rq = rq_init(filesize, 1024);

/* your program here */

rq_free(rq); /* free context when done */

SEE ALSO

rq_encode (3), rq_decode (3), rq_symbol (3), lcrq (7)