SM4: Add SM4 block cipher to EVP
[openssl.git] / doc / man3 / BIO_set_callback.pod
index 6e5656fb7323b40e3e33958709f5a3bb44e88501..c6a626770b500a25c9911fb725a14ea004139ed7 100644 (file)
@@ -3,7 +3,8 @@
 =head1 NAME
 
 BIO_set_callback_ex, BIO_get_callback_ex, BIO_set_callback, BIO_get_callback,
-BIO_set_callback_arg, BIO_get_callback_arg, BIO_debug_callback
+BIO_set_callback_arg, BIO_get_callback_arg, BIO_debug_callback,
+BIO_callback_fn_ex, BIO_callback_fn
 - BIO callback functions
 
 =head1 SYNOPSIS
@@ -19,8 +20,8 @@ BIO_set_callback_arg, BIO_get_callback_arg, BIO_debug_callback
  void BIO_set_callback_ex(BIO *b, BIO_callback_fn_ex callback);
  BIO_callback_fn_ex BIO_get_callback_ex(const BIO *b);
 
- void BIO_set_callback(BIO *b, BIO_callack_fn cb);
- BIO_callack_fn BIO_get_callback(BIO *b);
+ void BIO_set_callback(BIO *b, BIO_callback_fn cb);
+ BIO_callback_fn BIO_get_callback(BIO *b);
  void BIO_set_callback_arg(BIO *b, char *arg);
  char *BIO_get_callback_arg(const BIO *b);
 
@@ -36,7 +37,7 @@ operation.
 
 BIO_set_callback() and BIO_get_callback() set and retrieve the old format BIO
 callback. New code should not use these functions, but they are retained for
-backwards compatbility. Any callback set via BIO_set_callback_ex() will get
+backwards compatibility. Any callback set via BIO_set_callback_ex() will get
 called in preference to any set by BIO_set_callback().
 
 BIO_set_callback_arg() and BIO_get_callback_arg() are macros which can be
@@ -51,7 +52,7 @@ BIO_callback_fn_ex() is the type of the callback function and BIO_callback_fn()
 is the type of the old format callback function. The meaning of each argument
 is described below:
 
-=over
+=over 4
 
 =item B<b>
 
@@ -76,7 +77,7 @@ the value of B<oper>, that is the operation being performed.
 =item B<processed>
 
 B<processed> is a pointer to a location which will be updated with the amount of
-data that was actually read or written. Only used for BIO_CB_READ, BIO_CB_WRITE, 
+data that was actually read or written. Only used for BIO_CB_READ, BIO_CB_WRITE,
 BIO_CB_GETS and BIO_CB_PUTS.
 
 =item B<ret>
@@ -111,75 +112,78 @@ or
 
 is called before the free operation.
 
-=item B<BIO_read_ex(b, out, outl, read)>
+=item B<BIO_read_ex(b, data, dlen, readbytes)>
 
- callback_ex(b, BIO_CB_READ, out, outl, 0, 0L, 1L, read)
+ callback_ex(b, BIO_CB_READ, data, dlen, 0, 0L, 1L, readbytes)
 
 or
 
- callback(b, BIO_CB_READ, out, outl, 0L, 1L)
+ callback(b, BIO_CB_READ, data, dlen, 0L, 1L)
+
 is called before the read and
 
- callback_ex(b, BIO_CB_READ | BIO_CB_RETURN, out, outl, 0, 0L, retvalue, read)
+ callback_ex(b, BIO_CB_READ | BIO_CB_RETURN, data, dlen, 0, 0L, retvalue,
+             readbytes)
 
 or
 
- callback(b, BIO_CB_READ|BIO_CB_RETURN, out, outl, 0L, retvalue)
+ callback(b, BIO_CB_READ|BIO_CB_RETURN, data, dlen, 0L, retvalue)
 
 after.
 
-=item B<BIO_write(b, in, inl, written)>
+=item B<BIO_write(b, data, dlen, written)>
 
- callback_ex(b, BIO_CB_WRITE, in, inl, 0, 0L, 1L, written)
+ callback_ex(b, BIO_CB_WRITE, data, dlen, 0, 0L, 1L, written)
 
 or
 
- callback(b, BIO_CB_WRITE, in, inl, 0L, 1L)
+ callback(b, BIO_CB_WRITE, datat, dlen, 0L, 1L)
 
 is called before the write and
 
- callback_ex(b, BIO_CB_WRITE | BIO_CB_RETURN, in, inl, 0, 0L, retvalue, written)
+ callback_ex(b, BIO_CB_WRITE | BIO_CB_RETURN, data, dlen, 0, 0L, retvalue,
+             written)
 
 or
 
- callback(b, BIO_CB_WRITE|BIO_CB_RETURN, in, inl, 0L, retvalue)
+ callback(b, BIO_CB_WRITE|BIO_CB_RETURN, data, dlen, 0L, retvalue)
 
 after.
 
-=item B<BIO_gets(b, out, outl)>
+=item B<BIO_gets(b, buf, size)>
 
- callback_ex(b, BIO_CB_GETS, out, outl, 0, 0L, 1, NULL, NULL)
+ callback_ex(b, BIO_CB_GETS, buf, size, 0, 0L, 1, NULL, NULL)
 
 or
 
- callback(b, BIO_CB_GETS, out, outl, 0L, 1L)
+ callback(b, BIO_CB_GETS, buf, size, 0L, 1L)
 
 is called before the operation and
 
- callback_ex(b, BIO_CB_GETS | BIO_CB_RETURN, out, outl, 0, 0L, retvalue, read)
+ callback_ex(b, BIO_CB_GETS | BIO_CB_RETURN, buf, size, 0, 0L, retvalue,
+             readbytes)
 
 or
 
- callback(b, BIO_CB_GETS|BIO_CB_RETURN, out, outl, 0L, retvalue)
+ callback(b, BIO_CB_GETS|BIO_CB_RETURN, buf, size, 0L, retvalue)
 
 after.
 
-=item B<BIO_puts(b, in)>
+=item B<BIO_puts(b, buf)>
 
- callback_ex(b, BIO_CB_PUTS, in, 0, 0, 0L, 1L, NULL);
+ callback_ex(b, BIO_CB_PUTS, buf, 0, 0, 0L, 1L, NULL);
 
 or
 
- callback(b, BIO_CB_PUTS, in, 0, 0L, 1L)
+ callback(b, BIO_CB_PUTS, buf, 0, 0L, 1L)
 
 is called before the operation and
 
- callback_ex(b, BIO_CB_PUTS | BIO_CB_RETURN, in, 0, 0, 0L, retvalue, written)
+ callback_ex(b, BIO_CB_PUTS | BIO_CB_RETURN, buf, 0, 0, 0L, retvalue, written)
 
 or
 
- callback(b, BIO_CB_WRITE|BIO_CB_RETURN, in, 0, 0L, retvalue)
+ callback(b, BIO_CB_WRITE|BIO_CB_RETURN, buf, 0, 0L, retvalue)
 
 after.
 
@@ -198,7 +202,7 @@ is called before the call and
 or
 
  callback(b, BIO_CB_CTRL|BIO_CB_RETURN, parg, cmd, larg, ret)
+
 after.
 
 =back