X-Git-Url: https://git.openssl.org/?a=blobdiff_plain;f=include%2Fopenssl%2Fbio.h;h=85833626485de9d0f7b1b85ba0118a5f0dc48707;hb=bee5d6cd3fa2f8bcc7e1153e4dc26aa26144bee0;hp=bb289e6fa2dc537606df969764dcc1bd0a0fe893;hpb=1ca50aa975fb149a75a3b0411230761376cb5e33;p=openssl.git diff --git a/include/openssl/bio.h b/include/openssl/bio.h index bb289e6fa2..8583362648 100644 --- a/include/openssl/bio.h +++ b/include/openssl/bio.h @@ -12,7 +12,7 @@ # pragma once # include -# if !OPENSSL_API_3 +# ifndef OPENSSL_NO_DEPRECATED_3_0 # define HEADER_BIO_H # endif @@ -160,6 +160,11 @@ extern "C" { # define BIO_CTRL_DGRAM_SCTP_WAIT_FOR_DRY 77 # define BIO_CTRL_DGRAM_SCTP_MSG_WAITING 78 +/* BIO_f_prefix controls */ +# define BIO_CTRL_SET_PREFIX 79 +# define BIO_CTRL_SET_INDENT 80 +# define BIO_CTRL_GET_INDENT 81 + # ifndef OPENSSL_NO_KTLS # define BIO_get_ktls_send(b) \ BIO_ctrl(b, BIO_CTRL_GET_KTLS_SEND, 0, NULL) @@ -181,7 +186,7 @@ extern "C" { # define BIO_FLAGS_IO_SPECIAL 0x04 # define BIO_FLAGS_RWS (BIO_FLAGS_READ|BIO_FLAGS_WRITE|BIO_FLAGS_IO_SPECIAL) # define BIO_FLAGS_SHOULD_RETRY 0x08 -# if !OPENSSL_API_3 +# ifndef OPENSSL_NO_DEPRECATED_3_0 /* This #define was replaced by an internal constant and should not be used. */ # define BIO_FLAGS_UPLINK 0 # endif @@ -195,6 +200,7 @@ extern "C" { */ # define BIO_FLAGS_MEM_RDONLY 0x200 # define BIO_FLAGS_NONCLEAR_RST 0x400 +# define BIO_FLAGS_IN_EOF 0x800 typedef union bio_addr_st BIO_ADDR; typedef struct bio_addrinfo_st BIO_ADDRINFO; @@ -552,6 +558,11 @@ int BIO_ctrl_reset_read_request(BIO *b); # define BIO_dgram_get_mtu_overhead(b) \ (unsigned int)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_MTU_OVERHEAD, 0, NULL) +/* ctrl macros for BIO_f_prefix */ +# define BIO_set_prefix(b,p) BIO_ctrl((b), BIO_CTRL_SET_PREFIX, 0, (void *)(p)) +# define BIO_set_indent(b,i) BIO_ctrl((b), BIO_CTRL_SET_INDENT, (i), NULL) +# define BIO_get_indent(b) BIO_ctrl((b), BIO_CTRL_GET_INDENT, 0, NULL) + #define BIO_get_ex_new_index(l, p, newf, dupf, freef) \ CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_BIO, l, p, newf, dupf, freef) int BIO_set_ex_data(BIO *bio, int idx, void *data); @@ -630,6 +641,7 @@ const BIO_METHOD *BIO_f_null(void); const BIO_METHOD *BIO_f_buffer(void); const BIO_METHOD *BIO_f_linebuffer(void); const BIO_METHOD *BIO_f_nbio_test(void); +const BIO_METHOD *BIO_f_prefix(void); # ifndef OPENSSL_NO_DGRAM const BIO_METHOD *BIO_s_datagram(void); int BIO_dgram_non_fatal_error(int error); @@ -649,7 +661,10 @@ int BIO_dgram_sctp_msg_waiting(BIO *b); # ifndef OPENSSL_NO_SOCK int BIO_sock_should_retry(int i); int BIO_sock_non_fatal_error(int error); +int BIO_socket_wait(int fd, int for_read, time_t max_time); # endif +int BIO_wait(BIO *bio, time_t max_time, unsigned int milliseconds); +int BIO_connect_retry(BIO *bio, int timeout); int BIO_fd_should_retry(int i); int BIO_fd_non_fatal_error(int error); @@ -704,7 +719,7 @@ int BIO_sock_error(int sock); int BIO_socket_ioctl(int fd, long type, void *arg); int BIO_socket_nbio(int fd, int mode); int BIO_sock_init(void); -# if !OPENSSL_API_1_1_0 +# ifndef OPENSSL_NO_DEPRECATED_1_1_0 # define BIO_sock_cleanup() while(0) continue # endif int BIO_set_tcp_ndelay(int sock, int turn_on);