From nobody@FreeBSD.org  Mon Jan  8 22:10:32 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id B008D16A40F
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  8 Jan 2007 22:10:32 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [69.147.83.33])
	by mx1.freebsd.org (Postfix) with ESMTP id A016C13C44B
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  8 Jan 2007 22:10:32 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l08MAW6M067716
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 8 Jan 2007 22:10:32 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id l08MAVoU067711;
	Mon, 8 Jan 2007 22:10:31 GMT
	(envelope-from nobody)
Message-Id: <200701082210.l08MAVoU067711@www.freebsd.org>
Date: Mon, 8 Jan 2007 22:10:31 GMT
From: Rob Robertson<rob@remarque.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: getsockopt(2) does not document SO_TIMESTAMP and SO_BINSTAMP options
X-Send-Pr-Version: www-3.0

>Number:         107696
>Category:       docs
>Synopsis:       getsockopt(2) does not document SO_TIMESTAMP and SO_BINSTAMP options
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-doc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 08 22:20:12 GMT 2007
>Closed-Date:    Thu Jan 18 11:09:20 GMT 2007
>Last-Modified:  Thu Jan 18 11:09:20 GMT 2007
>Originator:     Rob Robertson
>Release:        6.1.
>Organization:
>Environment:
FreeBSD a.wildbluecorp.com 6.1-RELEASE FreeBSD 6.1-RELEASE #5: Thu Dec 14 06:30:30 MST 2006     rob@a.wildbluecorp.com:/h/a1/src/sys/i386/compile/minnow  i386

>Description:
getsockopt(2) does not document SO_TIMESTAMP and SO_BINSTAMP options
>How-To-Repeat:
man getsockopt
>Fix:
I have cribbed the documentation from NetBSD and added the bintime stuff.


Attached is a context diff patch file.

Patch attached with submission follows:

*** getsockopt.2.orig	Mon Jan  8 14:44:55 2007
--- getsockopt.2	Mon Jan  8 15:03:56 2007
***************
*** 364,369 ****
--- 364,395 ----
  closed returns with the error
  .Er EPIPE .
  .Pp
+ If the 
+ .Dv SO_TIMESTAMP 
+ or
+ .Dv SO_BINTIME
+ option is enabled on a 
+ .Dv SOCK_DGRAM 
+ socket, the
+ .Xr recvmsg 2  
+ call will return a timestamp corresponding to when the data-
+ gram was received.  The msg_control field in the msghdr structure points
+ to a buffer that contains a cmsghdr structure followed by a struct
+ timeval for SO_TIMESTAMP and struct bintime for SO_BINTIME.  The 
+ cmsghdr fields have the following values for TIMESTAMP:
+ .Bd -literal
+      cmsg_len = sizeof(struct timeval)
+      cmsg_level = SOL_SOCKET
+      cmsg_type = SCM_TIMESTAMP
+ .Ed
+ .Pp
+ and for SO_BINTIME:
+ .Bd -literal
+      cmsg_len = sizeof(struct bintime)
+      cmsg_level = SOL_SOCKET
+      cmsg_type = SCM_BINTIME
+ .Ed
+ .Pp
  Finally,
  .Dv SO_TYPE
  and

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->patched 
State-Changed-By: maxim 
State-Changed-When: Thu Jan 11 18:45:59 UTC 2007 
State-Changed-Why:  
A modified version of your patch was committed to HEAD.  Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=107696 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/107696: commit references a PR
Date: Thu, 11 Jan 2007 18:46:40 +0000 (UTC)

 maxim       2007-01-11 18:45:42 UTC
 
   FreeBSD src repository
 
   Modified files:
     lib/libc/sys         getsockopt.2 
   Log:
   o Document SO_TIMESTAMP and SO_BINSTAMP socket options.
   
   PR:             docs/107696
   Submitted by:   Rob Robertson
   Reviewed by:    ru
   Obtained from:  NetBSD (mostly)
   MFC after:      1 week
   
   Revision  Changes    Path
   1.36      +46 -2     src/lib/libc/sys/getsockopt.2
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: maxim 
State-Changed-When: Thu Jan 18 11:09:00 UTC 2007 
State-Changed-Why:  
Merged to RELENG_6. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=107696 
>Unformatted:
