5 BIO_set_data, BIO_get_data, BIO_set_init, BIO_get_init, BIO_set_shutdown,
6 BIO_get_shutdown - functions for managing BIO state information
10 #include <openssl/bio.h>
12 void BIO_set_data(BIO *a, void *ptr);
13 void *BIO_get_data(BIO *a);
14 void BIO_set_init(BIO *a, int init);
15 int BIO_get_init(BIO *a);
16 void BIO_set_shutdown(BIO *a, int shut);
17 int BIO_get_shutdown(BIO *a);
21 These functions are mainly useful when implementing a custom BIO.
23 The BIO_set_data() function associates the custom data pointed to by B<ptr> with
24 the BIO. This data can subsequently be retrieved via a call to BIO_get_data().
25 This can be used by custom BIOs for storing implementation specific information.
27 The BIO_set_init() function sets the value of the BIO's "init" flag to indicate
28 whether initialisation has been completed for this BIO or not. A non-zero value
29 indicates that initialisation is complete, whilst zero indicates that it is not.
30 Often initialisation will complete during initial construction of the BIO. For
31 some BIOs however, initialisation may not complete until after additional steps
32 have occurred (for example through calling custom ctrls). The BIO_get_init()
33 function returns the value of the "init" flag.
35 The BIO_set_shutdown() and BIO_get_shutdown() functions set and get the state of
36 this BIO's shutdown (i.e. BIO_CLOSE) flag. If set then the underlying resource
37 is also closed when the BIO is freed.
41 BIO_get_data() returns a pointer to the implementation specific custom data
42 associated with this BIO, or NULL if none has been set.
44 BIO_get_init() returns the state of the BIO's init flag.
46 BIO_get_shutdown() returns the stat of the BIO's shutdown (i.e. BIO_CLOSE) flag.
50 L<bio>, L<BIO_meth_new>
54 The functions described here were added in OpenSSL version 1.1.0.
58 Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
60 Licensed under the OpenSSL license (the "License"). You may not use
61 this file except in compliance with the License. You can obtain a copy
62 in the file LICENSE in the source distribution or at
63 L<https://www.openssl.org/source/license.html>.