NAME
BIO_set_callback, BIO_get_callback, BIO_set_callback_arg, BIO_get_callback_arg, BIO_debug_callback — BIO callback functionsSYNOPSIS
#include <openssl/bio.h>#define BIO_get_callback(b) ((b)->callback)
#define BIO_set_callback_arg(b,arg) ((b)->cb_arg=(char *)(arg))
#define BIO_get_callback_arg(b) ((b)->cb_arg)
BIO_debug_callback(BIO *bio, int cmd, const char *argp, int argi, long argl, long ret);
callback(BIO *b, int oper, const char *argp, int argi, long argl, long retvalue);
DESCRIPTION
BIO_set_callback() and BIO_get_callback() set and retrieve the BIO callback, they are both macros. The callback is called during most high level BIO operations. It can be used for debugging purposes to trace operations on a BIO or to modify its operation.Callback operations
- BIO_free(b)
- callback(b, BIO_CB_FREE, NULL, 0L, 0L, 1L) is called before the free operation.
- BIO_read(b, out, outl)
- callback(b, BIO_CB_READ, out, outl, 0L, 1L) is called before the read and callback(b, BIO_CB_READ|BIO_CB_RETURN, out, outl, 0L, retvalue) after.
- BIO_write(b, in, inl)
- callback(b, BIO_CB_WRITE, in, inl, 0L, 1L) is called before the write and callback(b, BIO_CB_WRITE|BIO_CB_RETURN, in, inl, 0L, retvalue) after.
- BIO_gets(b, out, outl)
- callback(b, BIO_CB_GETS, out, outl, 0L, 1L) is called before the operation and callback(b, BIO_CB_GETS|BIO_CB_RETURN, out, outl, 0L, retvalue) after.
- BIO_puts(b, in)
- callback(b, BIO_CB_WRITE, in, 0, 0L, 1L) is called before the operation and callback(b, BIO_CB_WRITE|BIO_CB_RETURN, in, 0, 0L, retvalue) after.
- BIO_ctrl(b, cmd, larg, parg)
- callback(b, BIO_CB_CTRL, parg, cmd, larg, 1L) is called before the call and callback(b, BIO_CB_CTRL|BIO_CB_RETURN, parg, cmd, larg, ret) after.