View Issue Details

IDProjectCategoryView StatusLast Update
00004631003.1(2008)/Issue 7System Interfacespublic2013-04-16 13:06
Reportermarkh Assigned Toajosey  
PrioritynormalSeverityObjectionTypeOmission
Status ClosedResolutionAccepted As Marked 
NameMark Harris
Organization
User Reference
Sectionsend
Page Number1845
Line Number58990
Interp Status---
Final Accepted Text0000463:0000860
Summary0000463: send() equivalency issues
DescriptionThe description of send() states:

  The send() function is equivalent to sendto() with a null pointer dest_len
  argument, and to write() if no flags are used.

However the sendto() dest_len argument is not even a pointer. And the
value of the sendto() dest_addr argument is unspecified.

With traditional BSD sockets, send() is equivalent to sendto() with a
null pointer dest_addr argument and a zero dest_len argument, which
indicates that the pre-specified destination address is to be used in
the case of a connectionless-mode socket. However, unlike BSD sockets,
POSIX.1-2008 does not define behavior for sendto() when the dest_addr
argument is a null pointer. And if the pre-specified peer address is
specified explicitly, POSIX.1-2008 permits the implementation to return
the error [EISCONN]. POSIX.1-2008 does not define any set of sendto()
arguments that must have behavior equivalent to send().

Possible resolutions include:
 (a) Change sendto() to specify behavior for a null pointer dest_addr
     argument and state the equivalency in those terms.
or
 (b) Restrict the equivalency to connection-mode sockets, where the
     sendto() dest_addr is ignored.
or
 (c) Remove the wording about an equivalency with sendto().

To avoid the introduction of an additional requirement on implementations,
yet retain as much of the original requirement as possible, the Desired
Action takes approach (b).

In addition, the equivalency with write() if no flags are used should be
qualified to apply only to sockets, since send() and write() require
different behavior for non-sockets.
Desired ActionChange:

  The send() function is equivalent to sendto() with a null pointer dest_len
  argument, and to write() if no flags are used.

to:

  If the socket argument refers to a connection-mode socket, the send()
  function is equivalent to sendto() with a null pointer dest_len argument
  and 0 dest_len argument. If the socket argument refers to a socket and
  the flags argument is 0, the send() function is equivalent to write().
Tagstc1-2008

Activities

geoffclare

2011-06-16 15:46

manager   bugnote:0000860

Change:

  The send() function is equivalent to sendto() with a null pointer dest_len
  argument, and to write() if no flags are used.

to:

  If the socket argument refers to a connection-mode socket, the send()
  function is equivalent to sendto() (with any value for the dest_addr
  and dest_len arguments, as they are ignored in this case). If the
  socket argument refers to a socket and the flags argument is 0,
  the send() function is equivalent to write().

Issue History

Date Modified Username Field Change
2011-06-13 06:47 markh New Issue
2011-06-13 06:47 markh Status New => Under Review
2011-06-13 06:47 markh Assigned To => ajosey
2011-06-13 06:47 markh Name => Mark Harris
2011-06-13 06:47 markh Section => send
2011-06-13 06:47 markh Page Number => 1845
2011-06-13 06:47 markh Line Number => 58990
2011-06-16 15:46 geoffclare Interp Status => ---
2011-06-16 15:46 geoffclare Note Added: 0000860
2011-06-16 15:46 geoffclare Status Under Review => Resolved
2011-06-16 15:46 geoffclare Resolution Open => Accepted As Marked
2011-06-16 15:46 geoffclare Final Accepted Text => 0000463:0000860
2011-06-16 15:47 geoffclare Tag Attached: tc1-2008
2013-04-16 13:06 ajosey Status Resolved => Closed