Lines Matching refs:bio
70 static int tls_dump_new(BIO *bio)
72 BIO_set_init(bio, 1);
76 static int tls_dump_free(BIO *bio)
78 BIO_set_init(bio, 0);
83 static void copy_flags(BIO *bio)
86 BIO *next = BIO_next(bio);
89 BIO_clear_flags(bio, BIO_FLAGS_SHOULD_RETRY | BIO_FLAGS_RWS);
90 BIO_set_flags(bio, flags);
193 static int tls_dump_read(BIO *bio, char *out, int outl)
196 BIO *next = BIO_next(bio);
199 copy_flags(bio);
208 static int tls_dump_write(BIO *bio, const char *in, int inl)
211 BIO *next = BIO_next(bio);
214 copy_flags(bio);
219 static long tls_dump_ctrl(BIO *bio, int cmd, long num, void *ptr)
222 BIO *next = BIO_next(bio);
238 static int tls_dump_gets(BIO *bio, char *buf, int size)
244 static int tls_dump_puts(BIO *bio, const char *str)
246 return tls_dump_write(bio, str, strlen(str));
307 static int mempacket_test_new(BIO *bio)
319 BIO_set_init(bio, 1);
320 BIO_set_data(bio, ctx);
324 static int mempacket_test_free(BIO *bio)
326 MEMPACKET_TEST_CTX *ctx = BIO_get_data(bio);
330 BIO_set_data(bio, NULL);
331 BIO_set_init(bio, 0);
344 static int mempacket_test_read(BIO *bio, char *out, int outl)
346 MEMPACKET_TEST_CTX *ctx = BIO_get_data(bio);
352 BIO_clear_retry_flags(bio);
356 BIO_set_retry_read(bio);
399 BIO_set_retry_read(bio);
417 int mempacket_swap_epoch(BIO *bio)
419 MEMPACKET_TEST_CTX *ctx = BIO_get_data(bio);
497 int mempacket_move_packet(BIO *bio, int d, int s)
499 MEMPACKET_TEST_CTX *ctx = BIO_get_data(bio);
532 int mempacket_test_inject(BIO *bio, const char *in, int inl, int pktnum,
535 MEMPACKET_TEST_CTX *ctx = BIO_get_data(bio);
645 static int mempacket_test_write(BIO *bio, const char *in, int inl)
647 return mempacket_test_inject(bio, in, inl, -1, STANDARD_PACKET);
650 static long mempacket_test_ctrl(BIO *bio, int cmd, long num, void *ptr)
653 MEMPACKET_TEST_CTX *ctx = BIO_get_data(bio);
661 ret = BIO_get_shutdown(bio);
664 BIO_set_shutdown(bio, (int)num);
702 static int mempacket_test_gets(BIO *bio, char *buf, int size)
708 static int mempacket_test_puts(BIO *bio, const char *str)
710 return mempacket_test_write(bio, str, strlen(str));
750 static int always_retry_new(BIO *bio)
752 BIO_set_init(bio, 1);
756 static int always_retry_free(BIO *bio)
758 BIO_set_data(bio, NULL);
759 BIO_set_init(bio, 0);
763 static int always_retry_read(BIO *bio, char *out, int outl)
765 BIO_set_retry_read(bio);
769 static int always_retry_write(BIO *bio, const char *in, int inl)
771 BIO_set_retry_write(bio);
775 static long always_retry_ctrl(BIO *bio, int cmd, long num, void *ptr)
781 BIO_set_retry_write(bio);
795 static int always_retry_gets(BIO *bio, char *buf, int size)
797 BIO_set_retry_read(bio);
801 static int always_retry_puts(BIO *bio, const char *str)
803 BIO_set_retry_write(bio);