Bug 26861

Summary: accept(2) manpage documents non-existant feature
Product: Documentation Reporter: ras <ras>
Component: Books & ArticlesAssignee: freebsd-doc (Nobody) <doc>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description ras 2001-04-26 01:50:01 UTC
The accept(2) manpage says:

     One can obtain user connection request data without confirming the con-
     nection by issuing a recvmsg(2) call with an msg_iovlen of 0 and a non-
     zero msg_controllen, or by issuing a getsockopt(2) request.  Similarly,
     one can provide user connection rejection information by issuing a
     sendmsg(2) call providing only the control information, or by calling
     setsockopt(2).

But this is not possible. There is no such code in recvmsg/sendmsg, and no
such sockopt. This would be a nice feature, but the handshake on a stream
socket should be completed already by the time an accept() call is made...

Fix: 

Nuke the offending paragraph... :P
Comment 1 darklogik 2001-12-27 22:14:27 UTC
Richard is right, this feature is non-existant.  I'm supplying a patch for the
man-page, please review and comment/commit whatever.  Thanks

Tom Rhodes
www.Pittgoth.com
www.FreeBSD.org


*** accept.2.old	Thu Dec 27 16:25:33 2001
--- accept.2	Thu Dec 27 17:07:41 2001
***************
*** 115,137 ****
  Confirmation can be implied by a normal read or write on the new
  file descriptor, and rejection can be implied by closing the
  new socket.
- .Pp
- One can obtain user connection request data without confirming
- the connection by issuing a
- .Xr recvmsg 2
- call with an
- .Fa msg_iovlen
- of 0 and a non-zero
- .Fa msg_controllen ,
- or by issuing a
- .Xr getsockopt 2
- request.
- Similarly, one can provide user connection rejection information
- by issuing a
- .Xr sendmsg 2
- call providing only the control information,
- or by calling
- .Xr setsockopt 2 .
  .Sh RETURN VALUES
  The call returns \-1 on error.  If it succeeds, it returns a non-negative
  integer that is a descriptor for the accepted socket.
--- 115,120 ----
Comment 2 dd freebsd_committer freebsd_triage 2002-01-07 06:10:41 UTC
State Changed
From-To: open->closed

applied, thanks