From owner-freebsd-doc@FreeBSD.ORG Mon Jan 8 22:20:12 2007 Return-Path: X-Original-To: freebsd-doc@hub.freebsd.org Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BA03616A416 for ; Mon, 8 Jan 2007 22:20:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 9916513C4A7 for ; Mon, 8 Jan 2007 22:20:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l08MKCCE073211 for ; Mon, 8 Jan 2007 22:20:12 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l08MKCaw073210; Mon, 8 Jan 2007 22:20:12 GMT (envelope-from gnats) Resent-Date: Mon, 8 Jan 2007 22:20:12 GMT Resent-Message-Id: <200701082220.l08MKCaw073210@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-doc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Rob Robertson Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B008D16A40F for ; 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 ; 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 ; 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 To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.0 Cc: Subject: docs/107696: getsockopt(2) does not document SO_TIMESTAMP and SO_BINSTAMP options X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jan 2007 22:20:12 -0000 >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@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: