2
0

bio.h 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved.
  3. *
  4. * 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
  8. */
  9. #include <openssl/bio.h>
  10. struct bio_method_st {
  11. int type;
  12. char *name;
  13. int (*bwrite) (BIO *, const char *, size_t, size_t *);
  14. int (*bwrite_old) (BIO *, const char *, int);
  15. int (*bread) (BIO *, char *, size_t, size_t *);
  16. int (*bread_old) (BIO *, char *, int);
  17. int (*bputs) (BIO *, const char *);
  18. int (*bgets) (BIO *, char *, int);
  19. long (*ctrl) (BIO *, int, long, void *);
  20. int (*create) (BIO *);
  21. int (*destroy) (BIO *);
  22. long (*callback_ctrl) (BIO *, int, BIO_info_cb *);
  23. };
  24. void bio_free_ex_data(BIO *bio);
  25. void bio_cleanup(void);
  26. /* Old style to new style BIO_METHOD conversion functions */
  27. int bwrite_conv(BIO *bio, const char *data, size_t datal, size_t *written);
  28. int bread_conv(BIO *bio, char *data, size_t datal, size_t *read);