charon-nm: Set local address to %any so IPv6 may be used as outer address
[strongswan.git] / src / libtls / tls_fragmentation.h
index 6adbc36..a49f27b 100644 (file)
 #ifndef TLS_FRAGMENTATION_H_
 #define TLS_FRAGMENTATION_H_
 
-typedef struct tls_fragmentation_t tls_fragmentation_t;
-
 #include <library.h>
 
+typedef struct tls_fragmentation_t tls_fragmentation_t;
+
 #include "tls.h"
-#include "tls_handshake.h"
+#include "tls_alert.h"
 #include "tls_handshake.h"
 
 /**
@@ -62,6 +62,13 @@ struct tls_fragmentation_t {
                                          tls_content_type_t *type, chunk_t *data);
 
        /**
+        * Has the application layer finished (returned SUCCESS)?.
+        *
+        * @return                      TRUE if application layer finished
+        */
+       bool (*application_finished)(tls_fragmentation_t *this);
+
+       /**
         * Destroy a tls_fragmentation_t.
         */
        void (*destroy)(tls_fragmentation_t *this);
@@ -71,10 +78,13 @@ struct tls_fragmentation_t {
  * Create a tls_fragmentation instance.
  *
  * @param handshake                    upper layer handshake protocol
+ * @param alert                                TLS alert handler
  * @param application          upper layer application data or NULL
- * @return                                     TLS fragmentation layer.
+ * @param purpose                      type of context this TLS stack is running in
+ * @return                                     TLS fragmentation layer
  */
 tls_fragmentation_t *tls_fragmentation_create(tls_handshake_t *handshake,
-                                                                                         tls_application_t *application);
+                                                       tls_alert_t *alert, tls_application_t *application,
+                                                       tls_purpose_t purpose);
 
 #endif /** TLS_FRAGMENTATION_H_ @}*/