Subject: Re: flags not specified for send.../recv... calls

From: "Brian F. G. Bidulock" <[email-masked]>
Date: Tue, 3 Jul 2007 04:30:41 -0600

Jan,

On Sun, 01 Jul 2007, Jan Newmarch wrote:

> Thanks Brian
> 
> I wasn't aware of that spec. I'm looking at
> http://www.unix.org/single_unix_specification/ "The Open Group Base
> Specifications Issue 6, IEEE Std 1003.1, 2004 Edition" now. This makes
> things much easier, I think. Note: I'm only talking about the flags
> parameter, not the msg_flags field in the message header parameter in
> recvmsg.
> 
> API spec 14  in section 6.1.  send(), recv(), sendto(), recvfrom() says
> "flags -  (described below)" and then doesn't describe them after all.
> In the light of your email could I suggest this be changed to:
> 
> "
> flags - for send, etc, the flags are a bitwise OR of zero or more of MSG_EOR
>           - for recv, etc, the flags are a bitwise OR of zero or more
> of MSG_PEEK and
>             MSG_WAITALL
>          - other flags such as MSG_DONTWAIT may be supported by implementations
> "

They are described for recv(), recvfrom(), recvmsg(), send(), sendmsg(),
sendto() in "The Open Group Base Specification Issue 6, IEEE Std 1003.1,
2003 Edition."

> 
> Two issues still:
> 
> - MSG_EOR is only worth setting if the sending side is sending partial
> messages (by setting SCTP_EXPLICIT_EOR). But this is covered by the
> flag SCTP_EOR in the sinfo_flags of sctp_extrcvinfo used by sendmsg.
> Should this be allowed in send, etc? it sounds reasonable to me since
> it means that calls such as send/sendto/etc can be used for partial
> sending.

IEEE Std 1003.1 is a formal, declared standard.  The SCTP sockets draft
does not describe a standard of any kind.  IEEE Std 1003.1 says MSG_EOR
"Terminates a record (if supported by the protocol)."  I think it is
clear that SCTP supports records.

> 
> - I'm not so sure about your suggestion that MSG_OOB for send/etc
> should trigger an unordered message. I think I should let others argue
> this one... Is it in any implementation you know of?

It is in OpenSS7 sockets implementation for Linux.

> Thanks
> Jan

-- 
Brian F. G. Bidulock    ¦ The reasonable man adapts himself to the ¦
[email-masked]    ¦ world; the unreasonable one persists in  ¦
http://www.openss7.org/ ¦ trying  to adapt the  world  to himself. ¦
                        ¦ Therefore  all  progress  depends on the ¦
                        ¦ unreasonable man. -- George Bernard Shaw ¦