Line data Source code
1 : #ifndef HEADER_fd_src_discof_ipecho_fd_ipecho_client_private_h 2 : #define HEADER_fd_src_discof_ipecho_fd_ipecho_client_private_h 3 : 4 : #include "../../util/fd_util_base.h" 5 : 6 : #include <sys/poll.h> 7 : 8 : struct fd_ipecho_client_peer { 9 : int writing; 10 : ulong request_bytes_sent; 11 : 12 : ulong response_bytes_read; 13 : uchar response[ 28UL ]; 14 : }; 15 : 16 : typedef struct fd_ipecho_client_peer fd_ipecho_client_peer_t; 17 : 18 : struct fd_ipecho_client_private { 19 : long start_time_nanos; 20 : ulong peer_cnt; 21 : 22 : struct pollfd pollfds[ 16UL ]; 23 : fd_ipecho_client_peer_t peers[ 16UL ]; 24 : 25 : ulong magic; 26 : }; 27 : 28 0 : #define FD_IPECHO_PARSE_OK ( 0) 29 0 : #define FD_IPECHO_PARSE_ERR (-1) 30 : 31 : int 32 : fd_ipecho_client_parse_response( uchar const * response, 33 : ulong response_len, 34 : ushort * shred_version ); 35 : 36 : #endif /* HEADER_fd_src_discof_ipecho_fd_ipecho_client_private_h */