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 <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 : ulong remaining_peer_cnt; 22 : 23 : int epoll_fd; 24 : 25 : struct pollfd pollfds[ 16UL ]; 26 : fd_ipecho_client_peer_t peers[ 16UL ]; 27 : 28 : ulong magic; 29 : }; 30 : 31 0 : #define FD_IPECHO_PARSE_OK ( 0) 32 0 : #define FD_IPECHO_PARSE_ERR (-1) 33 : 34 : int 35 : fd_ipecho_client_parse_response( uchar const * response, 36 : ulong response_len, 37 : ushort * shred_version ); 38 : 39 : #endif /* HEADER_fd_src_discof_ipecho_fd_ipecho_client_private_h */