Lines Matching refs:bio

178 static int dgram_pair_write(BIO *bio, const char *buf, int sz_);
179 static int dgram_pair_read(BIO *bio, char *buf, int sz_);
180 static int dgram_mem_read(BIO *bio, char *buf, int sz_);
181 static long dgram_pair_ctrl(BIO *bio, int cmd, long num, void *ptr);
182 static long dgram_mem_ctrl(BIO *bio, int cmd, long num, void *ptr);
183 static int dgram_pair_init(BIO *bio);
184 static int dgram_mem_init(BIO *bio);
185 static int dgram_pair_free(BIO *bio);
275 static int dgram_pair_init(BIO *bio) in dgram_pair_init() argument
292 bio->ptr = b; in dgram_pair_init()
296 static int dgram_mem_init(BIO *bio) in dgram_mem_init() argument
300 if (!dgram_pair_init(bio)) in dgram_mem_init()
303 b = bio->ptr; in dgram_mem_init()
312 bio->init = 1; in dgram_mem_init()
316 static int dgram_pair_free(BIO *bio) in dgram_pair_free() argument
320 if (bio == NULL) in dgram_pair_free()
323 b = bio->ptr; in dgram_pair_free()
328 dgram_pair_ctrl_destroy_bio_pair(bio); in dgram_pair_free()
429 static int dgram_pair_ctrl_eof(BIO *bio) in dgram_pair_ctrl_eof() argument
431 struct bio_dgram_pair_st *b = bio->ptr, *peerb; in dgram_pair_ctrl_eof()
437 if (!bio->init) in dgram_pair_ctrl_eof()
455 static int dgram_pair_ctrl_set_write_buf_size(BIO *bio, size_t len) in dgram_pair_ctrl_set_write_buf_size() argument
457 struct bio_dgram_pair_st *b = bio->ptr; in dgram_pair_ctrl_set_write_buf_size()
480 static int dgram_pair_ctrl_reset(BIO *bio) in dgram_pair_ctrl_reset() argument
482 struct bio_dgram_pair_st *b = bio->ptr; in dgram_pair_ctrl_reset()
489 static size_t dgram_pair_ctrl_pending(BIO *bio) in dgram_pair_ctrl_pending() argument
492 struct bio_dgram_pair_st *b = bio->ptr, *readb; in dgram_pair_ctrl_pending()
497 if (!bio->init) in dgram_pair_ctrl_pending()
524 static size_t dgram_pair_ctrl_get_write_guarantee(BIO *bio) in dgram_pair_ctrl_get_write_guarantee() argument
527 struct bio_dgram_pair_st *b = bio->ptr; in dgram_pair_ctrl_get_write_guarantee()
548 static int dgram_pair_ctrl_get_local_addr_cap(BIO *bio) in dgram_pair_ctrl_get_local_addr_cap() argument
550 struct bio_dgram_pair_st *b = bio->ptr, *readb; in dgram_pair_ctrl_get_local_addr_cap()
552 if (!bio->init) in dgram_pair_ctrl_get_local_addr_cap()
565 static int dgram_pair_ctrl_get_effective_caps(BIO *bio) in dgram_pair_ctrl_get_effective_caps() argument
567 struct bio_dgram_pair_st *b = bio->ptr, *peerb; in dgram_pair_ctrl_get_effective_caps()
578 static uint32_t dgram_pair_ctrl_get_caps(BIO *bio) in dgram_pair_ctrl_get_caps() argument
580 struct bio_dgram_pair_st *b = bio->ptr; in dgram_pair_ctrl_get_caps()
586 static int dgram_pair_ctrl_set_caps(BIO *bio, uint32_t caps) in dgram_pair_ctrl_set_caps() argument
588 struct bio_dgram_pair_st *b = bio->ptr; in dgram_pair_ctrl_set_caps()
595 static int dgram_pair_ctrl_get_local_addr_enable(BIO *bio) in dgram_pair_ctrl_get_local_addr_enable() argument
597 struct bio_dgram_pair_st *b = bio->ptr; in dgram_pair_ctrl_get_local_addr_enable()
603 static int dgram_pair_ctrl_set_local_addr_enable(BIO *bio, int enable) in dgram_pair_ctrl_set_local_addr_enable() argument
605 struct bio_dgram_pair_st *b = bio->ptr; in dgram_pair_ctrl_set_local_addr_enable()
607 if (dgram_pair_ctrl_get_local_addr_cap(bio) == 0) in dgram_pair_ctrl_set_local_addr_enable()
615 static int dgram_pair_ctrl_get_mtu(BIO *bio) in dgram_pair_ctrl_get_mtu() argument
617 struct bio_dgram_pair_st *b = bio->ptr; in dgram_pair_ctrl_get_mtu()
623 static int dgram_pair_ctrl_set_mtu(BIO *bio, size_t mtu) in dgram_pair_ctrl_set_mtu() argument
625 struct bio_dgram_pair_st *b = bio->ptr, *peerb; in dgram_pair_ctrl_set_mtu()
638 static long dgram_mem_ctrl(BIO *bio, int cmd, long num, void *ptr) in dgram_mem_ctrl() argument
641 struct bio_dgram_pair_st *b = bio->ptr; in dgram_mem_ctrl()
653 ret = (long)dgram_pair_ctrl_set_write_buf_size(bio, (size_t)num); in dgram_mem_ctrl()
667 dgram_pair_ctrl_reset(bio); in dgram_mem_ctrl()
675 ret = (long)dgram_pair_ctrl_get_write_guarantee(bio); in dgram_mem_ctrl()
680 ret = (long)dgram_pair_ctrl_pending(bio); in dgram_mem_ctrl()
699 *(int *)ptr = (int)dgram_pair_ctrl_get_local_addr_enable(bio); in dgram_mem_ctrl()
704 ret = (long)dgram_pair_ctrl_set_local_addr_enable(bio, num); in dgram_mem_ctrl()
709 ret = (long)dgram_pair_ctrl_get_local_addr_cap(bio); in dgram_mem_ctrl()
716 ret = (long)dgram_pair_ctrl_get_caps(bio); in dgram_mem_ctrl()
721 ret = (long)dgram_pair_ctrl_set_caps(bio, (uint32_t)num); in dgram_mem_ctrl()
726 ret = (long)dgram_pair_ctrl_get_mtu(bio); in dgram_mem_ctrl()
731 ret = (long)dgram_pair_ctrl_set_mtu(bio, (uint32_t)num); in dgram_mem_ctrl()
739 ret = (long)dgram_pair_ctrl_eof(bio); in dgram_mem_ctrl()
750 static long dgram_pair_ctrl(BIO *bio, int cmd, long num, void *ptr) in dgram_pair_ctrl() argument
761 ret = (long)dgram_pair_ctrl_make_bio_pair(bio, (BIO *)ptr); in dgram_pair_ctrl()
769 dgram_pair_ctrl_destroy_bio_pair(bio); in dgram_pair_ctrl()
774 ret = (long)dgram_pair_ctrl_get_effective_caps(bio); in dgram_pair_ctrl()
778 ret = dgram_mem_ctrl(bio, cmd, num, ptr); in dgram_pair_ctrl()
874 static ossl_ssize_t dgram_pair_read_actual(BIO *bio, char *buf, size_t sz, in dgram_pair_read_actual() argument
879 struct bio_dgram_pair_st *b = bio->ptr, *readb; in dgram_pair_read_actual()
883 BIO_clear_retry_flags(bio); in dgram_pair_read_actual()
885 if (!bio->init) in dgram_pair_read_actual()
912 BIO_set_retry_read(bio); in dgram_pair_read_actual()
991 static int dgram_pair_read(BIO *bio, char *buf, int sz_) in dgram_pair_read() argument
995 struct bio_dgram_pair_st *b = bio->ptr, *peerb; in dgram_pair_read()
1019 l = dgram_pair_read_actual(bio, buf, (size_t)sz_, NULL, NULL, 0); in dgram_pair_read()
1033 static int dgram_pair_recvmmsg(BIO *bio, BIO_MSG *msg, in dgram_pair_recvmmsg() argument
1042 struct bio_dgram_pair_st *b = bio->ptr, *readb; in dgram_pair_recvmmsg()
1049 if (!bio->init) { in dgram_pair_recvmmsg()
1068 l = dgram_pair_read_actual(bio, m->data, m->data_len, in dgram_pair_recvmmsg()
1093 static int dgram_mem_read(BIO *bio, char *buf, int sz_) in dgram_mem_read() argument
1097 struct bio_dgram_pair_st *b = bio->ptr; in dgram_mem_read()
1109 l = dgram_pair_read_actual(bio, buf, (size_t)sz_, NULL, NULL, 0); in dgram_mem_read()
1200 static ossl_ssize_t dgram_pair_write_actual(BIO *bio, const char *buf, size_t sz, in dgram_pair_write_actual() argument
1206 struct bio_dgram_pair_st *b = bio->ptr, *readb; in dgram_pair_write_actual()
1210 BIO_clear_retry_flags(bio); in dgram_pair_write_actual()
1212 if (!bio->init) in dgram_pair_write_actual()
1246 BIO_set_retry_write(bio); in dgram_pair_write_actual()
1254 static int dgram_pair_write(BIO *bio, const char *buf, int sz_) in dgram_pair_write() argument
1258 struct bio_dgram_pair_st *b = bio->ptr; in dgram_pair_write()
1270 l = dgram_pair_write_actual(bio, buf, (size_t)sz_, NULL, NULL, 0); in dgram_pair_write()
1283 static int dgram_pair_sendmmsg(BIO *bio, BIO_MSG *msg, in dgram_pair_sendmmsg() argument
1290 struct bio_dgram_pair_st *b = bio->ptr; in dgram_pair_sendmmsg()
1305 l = dgram_pair_write_actual(bio, m->data, m->data_len, in dgram_pair_sendmmsg()