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 : void 28 : fd_sshttp_snapshot_names( fd_sshttp_t const * http, 29 : char const ** full_snapshot_name, 30 : char const ** incremental_snapshot_name ); 31 : 32 : ulong 33 : fd_sshttp_content_len( fd_sshttp_t const * http ); 34 : 35 : void 36 : fd_sshttp_init( fd_sshttp_t * http, 37 : fd_ip4_port_t addr, 38 : char const * path, 39 : ulong path_len, 40 : long now ); 41 : 42 : void 43 : fd_sshttp_cancel( fd_sshttp_t * http ); 44 : 45 0 : #define FD_SSHTTP_ADVANCE_ERROR (-1) 46 0 : #define FD_SSHTTP_ADVANCE_AGAIN ( 0) 47 0 : #define FD_SSHTTP_ADVANCE_DATA ( 1) 48 0 : #define FD_SSHTTP_ADVANCE_DONE ( 2) 49 : 50 : int 51 : fd_sshttp_advance( fd_sshttp_t * http, 52 : ulong * data_len, 53 : uchar * data, 54 : long now ); 55 : 56 : FD_PROTOTYPES_END 57 : 58 : #endif /* HEADER_fd_src_discof_restore_utils_fd_sshttp_h */