NULL.C(3)

πŸ“¦
version 1.8.0 Β· 2 versions
, in nixpkgs unstable

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 line 75 of file null.c.
  • #define NULL_LIB_MAJOR 1 β€” definition at line 34 of file null.c; referenced by __attribute__().
  • #define NULL_LIB_MINOR 0 β€” definition at line 35 of file null.c; referenced by __attribute__().
  • #define NULL_LIB_NAME 'null' β€” definition at line 38 of file null.c; referenced by __attribute__().
  • #define NULL_LIB_REV 0 β€” definition at line 36 of file null.c; referenced by __attribute__().
  • #define NULL_LIB_VER_STR '1.0' β€” definition at line 37 of file null.c; referenced by __attribute__().
  • #define NULL_SO_NAME 'libnullcode' LIBERASURECODE_SO_SUFFIX '.so.1' β€” definition at line 42 of file null.c; referenced by __attribute__().

🧚 Typedef Documentation 🧚

  • typedef void *(* init_null_code_func) (int, int, int) β€” definition at line 46 of file null.c.
  • typedef int(* null_code_decode_func) (void *, char **, char **, int *, int, int) β€” definition at line 48 of file null.c.
  • typedef int(* null_code_encode_func) (void *, char **, char **, int) β€” definition at line 47 of file null.c.
  • typedef int(* null_code_fragments_needed_func) (void *, int *, int *, int *) β€” definition at line 50 of file null.c.
  • typedef int(* null_reconstruct_func) (char **, int, uint64_t, int, char *) β€” definition at line 49 of file null.c.

πŸ’… Function Documentation πŸ’…

  • __attribute__ ((visibility('internal')) ) β€” definition at line 230 of file null.c. References backend_null, NULL_LIB_MAJOR, NULL_LIB_MINOR, NULL_LIB_NAME, NULL_LIB_REV, NULL_LIB_VER_STR, null_op_stubs, and NULL_SO_NAME.
  • int null_decode (void * desc, char ** data, char ** parity, int * missing_idxs, int blocksize) [static] β€” definition at line 82 of file null.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 line 105 of file null.c. References DEFAULT_W.
  • int null_encode (void * desc, char ** data, char ** parity, int blocksize) [static] β€” definition at line 77 of file null.c.
  • int null_exit (void * desc) [static] β€” definition at line 204 of file null.c.
  • void * null_init (struct ec_backend_args * args, void * backend_sohandle) [static] β€” definition at line 110 of file null.c. References null_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, and null_descriptor::w.
  • bool null_is_compatible_with (uint32_t version) [static] β€” definition at line 212 of file null.c.
  • int null_min_fragments (void * desc, int * missing_idxs, int * fragments_to_exclude, int * fragments_needed) [static] β€” definition at line 94 of file null.c.
  • int null_reconstruct (void * desc, char ** data, char ** parity, int * missing_idxs, int destination_idx, int blocksize) [static] β€” definition at line 88 of file null.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