Move s->s3->rrec into s->rlayer
[openssl.git] / ssl / ssl_locl.h
index 40c42a8f499033049d7f6d1085815b98d21cdf83..6925992c7b1244f522a81dc975db4c472e16e3ca 100644 (file)
 # include <openssl/ssl.h>
 # include <openssl/symhacks.h>
 
+#include "record/ssl3_buffer.h"
+#include "record/rec_layer.h"
+
 # ifdef OPENSSL_BUILD_SHLIBSSL
 #  undef OPENSSL_EXTERN
 #  define OPENSSL_EXTERN OPENSSL_EXPORT
@@ -1030,8 +1033,7 @@ struct ssl_st {
     unsigned int packet_length;
     struct ssl3_state_st *s3;   /* SSLv3 variables */
     struct dtls1_state_st *d1;  /* DTLSv1 variables */
-    int read_ahead;             /* Read as many input bytes as possible (for
-                                 * non-blocking reads) */
+
     /* callback that allows applications to peek at protocol messages */
     void (*msg_callback) (int write_p, int version, int content_type,
                           const void *buf, size_t len, SSL *ssl, void *arg);
@@ -1217,6 +1219,8 @@ struct ssl_st {
      * basis, depending on the chosen cipher.
      */
     int (*not_resumable_session_cb) (SSL *ssl, int is_forward_secure);
+    
+    RECORD_LAYER rlayer;
 };
 
 typedef struct ssl3_record_st {
@@ -1261,17 +1265,6 @@ typedef struct ssl3_record_st {
      */ unsigned char seq_num[8];
 } SSL3_RECORD;
 
-typedef struct ssl3_buffer_st {
-    /* at least SSL3_RT_MAX_PACKET_SIZE bytes, see ssl3_setup_buffers() */
-    unsigned char *buf;
-    /* buffer size */
-    size_t len;
-    /* where to 'copy from' */
-    int offset;
-    /* how many bytes left */
-    int left;
-} SSL3_BUFFER;
-
 typedef struct ssl3_state_st {
     long flags;
     int delay_buf_pop_ret;
@@ -1288,7 +1281,6 @@ typedef struct ssl3_state_st {
     int empty_fragment_done;
     /* The value of 'extra' when the buffers were initialized */
     int init_extra;
-    SSL3_BUFFER rbuf;           /* read IO goes into here */
     SSL3_BUFFER wbuf;           /* write IO goes into here */
     SSL3_RECORD rrec;           /* each decoded record goes in here */
     SSL3_RECORD wrec;           /* goes out from here */