Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
#define HANDSHAKE_HEADER_SIZE (IS_DTLS ? DTLS_HANDSHAKE_HEADER_SIZE : TLS_HANDSHAKE_HEADER_SIZE)
#define MAX_HANDSHAKE_HEADER_SIZE DTLS_HANDSHAKE_HEADER_SIZE
+/* This is the maximum handshake message size we send without
+ fragmentation. This currently ignores record layer overhead. */
+#define DTLS_DEFAULT_MTU 1200
+
/* the maximum size of the DTLS cookie */
#define DTLS_MAX_COOKIE_SIZE 32
/* For DTLS handshake fragmentation and reassembly. */
uint16_t hsk_write_seq;
uint16_t hsk_read_seq;
+ uint16_t hsk_mtu;
} dtls_st;
/* Flags do nothing, so just copy them into the struct for now. */
(*session)->internals.dtls.flags = flags;
+ (*session)->internals.dtls.hsk_mtu = DTLS_DEFAULT_MTU;
(*session)->internals.transport = GNUTLS_DGRAM;
return 0;