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

From: "Daisy Chang" <[email-masked]>
Date: Wed, 23 Jan 2002 17:30:47 -0600

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

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

---

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

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

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