blob: f02d74115f45c91ffceab5185e46a3651fb2efb3 [file] [log] [blame]
Rich Salz21dcbeb2016-05-17 14:24:17 -04001/*
2 * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
Matt Caswella146ae52016-03-22 09:21:29 +00003 *
Rich Salz21dcbeb2016-05-17 14:24:17 -04004 * Licensed under the OpenSSL license (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
Matt Caswella146ae52016-03-22 09:21:29 +00008 */
9
10#include <openssl/bio.h>
11
12struct bio_method_st {
13 int type;
14 const char *name;
Matt Caswell3befffa2016-10-20 15:18:39 +010015 int (*bwrite) (BIO *, const char *, size_t, size_t *);
16 int (*bwrite_old) (BIO *, const char *, int);
Matt Caswelld07aee22016-09-05 17:26:58 +010017 int (*bread) (BIO *, char *, size_t, size_t *);
18 int (*bread_old) (BIO *, char *, int);
Matt Caswella146ae52016-03-22 09:21:29 +000019 int (*bputs) (BIO *, const char *);
20 int (*bgets) (BIO *, char *, int);
21 long (*ctrl) (BIO *, int, long, void *);
22 int (*create) (BIO *);
23 int (*destroy) (BIO *);
24 long (*callback_ctrl) (BIO *, int, bio_info_cb *);
25};
26
Matt Caswell1ee7b8b2016-04-14 21:28:54 +010027void bio_free_ex_data(BIO *bio);
Matt Caswellff234402016-03-11 21:53:18 +000028void bio_cleanup(void);
Matt Caswelld07aee22016-09-05 17:26:58 +010029
30
31/* Old style to new style BIO_METHOD conversion functions */
Matt Caswell42c60462016-10-21 15:15:51 +010032int bwrite_conv(BIO *bio, const char *data, size_t datal, size_t *written);
33int bread_conv(BIO *bio, char *data, size_t datal, size_t *read);