Line data Source code
1 : #ifndef HEADER_fd_src_waltz_quic_fd_quic_retry_private_h 2 : #define HEADER_fd_src_waltz_quic_fd_quic_retry_private_h 3 : 4 : #include "fd_quic_retry.h" 5 : 6 : #include "fd_quic_proto.h" 7 : #include "fd_quic_proto.c" 8 : 9 : /* FD_QUIC_RETRY_MAX_PSEUDO_SZ is the max encoded size of a Retry pseudo 10 : header. */ 11 : 12 : #define FD_QUIC_RETRY_MAX_PSEUDO_SZ \ 13 : ( sizeof(uchar) + FD_QUIC_MAX_CONN_ID_SZ + \ 14 : FD_QUIC_MAX_FOOTPRINT(retry_hdr) + \ 15 : FD_QUIC_RETRY_MAX_TOKEN_SZ ) 16 : 17 : /* FD_QUIC_RETRY_MAX_SZ is the max encoded size of a Retry packet. */ 18 : 19 : #define FD_QUIC_RETRY_MAX_SZ \ 20 : ( FD_QUIC_MAX_FOOTPRINT(retry_hdr) + \ 21 : FD_QUIC_RETRY_MAX_TOKEN_SZ + \ 22 : FD_QUIC_CRYPTO_TAG_SZ ) 23 : 24 : /* FD_QUIC_RETRY_EXPIRE_SHIFT: Expiry timestamps (unix nanos) are right- 25 : shifted 22 bits to avoid leaking high-precision timing information. 26 : This results in a precision of ~4.19 ms. 27 : 28 : FIXME this breaks when using slower fd_quic clocks */ 29 : 30 6002172 : #define FD_QUIC_RETRY_EXPIRE_SHIFT (22) 31 : 32 : ulong 33 : fd_quic_retry_pseudo( 34 : uchar out[ FD_QUIC_RETRY_MAX_PSEUDO_SZ ], 35 : void const * retry_pkt, 36 : ulong retry_pkt_sz, 37 : fd_quic_conn_id_t const * orig_dst_conn_id ); 38 : 39 : #endif /* HEADER_fd_src_waltz_quic_fd_quic_retry_private_h */