LCOV - code coverage report
Current view: top level - discof/ipecho - fd_ipecho_server.h (source / functions) Hit Total Coverage
Test: cov.lcov Lines: 0 1 0.0 %
Date: 2026-10-22 18:10:43 Functions: 0 0 -

          Line data    Source code
       1             : #ifndef HEADER_fd_src_discof_ipecho_fd_ipecho_server_h
       2             : #define HEADER_fd_src_discof_ipecho_fd_ipecho_server_h
       3             : 
       4             : #include "../../util/fd_util_base.h"
       5             : #include "fd_ipecho_server_port_check.h"
       6             : 
       7           0 : #define FD_IPECHO_SERVER_MAGIC (0xF17EDA2CE5185EC8) /* FIREDANCER SIPECHO V0 */
       8             : 
       9             : struct fd_ipecho_server;
      10             : typedef struct fd_ipecho_server fd_ipecho_server_t;
      11             : 
      12             : struct fd_ipecho_server_metrics {
      13             :   ulong connection_cnt;
      14             :   ulong bytes_read;
      15             :   ulong bytes_written;
      16             :   ulong connections_closed_ok;
      17             :   ulong connections_closed_error;
      18             : };
      19             : 
      20             : typedef struct fd_ipecho_server_metrics fd_ipecho_server_metrics_t;
      21             : 
      22             : FD_FN_CONST ulong
      23             : fd_ipecho_server_align( void );
      24             : 
      25             : FD_FN_CONST ulong
      26             : fd_ipecho_server_footprint( ulong max_connection_cnt );
      27             : 
      28             : void *
      29             : fd_ipecho_server_new( void * shmem,
      30             :                       ulong  max_connection_cnt );
      31             : 
      32             : fd_ipecho_server_t *
      33             : fd_ipecho_server_join( void * shipe );
      34             : 
      35             : void
      36             : fd_ipecho_server_init( fd_ipecho_server_t * server,
      37             :                        int                  epoll_fd,
      38             :                        uint                 address,
      39             :                        ushort               port,
      40             :                        ushort               shred_version );
      41             : 
      42             : void
      43             : fd_ipecho_server_fini( fd_ipecho_server_t * server );
      44             : 
      45             : /* fd_ipecho_server_close_conns closes all accepted connections and
      46             :    abandons all in-flight port check connections, but leaves the
      47             :    listen socket and the port check's UDP socket open. */
      48             : 
      49             : void
      50             : fd_ipecho_server_close_conns( fd_ipecho_server_t * server );
      51             : 
      52             : void
      53             : fd_ipecho_server_set_shred_version( fd_ipecho_server_t * server,
      54             :                                     ushort               shred_version );
      55             : 
      56             : int
      57             : fd_ipecho_server_epoll_poll( fd_ipecho_server_t * server,
      58             :                              long                 now,
      59             :                              int *                charge_busy );
      60             : 
      61             : fd_ipecho_server_metrics_t *
      62             : fd_ipecho_server_metrics( fd_ipecho_server_t * server );
      63             : 
      64             : int
      65             : fd_ipecho_server_sockfd( fd_ipecho_server_t * server );
      66             : 
      67             : fd_ipecho_server_port_check_t *
      68             : fd_ipecho_server_port_check( fd_ipecho_server_t * server );
      69             : 
      70             : #endif /* HEADER_fd_src_discof_ipecho_fd_ipecho_server_h */

Generated by: LCOV version 1.14