summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorTomas Mraz <tomas@openssl.org>2023-01-09 18:39:50 +0100
committerTomas Mraz <tomas@openssl.org>2023-01-27 16:11:38 +0100
commit3a857b9532169b1ffaa739ba29cd67a5d93cbe8a (patch)
treec335a84a2b4a7f99c35a6e8b78ecdc2fe2f15558 /doc
parent6e193d4d03f6c7bdf95e82e226c5fccbd67562f2 (diff)
downloadopenssl-new-3a857b9532169b1ffaa739ba29cd67a5d93cbe8a.tar.gz
Implement BIO_s_dgram_mem() reusing the BIO_s_dgram_pair() code
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> (Merged from https://github.com/openssl/openssl/pull/20012)
Diffstat (limited to 'doc')
-rw-r--r--doc/man3/BIO_s_mem.pod16
1 files changed, 13 insertions, 3 deletions
diff --git a/doc/man3/BIO_s_mem.pod b/doc/man3/BIO_s_mem.pod
index 95dd91b034..041c2f9aad 100644
--- a/doc/man3/BIO_s_mem.pod
+++ b/doc/man3/BIO_s_mem.pod
@@ -52,7 +52,11 @@ Any data written to a memory BIO can be recalled by reading from it.
Unless the memory BIO is read only any data read from it is deleted from
the BIO.
-Memory BIOs support BIO_gets() and BIO_puts().
+Memory BIOs except BIO_s_dgram_mem() support BIO_gets() and BIO_puts().
+
+BIO_s_dgram_mem() supports L<BIO_sendmmsg(3)> and L<BIO_recvmmsg(3)> calls
+and calls related to B<BIO_ADDR> and MTU handling similarly to the
+L<BIO_s_dgram_pair(3)>.
If the BIO_CLOSE flag is set when a memory BIO is freed then the underlying
BUF_MEM structure is also freed.
@@ -93,10 +97,16 @@ made available from a static area of memory in the form of a BIO. The
supplied data is read directly from the supplied buffer: it is B<not> copied
first, so the supplied area of memory must be unchanged until the BIO is freed.
+All of the five functions described above return an error with
+BIO_s_dgram_mem().
+
=head1 NOTES
Writes to memory BIOs will always succeed if memory is available: that is
-their size can grow indefinitely.
+their size can grow indefinitely. An exception is BIO_s_dgram_mem() when
+L<BIO_set_write_buf_size(3)> is called on it. In such case the write buffer
+size will be fixed and any writes that would overflow the buffer will return
+an error.
Every write after partial read (not all data in the memory buffer was read)
to a read write memory BIO will have to move the unread data with an internal
@@ -169,7 +179,7 @@ Extract the BUF_MEM structure from a memory BIO and then free up the BIO:
=head1 COPYRIGHT
-Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved.
+Copyright 2000-2022 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use
this file except in compliance with the License. You can obtain a copy