Lines Matching refs:bio

77 static int tls_dump_new(BIO *bio)  in tls_dump_new()  argument
79 BIO_set_init(bio, 1); in tls_dump_new()
83 static int tls_dump_free(BIO *bio) in tls_dump_free() argument
85 BIO_set_init(bio, 0); in tls_dump_free()
90 static void copy_flags(BIO *bio) in copy_flags() argument
93 BIO *next = BIO_next(bio); in copy_flags()
96 BIO_clear_flags(bio, BIO_FLAGS_SHOULD_RETRY | BIO_FLAGS_RWS); in copy_flags()
97 BIO_set_flags(bio, flags); in copy_flags()
200 static int tls_dump_read(BIO *bio, char *out, int outl) in tls_dump_read() argument
203 BIO *next = BIO_next(bio); in tls_dump_read()
206 copy_flags(bio); in tls_dump_read()
215 static int tls_dump_write(BIO *bio, const char *in, int inl) in tls_dump_write() argument
218 BIO *next = BIO_next(bio); in tls_dump_write()
221 copy_flags(bio); in tls_dump_write()
226 static long tls_dump_ctrl(BIO *bio, int cmd, long num, void *ptr) in tls_dump_ctrl() argument
229 BIO *next = BIO_next(bio); in tls_dump_ctrl()
245 static int tls_dump_gets(BIO *bio, char *buf, int size) in tls_dump_gets() argument
251 static int tls_dump_puts(BIO *bio, const char *str) in tls_dump_puts() argument
253 return tls_dump_write(bio, str, strlen(str)); in tls_dump_puts()
314 static int mempacket_test_new(BIO *bio) in mempacket_test_new() argument
326 BIO_set_init(bio, 1); in mempacket_test_new()
327 BIO_set_data(bio, ctx); in mempacket_test_new()
331 static int mempacket_test_free(BIO *bio) in mempacket_test_free() argument
333 MEMPACKET_TEST_CTX *ctx = BIO_get_data(bio); in mempacket_test_free()
337 BIO_set_data(bio, NULL); in mempacket_test_free()
338 BIO_set_init(bio, 0); in mempacket_test_free()
351 static int mempacket_test_read(BIO *bio, char *out, int outl) in mempacket_test_read() argument
353 MEMPACKET_TEST_CTX *ctx = BIO_get_data(bio); in mempacket_test_read()
359 BIO_clear_retry_flags(bio); in mempacket_test_read()
363 BIO_set_retry_read(bio); in mempacket_test_read()
406 BIO_set_retry_read(bio); in mempacket_test_read()
424 int mempacket_swap_epoch(BIO *bio) in mempacket_swap_epoch() argument
426 MEMPACKET_TEST_CTX *ctx = BIO_get_data(bio); in mempacket_swap_epoch()
504 int mempacket_move_packet(BIO *bio, int d, int s) in mempacket_move_packet() argument
506 MEMPACKET_TEST_CTX *ctx = BIO_get_data(bio); in mempacket_move_packet()
539 int mempacket_test_inject(BIO *bio, const char *in, int inl, int pktnum, in mempacket_test_inject() argument
542 MEMPACKET_TEST_CTX *ctx = BIO_get_data(bio); in mempacket_test_inject()
652 static int mempacket_test_write(BIO *bio, const char *in, int inl) in mempacket_test_write() argument
654 return mempacket_test_inject(bio, in, inl, -1, STANDARD_PACKET); in mempacket_test_write()
657 static long mempacket_test_ctrl(BIO *bio, int cmd, long num, void *ptr) in mempacket_test_ctrl() argument
660 MEMPACKET_TEST_CTX *ctx = BIO_get_data(bio); in mempacket_test_ctrl()
668 ret = BIO_get_shutdown(bio); in mempacket_test_ctrl()
671 BIO_set_shutdown(bio, (int)num); in mempacket_test_ctrl()
709 static int mempacket_test_gets(BIO *bio, char *buf, int size) in mempacket_test_gets() argument
715 static int mempacket_test_puts(BIO *bio, const char *str) in mempacket_test_puts() argument
717 return mempacket_test_write(bio, str, strlen(str)); in mempacket_test_puts()
757 static int always_retry_new(BIO *bio) in always_retry_new() argument
759 BIO_set_init(bio, 1); in always_retry_new()
763 static int always_retry_free(BIO *bio) in always_retry_free() argument
765 BIO_set_data(bio, NULL); in always_retry_free()
766 BIO_set_init(bio, 0); in always_retry_free()
775 static int always_retry_read(BIO *bio, char *out, int outl) in always_retry_read() argument
777 BIO_set_retry_read(bio); in always_retry_read()
781 static int always_retry_write(BIO *bio, const char *in, int inl) in always_retry_write() argument
783 BIO_set_retry_write(bio); in always_retry_write()
787 static long always_retry_ctrl(BIO *bio, int cmd, long num, void *ptr) in always_retry_ctrl() argument
793 BIO_set_retry_write(bio); in always_retry_ctrl()
807 static int always_retry_gets(BIO *bio, char *buf, int size) in always_retry_gets() argument
809 BIO_set_retry_read(bio); in always_retry_gets()
813 static int always_retry_puts(BIO *bio, const char *str) in always_retry_puts() argument
815 BIO_set_retry_write(bio); in always_retry_puts()
851 static int maybe_retry_new(BIO *bio) in maybe_retry_new() argument
858 BIO_set_data(bio, data); in maybe_retry_new()
859 BIO_set_init(bio, 1); in maybe_retry_new()
863 static int maybe_retry_free(BIO *bio) in maybe_retry_free() argument
865 struct maybe_retry_data_st *data = BIO_get_data(bio); in maybe_retry_free()
868 BIO_set_data(bio, NULL); in maybe_retry_free()
869 BIO_set_init(bio, 0); in maybe_retry_free()
873 static int maybe_retry_write(BIO *bio, const char *in, int inl) in maybe_retry_write() argument
875 struct maybe_retry_data_st *data = BIO_get_data(bio); in maybe_retry_write()
881 BIO_set_retry_write(bio); in maybe_retry_write()
886 return BIO_write(BIO_next(bio), in, inl); in maybe_retry_write()
889 static long maybe_retry_ctrl(BIO *bio, int cmd, long num, void *ptr) in maybe_retry_ctrl() argument
891 struct maybe_retry_data_st *data = BIO_get_data(bio); in maybe_retry_ctrl()
903 BIO_set_retry_write(bio); in maybe_retry_ctrl()
909 return BIO_ctrl(BIO_next(bio), cmd, num, ptr); in maybe_retry_ctrl()