[SPAM] Re: TLS over SCTP

Sebastien Decugis sdecugis at nict.go.jp
Mon Aug 11 02:46:36 CEST 2008


Hi Nikkos,

Thank you for this feedback! It actualy gives me new insights I did not 
think about. You are right, I may be able to actually receive data in a 
separate thread, and then use buffer queues and conditional variables to 
receive "inside" the gnutls wrappers... I will give this a try, and send 
the implementation to the list in case it may be useful to other people.

Thanks again!
Best regards,
Sebastien.


Nikos Mavrogiannopoulos a écrit :
> Sebastien Decugis wrote:
>
>   
>> I understand your point. My first attempt was to come up with such
>> intermediate layer that would provide these two functions:
>> send_to_stream(message, length, streamid);
>> recv_from_stream(message, length, streamid);
>> It would be quite straight-forward to use the user pointer from the
>> session, or the connection object, to retrieve the stream id of a session.
>>
>> Unfortunately, whereas the send function can be written quite easily, I
>> cannot figure out how to write the recv function. Using the SCTP socket
>> API [1], we do not specify the stream on which we are listening for a
>> new message. Instead, we are listening for the next message from any
>> stream, and when we receive it we can also get its stream id. That is a
>> fundamental difference between a multistream SCTP association, and many
>> separated connections.
>>     
>
> Hello Sebastien,
>  Actually I think the recv_from_stream() is doable. You should wait for
> any message, then if it is not for this stream save it for later
> processing. You only need to cache messages and read from the cache if
> they exist. It is easy to describe but might be tricky implementing it.
>
> The gnutls_recv function behave similarly. You can read from different
> "streams" such as application data, handshake data etc. Only they are
> read they are cached for later processing by someone who is interested.
>
> regards,
> Nikos
>
>   

-- 
Sebastien Decugis
Research fellow
Network Architecture Group
NICT (nict.go.jp)






More information about the Gnutls-devel mailing list