Subject: [Tsvwg] Re: question regarding the SCTP API - SCTP_INIT cmsg

From: Randall Stewart <[email-masked]>
Date: Thu, 24 Jan 2002 12:04:58 -0600

Daisy:

Yes.. somewhere in the RFC it requires that if you
do recieve a Data chunk with only a header (i.e. no user
data) you MUST abort the association.

R

Daisy Chang wrote:
> 
> Yes, Randy, I think that the same behavior exists in Linux for TCP and UDP.
> Well, for TCP, appending 0 bytes to the output queue really is harmless,
> nothing is affected, so it is perfectly OK. For UDP, it seems a little
> wierd if it
> does result into a NULL message on the wire. But for a datagram protocol,
> users are taking more control than they want to in their own hands, so I
> guess
> the protocol has no reason to reject it.
> 
> As for SCTP, I think that it makes a lot of sense to disallow NULL user
> messages. I was a bit confused by the wording in 3.3.1 Payload Data
> (RFC2960) where it says "A DATA chunk with no user data field will have
> Length set to 16." But Jon Grimm graciously cleared it up by pointing me to
> the similar place in your book where it says "It should have a value equal
> to or greater than 17, because a DATA chunk is required to have at least
> one byte of user data." I gathered that this is what you refered to when
> you
> said that the RFC disallows 0-length send, right?
> 
> Thanks for your quick responses. I would suggest that we shall follow
> your interpretation for the sendmsg and connect implementation.
> 
> Thanks,
> Daisy
> 
> Daisy Chang
> IBM Linux Technology Center
> [email-masked]
> Tel: (512)-838-4194    T/L: 678-4194
> FAX: (512)-838-4663
> 
> Randall Stewart <[email-masked]>@cisco.com on 01/24/2002
> 11:19:16 AM
> 
> Sent by:    [email-masked]
> 
> To:    Daisy Chang/Austin/IBM@IBMUS
> cc:    [email-masked], [email-masked]
> Subject:    Re: question regarding the SCTP API - SCTP_INIT cmsg
> 
> Daisy:
> 
> Ok looking a bit further it appears that the BSD
> stack under UDP will go ahead and send out
> a packet with no user data...
> 
> On the TCP side it does append the mbuf to
> the TCB for output.. not sure how it
> handles this down in the stack (I did not want
> to dig down that far).
> 
> So the bottom line is when you do send a message with
> 0 length.. in UDP it may go out :>
> 
> So one may not want to accept this since the app may
> expect a packet to be generated...
> 
> R
> 
> Daisy Chang wrote:
> >
> > Oops, I mean "my case #2", not case #1. Sorry.
> >
> > Regards,
> > Daisy
> >
> > Daisy Chang
> > IBM Linux Technology Center
> > [email-masked]
> > Tel: (512)-838-4194    T/L: 678-4194
> > FAX: (512)-838-4663
> >
> > ---------------------- Forwarded by Daisy Chang/Austin/IBM on 01/24/2002
> > 10:17 AM ---------------------------
> >
> > Daisy Chang
> > 01/24/2002 09:57 AM
> >
> > To:    Randall Stewart <[email-masked]>
> > cc:    <[email-masked]>, <[email-masked]>
> > From:  Daisy Chang/Austin/IBM@IBMUS
> > Subject:    Re: question regarding the SCTP API - SCTP_INIT cmsg
> (Document
> >        link: Daisy Chang)
> >
> > Randy,
> >       Ah, connect()! I've got the impression a while back that a
> definition
> > for
> > "connect() - UDP style" is contemplated. Now that you mentioned it, I
> > somehow
> > couldn't find any reference to it in the API draft. Is this something
> that
> > we should
> > consider to add to our UDP-style support?
> >       I tend to agree that a 0-length send should not do much. I'm not
> sure
> > if a EINVAL is necessary though, given that TCP and UDP both seem to take
> > it without complaining - as far as I can tell on Linux. I could be wrong
> > though
> > because I haven't checked the library routines to see if there is any
> > specific
> > length verification there.
> >       Another thing is that, to me, SCTP_INIT seems to have slightly
> > different
> > functionality than a straight connect(). For a UDP-style socket,
> SCTP_INIT
> > could provide user with finer granularity of control of those init
> > parameters per
> > connection. While setsockopt(SCTP_INITMSG) and connect() can provide
> > the similar results, I'm wondering, rather than requiring SCTP_INIT with
> > data,
> > if we should allow my case #1 to work as "a connect() with init parms"?
> > What
> > is your insight?
> >
> > Thanks,
> > Daisy
> >
> > Daisy Chang
> > IBM Linux Technology Center
> > [email-masked]
> > Tel: (512)-838-4194    T/L: 678-4194
> > FAX: (512)-838-4663
> >
> > Randall Stewart<[email-masked]>@cig.mot.com on 01/24/2002
> > 04:16:34 AM
> >
> > Please respond to Randall Stewart<[email-masked]>
> >
> > Sent by:    [email-masked]
> >
> > To:    Daisy Chang/Austin/IBM@IBMUS
> > cc:    <[email-masked]>, <[email-masked]>
> > Subject:    Re: question regarding the SCTP API - SCTP_INIT cmsg
> >
> > Daisy:
> >
> > Here is my interpretation/what we did:
> >
> > 1) Any 0 length send that has no msgflg's to process is an
> >    error and return EINVAL
> > 2) A 0 length send that has msgflgs aka ABORT/TERM get the
> >    shutdown to happen.
> > 3) To start an association with no data in the UDP model we
> >    use connect (much like UDP but without the binding
> >    effect to the peer endpoint ) :>
> >
> > R
> >
> > Daisy Chang wrote:
> > >
> > > Hi Randy,
> > >       A question came up when I was implementing the SCTP_INIT cmsg in
> > > sendmsg() API on Linux (the lksctp project), I hope that I can find a
> > quick
> > > answer here.
> > >       The question is, what is the behavior of a  sendmsg() call with a
> > > 0-length
> > > message, i.e., the total length of iov_len of the msg_iov in the struct
> > > msghdr is 0, or,
> > > both the msg_iov and msg_iovlen are 0. Now, if the msg_name is
> specified,
> > > and an
> > > existing association is identified with it, I believe that no data
> should
> > > be sent out; we
> > > will process the cmsg and msg_flags if they are specified, and we are
> > done.
> > > But, if
> > > there is no existing association is found for the msg_name, should we
> go
> > > ahead
> > > establishing one?
> > >       Considering the following cases, is there any differences among
> > these
> > > 3 API's in terms of the effects:
> > > 1. sendmsg() with msg_name and 0-length data, and NULL cmsg?
> > > 2. sendmsg() with msg_name and 0-length data, and a SCTP_INIT cmsg?
> > > 3. sendmsg() with msg_name and 0-length data, and a SCTP_SNDRCVINFO
> cmsg?
> > >       The <draft-ietf-tsvwg-sctpsocket-02.txt> doesn't seem to address
> > this
> > > very
> > > specifically. Would you consider to add something to the draft to
> ensure
> > > the
> > > consistencies among implementations?
> > >
> > > Thanks,
> > > Daisy
> > >
> > > Daisy Chang
> > > IBM Linux Technology Center
> > > [email-masked]
> > > Tel: (512)-838-4194    T/L: 678-4194
> > > FAX: (512)-838-4663
> >
> > --
> > Randall R. Stewart
> > [email-masked] 815-342-5222 (cell phone)
> > |
> >                                      |
> > |
> >                                      |
> > ---------------------- Mailing List commands
> > --------------------------------
> > Send the following in the body of a message to
> > [email-masked]
> > SUBSCRIBE TO LIST    : subscribe list-name   | LIST OF LISTS   : lists
> > UNSUBSCRIBE TO LIST  : unsubscribe list-name | RETRIEVE HELP   : help
> > WHO ON ON THE LIST   : who list-name         | GET DESCRIPTION : info
> > list-name
> > |
> > |
> > Or you can use http://majordomo.cig.mot.com
> >
> ------------------------------------------------------------------------------
> 
> >
> > |
> |
> > |
> |
> > ---------------------- Mailing List commands
> --------------------------------
> > Send the following in the body of a message to
> [email-masked]
> > SUBSCRIBE TO LIST    : subscribe list-name   | LIST OF LISTS   : lists
> > UNSUBSCRIBE TO LIST  : unsubscribe list-name | RETRIEVE HELP   : help
> > WHO ON ON THE LIST   : who list-name         | GET DESCRIPTION : info
> list-name
> > |
> |
> > Or you can use http://majordomo.cig.mot.com
> >
> ------------------------------------------------------------------------------
> 
> --
> Randall R. Stewart
> [email-masked] 815-342-5222 (cell phone)

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

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

---

From: "Daisy Chang" <[email-masked]>
Date: Thu, 24 Jan 2002 11:34:20 -0600

Thanks,
Daisy

Daisy Chang

Daisy:

R

(Document
definition
that
sure
SCTP_INIT
specified,
should
go
cmsg?
ensure

|
|
list-name
|