Lines Matching refs:data

56 static int conn_free(BIO *data);
64 static void conn_close_socket(BIO *data);
348 BIO_CONNECT *data; in conn_free() local
352 data = (BIO_CONNECT *)a->ptr; in conn_free()
354 BIO_free(data->dgram_bio); in conn_free()
358 BIO_CONNECT_free(data); in conn_free()
369 BIO_CONNECT *data; in conn_read() local
371 data = (BIO_CONNECT *)b->ptr; in conn_read()
372 if (data->state != BIO_CONN_S_OK) { in conn_read()
373 ret = conn_state(b, data); in conn_read()
378 if (data->dgram_bio != NULL) { in conn_read()
380 ret = BIO_read(data->dgram_bio, out, outl); in conn_read()
381 BIO_set_flags(b, BIO_get_retry_flags(data->dgram_bio)); in conn_read()
407 BIO_CONNECT *data; in conn_write() local
409 data = (BIO_CONNECT *)b->ptr; in conn_write()
410 if (data->state != BIO_CONN_S_OK) { in conn_write()
411 ret = conn_state(b, data); in conn_write()
416 if (data->dgram_bio != NULL) { in conn_write()
418 ret = BIO_write(data->dgram_bio, in, inl); in conn_write()
419 BIO_set_flags(b, BIO_get_retry_flags(data->dgram_bio)); in conn_write()
426 ret = ktls_send_ctrl_message(b->num, data->record_type, in, inl); in conn_write()
434 if (data->tfo_first) { in conn_write()
435 int peerlen = BIO_ADDRINFO_sockaddr_size(data->addr_iter); in conn_write()
438 BIO_ADDRINFO_sockaddr(data->addr_iter), peerlen); in conn_write()
439 data->tfo_first = 0; in conn_write()
457 BIO_CONNECT *data; in conn_ctrl() local
463 data = (BIO_CONNECT *)b->ptr; in conn_ctrl()
468 data->state = BIO_CONN_S_BEFORE; in conn_ctrl()
470 BIO_ADDRINFO_free(data->addr_first); in conn_ctrl()
471 data->addr_first = NULL; in conn_ctrl()
476 if (data->state != BIO_CONN_S_OK) in conn_ctrl()
477 ret = (long)conn_state(b, data); in conn_ctrl()
485 *pptr = data->param_hostname; in conn_ctrl()
487 *pptr = data->param_service; in conn_ctrl()
489 *pptr = (const char *)BIO_ADDRINFO_address(data->addr_iter); in conn_ctrl()
491 switch (BIO_ADDRINFO_family(data->addr_iter)) { in conn_ctrl()
501 ret = data->connect_family; in conn_ctrl()
508 ret = data->connect_mode; in conn_ctrl()
520 char *hold_service = data->param_service; in conn_ctrl()
526 OPENSSL_free(data->param_hostname); in conn_ctrl()
527 data->param_hostname = NULL; in conn_ctrl()
529 &data->param_hostname, in conn_ctrl()
530 &data->param_service, in conn_ctrl()
532 if (hold_service != data->param_service) in conn_ctrl()
535 OPENSSL_free(data->param_service); in conn_ctrl()
536 if ((data->param_service = OPENSSL_strdup(ptr)) == NULL) in conn_ctrl()
545 OPENSSL_free(data->param_hostname); in conn_ctrl()
546 data->param_hostname = host; in conn_ctrl()
547 OPENSSL_free(data->param_service); in conn_ctrl()
548 data->param_service = service; in conn_ctrl()
549 BIO_ADDRINFO_free(data->addr_first); in conn_ctrl()
550 data->addr_first = NULL; in conn_ctrl()
551 data->addr_iter = NULL; in conn_ctrl()
557 data->connect_family = *(int *)ptr; in conn_ctrl()
565 || data->state >= BIO_CONN_S_GET_ADDR) { in conn_ctrl()
570 data->connect_sock_type = (int)num; in conn_ctrl()
574 ret = data->connect_sock_type; in conn_ctrl()
577 if (data->dgram_bio != NULL) { in conn_ctrl()
578 *(BIO **)ptr = data->dgram_bio; in conn_ctrl()
586 if (data->state != BIO_CONN_S_OK) in conn_ctrl()
587 conn_state(b, data); /* best effort */ in conn_ctrl()
589 if (data->state >= BIO_CONN_S_CREATE_SOCKET in conn_ctrl()
590 && data->addr_iter != NULL in conn_ctrl()
591 && (dg_addr = BIO_ADDRINFO_address(data->addr_iter)) != NULL) { in conn_ctrl()
609 if (data->state != BIO_CONN_S_OK) in conn_ctrl()
610 conn_state(b, data); /* best effort */ in conn_ctrl()
612 if (data->state >= BIO_CONN_S_CREATE_SOCKET) { in conn_ctrl()
622 data->connect_mode |= BIO_SOCK_NONBLOCK; in conn_ctrl()
624 data->connect_mode &= ~BIO_SOCK_NONBLOCK; in conn_ctrl()
626 if (data->dgram_bio != NULL) in conn_ctrl()
627 ret = BIO_set_nbio(data->dgram_bio, num); in conn_ctrl()
633 data->connect_mode |= BIO_SOCK_TFO; in conn_ctrl()
634 data->tfo_first = 1; in conn_ctrl()
636 data->connect_mode &= ~BIO_SOCK_TFO; in conn_ctrl()
637 data->tfo_first = 0; in conn_ctrl()
642 data->connect_mode = (int)num; in conn_ctrl()
644 data->tfo_first = 1; in conn_ctrl()
646 data->tfo_first = 0; in conn_ctrl()
672 if (data->param_hostname) in conn_ctrl()
673 BIO_set_conn_hostname(dbio, data->param_hostname); in conn_ctrl()
674 if (data->param_service) in conn_ctrl()
675 BIO_set_conn_port(dbio, data->param_service); in conn_ctrl()
676 BIO_set_conn_ip_family(dbio, data->connect_family); in conn_ctrl()
677 BIO_set_conn_mode(dbio, data->connect_mode); in conn_ctrl()
682 (void)BIO_set_info_callback(dbio, data->info_callback); in conn_ctrl()
693 *fptr = data->info_callback; in conn_ctrl()
712 data->record_type = num; in conn_ctrl()
735 BIO_CONNECT *data; in conn_callback_ctrl() local
737 data = (BIO_CONNECT *)b->ptr; in conn_callback_ctrl()
742 data->info_callback = fp; in conn_callback_ctrl()
763 BIO_CONNECT *data; in conn_gets() local
781 data = (BIO_CONNECT *)bio->ptr; in conn_gets()
782 if (data->state != BIO_CONN_S_OK) { in conn_gets()
783 ret = conn_state(bio, data); in conn_gets()
788 if (data->dgram_bio != NULL) { in conn_gets()
820 BIO_CONNECT *data; in conn_sendmmsg() local
828 data = (BIO_CONNECT *)bio->ptr; in conn_sendmmsg()
829 if (data->state != BIO_CONN_S_OK) { in conn_sendmmsg()
830 ret = conn_state(bio, data); in conn_sendmmsg()
837 if (data->dgram_bio == NULL) { in conn_sendmmsg()
843 return BIO_sendmmsg(data->dgram_bio, msg, stride, num_msgs, in conn_sendmmsg()
851 BIO_CONNECT *data; in conn_recvmmsg() local
859 data = (BIO_CONNECT *)bio->ptr; in conn_recvmmsg()
860 if (data->state != BIO_CONN_S_OK) { in conn_recvmmsg()
861 ret = conn_state(bio, data); in conn_recvmmsg()
868 if (data->dgram_bio == NULL) { in conn_recvmmsg()
874 return BIO_recvmmsg(data->dgram_bio, msg, stride, num_msgs, in conn_recvmmsg()