[WIP] DTLS 1.0 preliminary patches
Simon Josefsson
simon at josefsson.org
Wed Jul 29 21:16:37 CEST 2009
Jonathan Bastien-Filiatrault <joe at x2a.org> writes:
> Nikos Mavrogiannopoulos wrote:
>>> I was thinking more of a set_transport in the long run with a DGRAM or
>>> STREAM argument and with a transport protocol selector for UDP, SCTP,
>>> DCCP and UDP-Lite. I guess gnutls_init_dtls could take those arguments
>>> instead.
>>
>> You mean for setting different push/pull functions? Those could be in
>> predefined macros that are explicitly called.
>
> I was referring to DTLS over DCCP and SCTP having specific quirks (and
> specs, RFC5238 and draft-ietf-tsvwg-dtls-for-sctp-01). DTLS needs a
> way to be told it is using something other than UDP.
Ouch, I see. How about something like this:
typedef enum {
GNUTLS_DTLS_OVER_DCCP
} gnutls_dtls_flags_t;
int gnutls_init_dtls (gnutls_session_t * session,
gnutls_connection_end_t con_end,
gnutls_dtls_flags_t flags);
A "flags" concept is somewhat more generic since it allows for other
DTLS-flavors than just those influenced by the transport.
Another alternative is to use a priority string but I'm not sure it will
work -- there is the ordering of API calls problem I mentioned earlier.
/Simon
More information about the Gnutls-devel
mailing list