diff options
author | Hugo Landau <hlandau@openssl.org> | 2023-10-24 08:43:49 +0100 |
---|---|---|
committer | Hugo Landau <hlandau@openssl.org> | 2023-10-26 15:11:53 +0100 |
commit | 959d47de8b87c6b17117456e7ff842ba15c7fdc4 (patch) | |
tree | ea00e3b5c11827f2b5c4d763d510102c36679b8f | |
parent | 135cd97395f9b3a91cee17bc7c72d1177d9ed396 (diff) |
BIO: Document BIO_sendmmsg and BIO_recvmmsg callbacks
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22487)
(cherry picked from commit e1559fbb53465cdb156d9317869c11a9575461ba)
-rw-r--r-- | doc/man3/BIO_set_callback.pod | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/doc/man3/BIO_set_callback.pod b/doc/man3/BIO_set_callback.pod index b98c0929cb..114e4cfdfa 100644 --- a/doc/man3/BIO_set_callback.pod +++ b/doc/man3/BIO_set_callback.pod @@ -35,6 +35,13 @@ see L<openssl_user_macros(7)>: long BIO_debug_callback(BIO *bio, int cmd, const char *argp, int argi, long argl, long ret); + typedef struct bio_mmsg_cb_args_st { + BIO_MSG *msg; + size_t stride, num_msg; + uint64_t flags; + size_t *msgs_processed; + } BIO_MMSG_CB_ARGS; + =head1 DESCRIPTION BIO_set_callback_ex() and BIO_get_callback_ex() set and retrieve the BIO @@ -218,6 +225,34 @@ Note: B<cmd> == B<BIO_CTRL_SET_CALLBACK> is special, because B<parg> is not the argument of type B<BIO_info_cb> itself. In this case B<parg> is a pointer to the actual call parameter, see B<BIO_callback_ctrl>. +=item B<BIO_sendmmsg(BIO *b, BIO_MSG *msg, size_t stride, size_t num_msg, uint64_t flags, size_t *msgs_processed)> + + callback_ex(b, BIO_CB_SENDMMSG, args, 0, 0, 0, 0, NULL) + +or + + callback(b, BIO_CB_SENDMMSG, args, 0, 0, 0) + +is called before the call and + + callback_ex(b, BIO_CB_SENDMMSG | BIO_CB_RETURN, args, ret, 0, 0, 0, NULL) + +or + + callback(b, BIO_CB_SENDMMSG | BIO_CB_RETURN, args, ret, 0, 0, 0) + +after. + +B<args> is a pointer to a B<BIO_MMSG_CB_ARGS> structure containing the arguments +passed to BIO_sendmmsg(). B<ret> is the return value of the BIO_sendmmsg() call. +The return value of BIO_sendmmsg() is altered to the value returned by the +B<BIO_CB_SENDMMSG | BIO_CB_RETURN> call. + +=item B<BIO_recvmmsg(BIO *b, BIO_MSG *msg, size_t stride, size_t num_msg, uint64_t flags, size_t *msgs_processed)> + +See the documentation for BIO_sendmmsg(). BIO_recvmmsg() works identically +except that B<BIO_CB_RECVMMSG> is used instead of B<BIO_CB_SENDMMSG>. + =back =head1 RETURN VALUES |