Create BIO_read_ex() which handles size_t arguments
[openssl.git] / crypto / bio / bio_lcl.h
index ffd9e89ccd0b3c79fc0e7c2eab3fdca4263bd75a..d46f4e745c2b84cbddfe96dd42204c073d4d4c63 100644 (file)
@@ -1,3 +1,12 @@
+/*
+ * Copyright 2005-2016 The OpenSSL Project Authors. All Rights Reserved.
+ *
+ * Licensed under the OpenSSL license (the "License").  You may not use
+ * this file except in compliance with the License.  You can obtain a copy
+ * in the file LICENSE in the source distribution or at
+ * https://www.openssl.org/source/license.html
+ */
+
 #define USE_SOCKETS
 #include "e_os.h"
 
@@ -76,12 +85,6 @@ union bio_addr_st {
 
 /* END BIO_ADDRINFO/BIO_ADDR stuff. */
 
-/* BIO_BUF_MEM  */
-struct bio_buf_mem_st {
-    struct buf_mem_st *buf;   /* allocated buffer */
-    struct buf_mem_st *readp; /* read pointer */
-};
-
 #include "internal/cryptlib.h"
 #include <internal/bio.h>
 
@@ -111,7 +114,8 @@ typedef struct bio_f_buffer_ctx_struct {
 struct bio_st {
     const BIO_METHOD *method;
     /* bio, mode, argp, argi, argl, ret */
-    long (*callback) (struct bio_st *, int, const char *, int, long, long);
+    BIO_callback_fn callback;
+    BIO_callback_fn_ex callback_ex;
     char *cb_arg;               /* first argument for the callback */
     int init;
     int shutdown;
@@ -133,6 +137,8 @@ struct bio_st {
 typedef unsigned int socklen_t;
 # endif
 
+extern CRYPTO_RWLOCK *bio_lookup_lock;
+
 int BIO_ADDR_make(BIO_ADDR *ap, const struct sockaddr *sa);
 const struct sockaddr *BIO_ADDR_sockaddr(const BIO_ADDR *ap);
 struct sockaddr *BIO_ADDR_sockaddr_noconst(BIO_ADDR *ap);
@@ -141,6 +147,10 @@ socklen_t BIO_ADDRINFO_sockaddr_size(const BIO_ADDRINFO *bai);
 const struct sockaddr *BIO_ADDRINFO_sockaddr(const BIO_ADDRINFO *bai);
 #endif
 
+extern CRYPTO_RWLOCK *bio_type_lock;
+
+void bio_sock_cleanup_int(void);
+
 #if BIO_FLAGS_UPLINK==0
 /* Shortcut UPLINK calls on most platforms... */
 # define UP_stdin        stdin