[gnutls-dev] Re: Intent to implement DTLS

Simon Josefsson jas at extundo.com
Sat May 7 17:30:25 CEST 2005


Guus Sliepen <guus at sliepen.eu.org> writes:

> Sounds like a good idea. But of course I have already looked at the
> GNUTLS source and I already have a suggestion for an API. Since the
> difference between TLS and DTLS is the transport layer (TCP vs. UDP), I
> would suggest adding the following enum and function calls:
>
> typedef enum gnutls_transport_type {
> 	GNUTLS_TRANSPORT_TYPE_STREAM = 1,
> 	GNUTLS_TRANSPORT_TYPE_DATAGRAM,
> } gnutls_transport_type;
>
> void gnutls_transport_set_type(gnutls_session session, gnutls_transport_type type); 
> gnutls_transport_type gnutls_transport_get_type(gnutls_session session);
>
> Of course the transport type will default to
> GNUTLS_TRANSPORT_TYPE_STREAM, but it can be changed after gnutls_init()
> but not after the first gnutls_handshake(). Apart from this the only
> necessary addition to the API that I forsee is a function call to deal
> with the retransmit timers necessary for DTLS.

Very simple and non-obtrusive, so it sounds good to me.  Perhaps a
'gnutls_init_datagram' is useful, as a shortcut to create a DTLS
connection.

Regards,
Simon



More information about the Gnutls-dev mailing list