QUIC BIO Poll Descriptors: simplify custom interface

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19703)
This commit is contained in:
Hugo Landau 2023-01-09 11:20:08 +00:00
parent 8ccc567ef0
commit 692df8d344
2 changed files with 4 additions and 12 deletions

View File

@ -13,10 +13,7 @@ can be used to determine when a BIO object can next be read or written
int type;
union {
int fd;
union {
void *ptr;
uint64_t u64;
} custom[BIO_POLL_DESCRIPTOR_NUM_CUSTOM];
void *custom;
} value;
} BIO_POLL_DESCRIPTOR;
@ -75,9 +72,8 @@ complete a BIO_write() operation.
Type values beginning with this value (inclusive) are reserved for application
allocation for custom poll descriptor types. The field I<value.custom> in the
B<BIO_POLL_DESCRIPTOR> is an array of length B<BIO_POLL_DESCRIPTOR_NUM_CUSTOM>.
Each entry in this array can store a void pointer or a B<uint64_t> and can be
used by the application arbitrarily.
B<BIO_POLL_DESCRIPTOR> is an opaque pointer which can be used by the application
arbitrarily.
=back

View File

@ -383,16 +383,12 @@ typedef struct bio_mmsg_cb_args_st {
#define BIO_POLL_DESCRIPTOR_TYPE_NONE 0
#define BIO_POLL_DESCRIPTOR_TYPE_SOCK_FD 1
#define BIO_POLL_DESCRIPTOR_CUSTOM_START 8192
#define BIO_POLL_DESCRIPTOR_NUM_CUSTOM 4
typedef struct bio_poll_descriptor_st {
int type;
union {
int fd;
union {
void *ptr;
uint64_t u64;
} custom[BIO_POLL_DESCRIPTOR_NUM_CUSTOM];
void *custom;
} value;
} BIO_POLL_DESCRIPTOR;