1*b077aed3SPierre Pronchery=pod 2*b077aed3SPierre Pronchery 3*b077aed3SPierre Pronchery=head1 NAME 4*b077aed3SPierre Pronchery 5*b077aed3SPierre ProncheryBIO_f_readbuffer 6*b077aed3SPierre Pronchery- read only buffering BIO that supports BIO_tell() and BIO_seek() 7*b077aed3SPierre Pronchery 8*b077aed3SPierre Pronchery=head1 SYNOPSIS 9*b077aed3SPierre Pronchery 10*b077aed3SPierre Pronchery #include <openssl/bio.h> 11*b077aed3SPierre Pronchery 12*b077aed3SPierre Pronchery const BIO_METHOD *BIO_f_readbuffer(void); 13*b077aed3SPierre Pronchery 14*b077aed3SPierre Pronchery=head1 DESCRIPTION 15*b077aed3SPierre Pronchery 16*b077aed3SPierre ProncheryBIO_f_readbuffer() returns the read buffering BIO method. 17*b077aed3SPierre Pronchery 18*b077aed3SPierre ProncheryThis BIO filter can be inserted on top of BIO's that do not support BIO_tell() 19*b077aed3SPierre Proncheryor BIO_seek() (e.g. A file BIO that uses stdin). 20*b077aed3SPierre Pronchery 21*b077aed3SPierre ProncheryData read from a read buffering BIO comes from an internal buffer which is 22*b077aed3SPierre Proncheryfilled from the next BIO in the chain. 23*b077aed3SPierre Pronchery 24*b077aed3SPierre ProncheryBIO_gets() is supported for read buffering BIOs. 25*b077aed3SPierre ProncheryWriting data to a read buffering BIO is not supported. 26*b077aed3SPierre Pronchery 27*b077aed3SPierre ProncheryCalling BIO_reset() on a read buffering BIO does not clear any buffered data. 28*b077aed3SPierre Pronchery 29*b077aed3SPierre Pronchery=head1 NOTES 30*b077aed3SPierre Pronchery 31*b077aed3SPierre ProncheryRead buffering BIOs implement BIO_read_ex() by using BIO_read_ex() operations 32*b077aed3SPierre Proncheryon the next BIO (e.g. a file BIO) in the chain and storing the result in an 33*b077aed3SPierre Proncheryinternal buffer, from which bytes are given back to the caller as appropriate 34*b077aed3SPierre Proncheryfor the call. BIO_read_ex() is guaranteed to give the caller the number of bytes 35*b077aed3SPierre Proncheryit asks for, unless there's an error or end of communication is reached in the 36*b077aed3SPierre Proncherynext BIO. The internal buffer can grow to cache the entire contents of the next 37*b077aed3SPierre ProncheryBIO in the chain. BIO_seek() uses the internal buffer, so that it can only seek 38*b077aed3SPierre Proncheryinto data that is already read. 39*b077aed3SPierre Pronchery 40*b077aed3SPierre Pronchery=head1 RETURN VALUES 41*b077aed3SPierre Pronchery 42*b077aed3SPierre ProncheryBIO_f_readbuffer() returns the read buffering BIO method. 43*b077aed3SPierre Pronchery 44*b077aed3SPierre Pronchery=head1 SEE ALSO 45*b077aed3SPierre Pronchery 46*b077aed3SPierre ProncheryL<bio(7)>, 47*b077aed3SPierre ProncheryL<BIO_read(3)>, 48*b077aed3SPierre ProncheryL<BIO_gets(3)>, 49*b077aed3SPierre ProncheryL<BIO_reset(3)>, 50*b077aed3SPierre ProncheryL<BIO_ctrl(3)>. 51*b077aed3SPierre Pronchery 52*b077aed3SPierre Pronchery=head1 COPYRIGHT 53*b077aed3SPierre Pronchery 54*b077aed3SPierre ProncheryCopyright 2021 The OpenSSL Project Authors. All Rights Reserved. 55*b077aed3SPierre Pronchery 56*b077aed3SPierre ProncheryLicensed under the Apache License 2.0 (the "License"). You may not use 57*b077aed3SPierre Proncherythis file except in compliance with the License. You can obtain a copy 58*b077aed3SPierre Proncheryin the file LICENSE in the source distribution or at 59*b077aed3SPierre ProncheryL<https://www.openssl.org/source/license.html>. 60*b077aed3SPierre Pronchery 61*b077aed3SPierre Pronchery=cut 62