docs/107696: getsockopt(2) does not document SO_TIMESTAMP and SO_BINSTAMP options

Rob Robertson rob at remarque.org
Mon Jan 8 22:20:12 UTC 2007


>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:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 08 22:20:12 GMT 2007
>Closed-Date:
>Last-Modified:
>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 at 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:
>Unformatted:



More information about the freebsd-doc mailing list