LCOV - code coverage report
Current view: top level - disco/archiver - fd_archiver.h (source / functions) Hit Total Coverage
Test: cov.lcov Lines: 0 7 0.0 %
Date: 2025-07-01 05:00:49 Functions: 0 0 -

          Line data    Source code
       1             : #ifndef HEADER_fd_src_disco_archiver_fd_archiver_h
       2             : #define HEADER_fd_src_disco_archiver_fd_archiver_h
       3             : 
       4             : #include "../tiles.h"
       5             : 
       6           0 : #define FD_ARCHIVER_HEADER_VERSION (1U)
       7             : 
       8           0 : #define FD_ARCHIVER_TILE_ID_SHRED  (0U)
       9           0 : #define FD_ARCHIVER_TILE_ID_REPAIR (1U)
      10             : #define FD_ARCHIVER_TILE_CNT       (2U)
      11             : 
      12             : /* For now, feeder only needs to distinguish 2 types of input frags,
      13             :    so we use the highest bit in sig to distinguish shred and repair. */
      14             : #define FD_ARCHIVER_SIG_MARK_SHRED(x)  fd_ulong_clear_bit(x, 63)
      15             : #define FD_ARCHIVER_SIG_MARK_REPAIR(x) fd_ulong_set_bit(x, 63)
      16           0 : #define FD_ARCHIVER_SIG_TILE_ID(x)     ((uint)fd_ulong_extract_bit(x, 63))
      17           0 : #define FD_ARCHIVER_SIG_CLEAR(x)       fd_ulong_clear_bit(x, 63)
      18             : 
      19           0 : #define FD_ARCHIVER_HEADER_MAGIC (0xF17EDA2CE5A4B321) /* FIREDANCE ARCHIVER */
      20             : 
      21             : /* Header written out to the archive for each fragment */
      22             : struct __attribute__((aligned(1UL))) fd_archiver_frag_header {
      23             :   ulong magic;
      24             :   /* Version */
      25             :   uint version;
      26             :   /* The identifier of the tile that the frag was received from */
      27             :   uint tile_id;
      28             :   /* Number of ns since the previous fragment */
      29             :   ulong ns_since_prev_fragment;
      30             :   /* Size of the fragment data portion, immediately following this header */
      31             :   ulong sz;
      32             :   /* Signature of the fragment */
      33             :   ulong sig;
      34             :   /* Sequence number of the fragment */
      35             :   ulong seq;
      36             : };
      37             : typedef struct fd_archiver_frag_header fd_archiver_frag_header_t;
      38           0 : #define FD_ARCHIVER_FRAG_HEADER_FOOTPRINT (48UL)
      39             : #define FD_ARCHIVER_FRAG_HEADER_ALIGN     (1UL)
      40             : 
      41             : #endif /* HEADER_fd_src_disco_archiver_fd_archiver_h */

Generated by: LCOV version 1.14