NULL.C(3)
okay so bestie, welcome to the manual page for /build/source/src/backends/null/null.c β aka null.c(3) β from liberasurecode. Section 3, C library functions, we love a source-file moment β¨. Doxygen generated this whole thing automatically, so buckle up for macros, typedefs, and one very internal __attribute__.
πΈ NAME πΈ
/build/source/src/backends/null/null.c β that's it. The NAME section is literally just the path, no cap. It's giving source-file realness π«Ά.
π SYNOPSIS π
#include <stdio.h>
#include <stdlib.h>
#include 'erasurecode.h'
#include 'erasurecode_backend.h'
π§Έ Data Structures π§Έ
struct null_descriptorβ the one and only data structure listed here, bestie.
π Macros π
here's the macro lineup, exact values and all:
#define NULL_LIB_MAJOR 1#define NULL_LIB_MINOR 0#define NULL_LIB_REV 0#define NULL_LIB_VER_STR '1.0'#define NULL_LIB_NAME 'null'#define NULL_SO_NAME 'libnullcode' LIBERASURECODE_SO_SUFFIX '.so.1'#define DEFAULT_W 32
π¦ Typedefs π¦
these are the function-pointer typedefs, copy-paste exact:
typedef void *(* init_null_code_func) (int, int, int)typedef int(* null_code_encode_func) (void *, char **, char **, int)typedef int(* null_code_decode_func) (void *, char **, char **, int *, int, int)typedef int(* null_reconstruct_func) (char **, int, uint64_t, int, char *)typedef int(* null_code_fragments_needed_func) (void *, int *, int *, int *)
π₯ Functions π₯
the function roster, with [static] where it says so:
static int null_encode (void *desc, char **data, char **parity, int blocksize)static int null_decode (void *desc, char **data, char **parity, int *missing_idxs, int blocksize)static int null_reconstruct (void *desc, char **data, char **parity, int *missing_idxs, int destination_idx, int blocksize)static int null_min_fragments (void *desc, int *missing_idxs, int *fragments_to_exclude, int *fragments_needed)static int null_element_size (void *desc)β Return the element-size, which is the number of bits stored on a given device, per codeword.static void * null_init (struct ec_backend_args *args, void *backend_sohandle)static int null_exit (void *desc)static bool null_is_compatible_with (uint32_t version)__attribute__ ((visibility('internal')))
π Variables π
static struct ec_backend_op_stubs null_op_stubsβ yes, this variable exists and it's about to become the star of Variable Documentation.
β¨ Macro Definition Documentation β¨
okay, now the receipts for each macro:
#define DEFAULT_W 32β definition at line75of filenull.c.#define NULL_LIB_MAJOR 1β definition at line34of filenull.c; referenced by__attribute__().#define NULL_LIB_MINOR 0β definition at line35of filenull.c; referenced by__attribute__().#define NULL_LIB_NAME 'null'β definition at line38of filenull.c; referenced by__attribute__().#define NULL_LIB_REV 0β definition at line36of filenull.c; referenced by__attribute__().#define NULL_LIB_VER_STR '1.0'β definition at line37of filenull.c; referenced by__attribute__().#define NULL_SO_NAME 'libnullcode' LIBERASURECODE_SO_SUFFIX '.so.1'β definition at line42of filenull.c; referenced by__attribute__().
π§ Typedef Documentation π§
typedef void *(* init_null_code_func) (int, int, int)β definition at line46of filenull.c.typedef int(* null_code_decode_func) (void *, char **, char **, int *, int, int)β definition at line48of filenull.c.typedef int(* null_code_encode_func) (void *, char **, char **, int)β definition at line47of filenull.c.typedef int(* null_code_fragments_needed_func) (void *, int *, int *, int *)β definition at line50of filenull.c.typedef int(* null_reconstruct_func) (char **, int, uint64_t, int, char *)β definition at line49of filenull.c.
π Function Documentation π
__attribute__ ((visibility('internal')) )β definition at line230of filenull.c. Referencesbackend_null,NULL_LIB_MAJOR,NULL_LIB_MINOR,NULL_LIB_NAME,NULL_LIB_REV,NULL_LIB_VER_STR,null_op_stubs, andNULL_SO_NAME.int null_decode (void * desc, char ** data, char ** parity, int * missing_idxs, int blocksize) [static]β definition at line82of filenull.c.int null_element_size (void * desc) [static]β Return the element-size, which is the number of bits stored on a given device, per codeword. This is usually just'w'. Definition at line105of filenull.c. ReferencesDEFAULT_W.int null_encode (void * desc, char ** data, char ** parity, int blocksize) [static]β definition at line77of filenull.c.int null_exit (void * desc) [static]β definition at line204of filenull.c.void * null_init (struct ec_backend_args * args, void * backend_sohandle) [static]β definition at line110of filenull.c. Referencesnull_descriptor::arg1,DEFAULT_W,null_descriptor::init_null_code,null_descriptor::k,null_descriptor::m,null_descriptor::null_code_decode,null_descriptor::null_code_encode,null_descriptor::null_code_fragments_needed,null_descriptor::null_reconstruct, andnull_descriptor::w.bool null_is_compatible_with (uint32_t version) [static]β definition at line212of filenull.c.int null_min_fragments (void * desc, int * missing_idxs, int * fragments_to_exclude, int * fragments_needed) [static]β definition at line94of filenull.c.int null_reconstruct (void * desc, char ** data, char ** parity, int * missing_idxs, int destination_idx, int blocksize) [static]β definition at line88of filenull.c.
π Variable Documentation π
struct ec_backend_op_stubs null_op_stubs [static]β Initial value:
= {
.INIT = null_init,
.EXIT = null_exit,
.ISSYSTEMATIC = 1,
.ENCODE = null_encode,
.DECODE = null_decode,
.FRAGSNEEDED = null_min_fragments,
.RECONSTRUCT = null_reconstruct,
.ELEMENTSIZE = null_element_size,
.ISCOMPATIBLEWITH = null_is_compatible_with,
.GETMETADATASIZE = get_backend_metadata_size_zero,
.GETENCODEOFFSET = get_encode_offset_zero,
}
Definition at line 216 of file null.c. Referenced by __attribute__().
π Author π
Generated automatically by Doxygen for liberasurecode from the source code. Doxygen really said βI'll do it myselfβ π.
Version 1.8.0 Β· Tue Jan 1 1980 00:0 Β· /build/source...s/null/null.c(3) β that's the source/version/date sign-off, bestie. okay bye, hydrate and don't forget to close your file descriptors π
π
π¦ where this page comes from
- nixpkgs unstable: liberasurecode 1.8.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms