aboutsummaryrefslogtreecommitdiffstats
path: root/src/libpttls/pt_tls.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libpttls/pt_tls.h')
-rw-r--r--src/libpttls/pt_tls.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/libpttls/pt_tls.h b/src/libpttls/pt_tls.h
index f7ea75b27..dd3d25055 100644
--- a/src/libpttls/pt_tls.h
+++ b/src/libpttls/pt_tls.h
@@ -38,6 +38,11 @@
#define PT_TLS_HEADER_LEN 16
/**
+ * Maximum size of a PT-TLS message
+ */
+#define PT_TLS_MAX_MESSAGE_LEN 8 * TLS_MAX_FRAGMENT_LEN - PT_TLS_HEADER_LEN
+
+/**
* Default PT-TLS port
*/
#define PT_TLS_PORT 271
@@ -107,13 +112,13 @@ bio_reader_t* pt_tls_read(tls_socket_t *tls, u_int32_t *vendor,
* Prepend a PT-TLS header to a writer, send data, destroy writer.
*
* @param tls TLS socket to write to
- * @param writer prepared Message value to write
* @param type Message Type to write
* @param identifier Message Identifier to write
+ * @param data Message value to write
* @return TRUE if data written successfully
*/
-bool pt_tls_write(tls_socket_t *tls, bio_writer_t *writer,
- pt_tls_message_type_t type, u_int32_t identifier);
+bool pt_tls_write(tls_socket_t *tls, pt_tls_message_type_t type,
+ u_int32_t identifier, chunk_t data);
/**
* @}