Subject: Re: [Tsvwg] A SCTP sockets/sctp_peeloff() issue to think about

From: Kacheong Poon <[email-masked]>
Date: Wed, 2 Oct 2002 18:29:28 -0500 (CDT)

Included message from Randall Stewart <[email-masked]>:

>----
>Well I had not considered the sctp_peeloff() as part of the sockets
>layer... but even in that vein then how does the sockets code
>sctp_peeloff() know which mbufs in queue (I will use bsd terms here)
>are from which association..
>
>I guess it could dig through and look for the sockaddr * that is
>embedded in the mbuf's in the socket queue.. find each address and
>then do a lookup.. but it would be very very expensive if there
>were a LOT of data inqueue.. and worse if the app has read the
>top of the data .. say because it supplied a too small of buffer..
>then the address stuff is lost and the message at the top of
>the socket buffer can not be deteremined as to who it belongs to..

This gets into implementation details...  For example, an implementation
may not need to do a look up if the assoc id is already there in 
each message buffer to be delivered to an app reading from the
socket.  There must be a way to do this since for recvmsg(), the
assoc id must be given to the app.  Then it will be a simple unlink
operation from a link list of buffers.  But the point is that it is
an implementation issue.  I still don't see a particular need to
modify the API draft to accomodate that.

And as Venkat has pointed out, there is already at least one
implementation doing that.

>exactly... and how this is done is a real issue.. in order to
>find which association goes with which data there must be
>something embedded in the socketbuffer to point back to the
>association.. this could in theroy be a embedded address MT_SONAME
>or some other cookie.. but that means that the sockets layer must
>be aware of some hook the sctp layer is putting in...

Yes, it is an issue.  I am not saying that it is cheap to implement
this feature.  But I think the draft as it is right now looks OK.

>----

							K. Poon.
_______________________________________________
tsvwg mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/tsvwg

---

From: Randall Stewart <[email-masked]>
Date: Wed, 02 Oct 2002 20:00:20 -0500

Kacheong:

I think there is a hole in all of this and will need
to write a test app to see if I can show it.. after
I get it so it does as I expect I will send it
to venkat to try :>

R

-- 
Randall R. Stewart
[email-masked] 815-342-5222 (cell phone)