=head1 NAME
-SSL_get_rpoll_descriptor, SSL_get_wpoll_descriptor, SSL_want_net_read,
-SSL_want_net_write - obtain information which can be used to determine when
+SSL_get_rpoll_descriptor, SSL_get_wpoll_descriptor, SSL_net_read_desired,
+SSL_net_write_desired - obtain information which can be used to determine when
network I/O can be performed
=head1 SYNOPSIS
int SSL_get_rpoll_descriptor(SSL *s, BIO_POLL_DESCRIPTOR *desc);
int SSL_get_wpoll_descriptor(SSL *s, BIO_POLL_DESCRIPTOR *desc);
- int SSL_want_net_read(SSL *s);
- int SSL_want_net_write(SSL *s);
+ int SSL_net_read_desired(SSL *s);
+ int SSL_net_write_desired(SSL *s);
=head1 DESCRIPTION
On success, these functions output poll descriptors. For more information on
poll descriptors, see L<BIO_get_rpoll_descriptor(3)>.
-The functions SSL_want_net_read() and SSL_want_net_write() return 1 or 0
+The functions SSL_net_read_desired() and SSL_net_write_desired() return 1 or 0
depending on whether the SSL object is currently interested in receiving data
from the network and/or writing data to the network respectively.
If an SSL object is not interested in reading data from the network at the
-current time, SSL_want_net_read() will return 0; likewise, if an SSL object is
+current time, SSL_net_read_desired() will return 0; likewise, if an SSL object is
not interested in writing data to the network at the current time,
-SSL_want_net_write() will return 0.
+SSL_net_write_desired() will return 0.
The intention is that an application using QUIC in nonblocking mode can use
these calls, in conjunction with L<SSL_get_tick_timeout(3)> to wait for network
=item *
-If the last call to SSL_want_net_read() returned 1, SSL_tick() should be called
+If the last call to SSL_net_read_desired() returned 1, SSL_tick() should be called
whenever the poll descriptor output by SSL_get_rpoll_descriptor() becomes
readable.
=item *
-If the last call to SSL_want_net_write() returned 1, SSL_tick() should be called
+If the last call to SSL_net_write_desired() returned 1, SSL_tick() should be called
whenever the poll descriptor output by SSL_get_wpoll_descriptor() becomes
writable.
=back
-The return values of the SSL_want_net_read() and SSL_want_net_write() functions
+The return values of the SSL_net_read_desired() and SSL_net_write_desired() functions
may change in response to any call to the SSL object other than
-SSL_want_net_read(), SSL_want_net_write(), SSL_get_rpoll_descriptor(),
+SSL_net_read_desired(), SSL_net_write_desired(), SSL_get_rpoll_descriptor(),
SSL_get_wpoll_descriptor() and SSL_get_tick_timeout().
These functions are not supported on non-QUIC SSL objects.
=head1 HISTORY
-The SSL_get_rpoll_descriptor(), SSL_get_wpoll_descriptor(), SSL_want_net_read()
-and SSL_want_net_write() functions were added in OpenSSL 3.2.
+The SSL_get_rpoll_descriptor(), SSL_get_wpoll_descriptor(), SSL_net_read_desired()
+and SSL_net_write_desired() functions were added in OpenSSL 3.2.
=head1 COPYRIGHT
* the reactor interface.
*/
typedef struct quic_tick_result_st {
- char want_net_read;
- char want_net_write;
+ char net_read_desired;
+ char net_write_desired;
OSSL_TIME tick_deadline;
} QUIC_TICK_RESULT;
* These are true if we would like to know when we can read or write from
* the network respectively.
*/
- unsigned int want_net_read : 1;
- unsigned int want_net_write : 1;
+ unsigned int net_read_desired : 1;
+ unsigned int net_write_desired : 1;
} QUIC_REACTOR;
void ossl_quic_reactor_init(QUIC_REACTOR *rtor,
const BIO_POLL_DESCRIPTOR *ossl_quic_reactor_get_poll_w(QUIC_REACTOR *rtor);
-int ossl_quic_reactor_want_net_read(QUIC_REACTOR *rtor);
+int ossl_quic_reactor_net_read_desired(QUIC_REACTOR *rtor);
-int ossl_quic_reactor_want_net_write(QUIC_REACTOR *rtor);
+int ossl_quic_reactor_net_write_desired(QUIC_REACTOR *rtor);
OSSL_TIME ossl_quic_reactor_get_tick_deadline(QUIC_REACTOR *rtor);
__owur int ossl_quic_get_tick_timeout(QUIC_CONNECTION *qc, struct timeval *tv);
__owur int ossl_quic_get_rpoll_descriptor(QUIC_CONNECTION *qc, BIO_POLL_DESCRIPTOR *d);
__owur int ossl_quic_get_wpoll_descriptor(QUIC_CONNECTION *qc, BIO_POLL_DESCRIPTOR *d);
-__owur int ossl_quic_get_want_net_read(QUIC_CONNECTION *qc);
-__owur int ossl_quic_get_want_net_write(QUIC_CONNECTION *qc);
+__owur int ossl_quic_get_net_read_desired(QUIC_CONNECTION *qc);
+__owur int ossl_quic_get_net_write_desired(QUIC_CONNECTION *qc);
__owur int ossl_quic_get_error(const QUIC_CONNECTION *qc, int i);
__owur int ossl_quic_conn_get_blocking_mode(const QUIC_CONNECTION *qc);
__owur int ossl_quic_conn_set_blocking_mode(QUIC_CONNECTION *qc, int blocking);
__owur int SSL_get_tick_timeout(SSL *s, struct timeval *tv);
__owur int SSL_get_rpoll_descriptor(SSL *s, BIO_POLL_DESCRIPTOR *desc);
__owur int SSL_get_wpoll_descriptor(SSL *s, BIO_POLL_DESCRIPTOR *desc);
-__owur int SSL_want_net_read(SSL *s);
-__owur int SSL_want_net_write(SSL *s);
+__owur int SSL_net_read_desired(SSL *s);
+__owur int SSL_net_write_desired(SSL *s);
__owur int SSL_set_blocking_mode(SSL *s, int blocking);
__owur int SSL_get_blocking_mode(SSL *s);
__owur int SSL_set_initial_peer_addr(SSL *s, const BIO_ADDR *peer_addr);
/* If we are in the TERMINATED state, there is nothing to do. */
if (ossl_quic_channel_is_terminated(ch)) {
- res->want_net_read = 0;
- res->want_net_write = 0;
- res->tick_deadline = ossl_time_infinite();
+ res->net_read_desired = 0;
+ res->net_write_desired = 0;
+ res->tick_deadline = ossl_time_infinite();
return;
}
if (ossl_time_compare(now, ch->terminate_deadline) >= 0) {
ch_on_terminating_timeout(ch);
- res->want_net_read = 0;
- res->want_net_write = 0;
- res->tick_deadline = ossl_time_infinite();
+ res->net_read_desired = 0;
+ res->net_write_desired = 0;
+ res->tick_deadline = ossl_time_infinite();
return; /* abort normal processing, nothing to do */
}
}
* send a CONN_CLOSE frame; go straight to TERMINATED.
*/
ch_on_idle_timeout(ch);
- res->want_net_read = 0;
- res->want_net_write = 0;
- res->tick_deadline = ossl_time_infinite();
+ res->net_read_desired = 0;
+ res->net_write_desired = 0;
+ res->tick_deadline = ossl_time_infinite();
return;
}
* errors in ch_rx_pre() or ch_tx() may have caused us to transition to the
* Terminated state.
*/
- res->want_net_read = !ossl_quic_channel_is_terminated(ch);
+ res->net_read_desired = !ossl_quic_channel_is_terminated(ch);
/* We want to write to the network if we have any in our queue. */
- res->want_net_write
+ res->net_write_desired
= (!ossl_quic_channel_is_terminated(ch)
&& ossl_qtx_get_queue_len_datagrams(ch->qtx) > 0);
}
return BIO_get_wpoll_descriptor(qc->net_wbio, desc);
}
-/* SSL_want_net_read */
-int ossl_quic_get_want_net_read(QUIC_CONNECTION *qc)
+/* SSL_net_read_desired */
+int ossl_quic_get_net_read_desired(QUIC_CONNECTION *qc)
{
if (qc->ch == NULL)
return 0;
- return ossl_quic_reactor_want_net_read(ossl_quic_channel_get_reactor(qc->ch));
+ return ossl_quic_reactor_net_read_desired(ossl_quic_channel_get_reactor(qc->ch));
}
-/* SSL_want_net_write */
-int ossl_quic_get_want_net_write(QUIC_CONNECTION *qc)
+/* SSL_net_write_desired */
+int ossl_quic_get_net_write_desired(QUIC_CONNECTION *qc)
{
if (qc->ch == NULL)
return 0;
- return ossl_quic_reactor_want_net_write(ossl_quic_channel_get_reactor(qc->ch));
+ return ossl_quic_reactor_net_write_desired(ossl_quic_channel_get_reactor(qc->ch));
}
/*
{
rtor->poll_r.type = BIO_POLL_DESCRIPTOR_TYPE_NONE;
rtor->poll_w.type = BIO_POLL_DESCRIPTOR_TYPE_NONE;
- rtor->want_net_read = 0;
- rtor->want_net_write = 0;
+ rtor->net_read_desired = 0;
+ rtor->net_write_desired = 0;
rtor->tick_deadline = initial_tick_deadline;
rtor->tick_cb = tick_cb;
return &rtor->poll_w;
}
-int ossl_quic_reactor_want_net_read(QUIC_REACTOR *rtor)
+int ossl_quic_reactor_net_read_desired(QUIC_REACTOR *rtor)
{
- return rtor->want_net_read;
+ return rtor->net_read_desired;
}
-int ossl_quic_reactor_want_net_write(QUIC_REACTOR *rtor)
+int ossl_quic_reactor_net_write_desired(QUIC_REACTOR *rtor)
{
- return rtor->want_net_write;
+ return rtor->net_write_desired;
}
OSSL_TIME ossl_quic_reactor_get_tick_deadline(QUIC_REACTOR *rtor)
*/
rtor->tick_cb(&res, rtor->tick_cb_arg);
- rtor->want_net_read = res.want_net_read;
- rtor->want_net_write = res.want_net_write;
+ rtor->net_read_desired = res.net_read_desired;
+ rtor->net_write_desired = res.net_write_desired;
rtor->tick_deadline = res.tick_deadline;
return 1;
}
return res;
if (!poll_two_descriptors(ossl_quic_reactor_get_poll_r(rtor),
- ossl_quic_reactor_want_net_read(rtor),
+ ossl_quic_reactor_net_read_desired(rtor),
ossl_quic_reactor_get_poll_w(rtor),
- ossl_quic_reactor_want_net_write(rtor),
+ ossl_quic_reactor_net_write_desired(rtor),
ossl_quic_reactor_get_tick_deadline(rtor)))
/*
* We don't actually care why the call succeeded (timeout, FD
#endif
}
-int SSL_want_net_read(SSL *s)
+int SSL_net_read_desired(SSL *s)
{
#ifndef OPENSSL_NO_QUIC
QUIC_CONNECTION *qc = QUIC_CONNECTION_FROM_SSL(s);
if (qc == NULL)
return 0;
- return ossl_quic_get_want_net_read(qc);
+ return ossl_quic_get_net_read_desired(qc);
#else
return 0;
#endif
}
-int SSL_want_net_write(SSL *s)
+int SSL_net_write_desired(SSL *s)
{
#ifndef OPENSSL_NO_QUIC
QUIC_CONNECTION *qc = QUIC_CONNECTION_FROM_SSL(s);
if (qc == NULL)
return 0;
- return ossl_quic_get_want_net_write(qc);
+ return ossl_quic_get_net_write_desired(qc);
#else
return 0;
#endif
SSL_get_tick_timeout ? 3_2_0 EXIST::FUNCTION:
SSL_get_rpoll_descriptor ? 3_2_0 EXIST::FUNCTION:
SSL_get_wpoll_descriptor ? 3_2_0 EXIST::FUNCTION:
-SSL_want_net_read ? 3_2_0 EXIST::FUNCTION:
-SSL_want_net_write ? 3_2_0 EXIST::FUNCTION:
SSL_set_blocking_mode ? 3_2_0 EXIST::FUNCTION:
SSL_get_blocking_mode ? 3_2_0 EXIST::FUNCTION:
SSL_set_initial_peer_addr ? 3_2_0 EXIST::FUNCTION:
+SSL_net_read_desired ? 3_2_0 EXIST::FUNCTION:
+SSL_net_write_desired ? 3_2_0 EXIST::FUNCTION: