Fix dtls_get_max_record_overhead()
[openssl.git] / ssl / record / recordmethod.h
index 36ba59e3c20daab9629fe43bf15fc032e89e278e..064f8e5feb56d631790c032d2995fb9bae308337 100644 (file)
@@ -164,16 +164,6 @@ struct ossl_record_method_st {
      */
     size_t (*app_data_pending)(OSSL_RECORD_LAYER *rl);
 
-    int (*write_pending)(OSSL_RECORD_LAYER *rl);
-
-    /*
-     * Find out the maximum amount of plaintext data that the record layer is
-     * prepared to write in a single record. When calling write_records it is
-     * the caller's responsibility to ensure that no record template exceeds
-     * this maximum when calling write_records.
-     */
-    size_t (*get_max_record_len)(OSSL_RECORD_LAYER *rl);
-
     /*
      * Find out the maximum number of records that the record layer is prepared
      * to process in a single call to write_records. It is the caller's
@@ -315,6 +305,23 @@ struct ossl_record_method_st {
      * writing a record
      */
     size_t (*get_max_record_overhead)(OSSL_RECORD_LAYER *rl);
+
+    /*
+     * Increment the record sequence number
+     */
+    int (*increment_sequence_ctr)(OSSL_RECORD_LAYER *rl);
+
+    /*
+     * Allocate read or write buffers. Does nothing if already allocated.
+     * Assumes default buffer length and 1 pipeline.
+     */
+    int (*alloc_buffers)(OSSL_RECORD_LAYER *rl);
+
+    /*
+     * Free read or write buffers. Fails if there is pending read or write
+     * data. Buffers are automatically reallocated on next read/write.
+     */
+    int (*free_buffers)(OSSL_RECORD_LAYER *rl);
 };