Line data Source code
1 : #ifndef HEADER_fd_src_discof_restore_utils_fd_sshttp_h 2 : #define HEADER_fd_src_discof_restore_utils_fd_sshttp_h 3 : 4 : struct fd_sshttp_private; 5 : typedef struct fd_sshttp_private fd_sshttp_t; 6 : 7 : #include "../../../util/net/fd_net_headers.h" 8 : 9 0 : #define FD_SSHTTP_ALIGN (8UL) 10 : 11 0 : #define FD_SSHTTP_MAGIC (0xF17EDA2CE5811900) /* FIREDANCE HTTP V0 */ 12 : 13 : FD_PROTOTYPES_BEGIN 14 : 15 : FD_FN_CONST ulong 16 : fd_sshttp_align( void ); 17 : 18 : FD_FN_CONST ulong 19 : fd_sshttp_footprint( void ); 20 : 21 : void * 22 : fd_sshttp_new( void * shmem ); 23 : 24 : fd_sshttp_t * 25 : fd_sshttp_join( void * sshttp ); 26 : 27 : /* Sets points to snapshot names */ 28 : void 29 : fd_sshttp_snapshot_names( fd_sshttp_t * http, 30 : char const ** full_snapshot_name, 31 : char const ** incremental_snapshot_name ); 32 : 33 : void 34 : fd_sshttp_init( fd_sshttp_t * http, 35 : fd_ip4_port_t addr, 36 : char const * path, 37 : ulong path_len, 38 : long now ); 39 : 40 : void 41 : fd_sshttp_cancel( fd_sshttp_t * http ); 42 : 43 0 : #define FD_SSHTTP_ADVANCE_ERROR (-1) 44 0 : #define FD_SSHTTP_ADVANCE_AGAIN ( 0) 45 0 : #define FD_SSHTTP_ADVANCE_DATA ( 1) 46 0 : #define FD_SSHTTP_ADVANCE_DONE ( 2) 47 : 48 : int 49 : fd_sshttp_advance( fd_sshttp_t * http, 50 : ulong * data_len, 51 : uchar * data, 52 : long now ); 53 : 54 : FD_PROTOTYPES_END 55 : 56 : #endif /* HEADER_fd_src_discof_restore_utils_fd_sshttp_h */