From nobody Mon Oct 02 23:58:45 2023 X-Original-To: doc@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rzyb94ghfz4wdqg for ; Mon, 2 Oct 2023 23:58:45 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rzyb93gCQz3g2k for ; Mon, 2 Oct 2023 23:58:45 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696291125; a=rsa-sha256; cv=none; b=WuUqQinQfShYl525BinC7viLTR7uJrR40AjlZE1n+Qzhl6Duio70zppP/tNgwfcOLAExWZ FtXqJL6eWM7ov8yXlREy142RoYoYm3kKRTIghk4w2NbMkJGYvc5LDA50cgIzdLJoiSU8Y/ sM6VTSm/gKWOCllr5qJAkVEiK1nxFQXXTjSTRnXTGf7ONXNUHw9Vz0ea2pGRneYXP3iHsx L9QMKDsOLOUpN1jKhNmI/hmJdYr5cE1RU2b5cQQjiXxRKu9ogM/25hbrcLenmlUaMohiK8 Y5d+W38uvEy3d5G+ZWV/QpgILjC1Cl7lZ+eUiUAB9rnhlUShDQmOPayJakFZDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696291125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K+hq45bD9crcldOc2jOuXleiNmuzZHlNwbP+wQ+aPng=; b=Erg+kklaFn+qjakRSxuzmyzBTcIr80LO2Zp83j5RGSpN+KxaNMEkiT5ldzKQy2huE/z8Tl lLRLFKwANjXeZISTt8AaCvgV64yU3BgBlCgLec3oyWL8Arig16cLZX3QFHyI+VKbTKGOmL AY9TjwRjDP+tOb0I2eYz8vdcKtj8ww3qLXDfeye4Fp3xWT2u195bWqoSItMlO6qaXvSYqn u12O8af6i2Z4/eoPP4WHobxvDS07ueGR4cIhEFm+Eq9WflnB/ncaqvwjcLGMe2pbbYhMOQ gCHgqseW4KkRVuIsCJP9+RHBuTT8mnXlP1qgkCm7kjRyGyDNhJSbOdSCJs6dRw== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rzyb92ZYDzXjP for ; Mon, 2 Oct 2023 23:58:45 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 392Nwjsu015790 for ; Mon, 2 Oct 2023 23:58:45 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 392NwjDA015789 for doc@FreeBSD.org; Mon, 2 Oct 2023 23:58:45 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: doc@FreeBSD.org Subject: [Bug 274226] No documentation for sendmsg/recvmsg ancilliary data. Date: Mon, 02 Oct 2023 23:58:45 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Documentation X-Bugzilla-Component: Manual Pages X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: peterj@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Documentation project List-Archive: https://lists.freebsd.org/archives/freebsd-doc List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-doc@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D274226 Bug ID: 274226 Summary: No documentation for sendmsg/recvmsg ancilliary data. Product: Documentation Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Manual Pages Assignee: bugs@FreeBSD.org Reporter: peterj@FreeBSD.org CC: doc@FreeBSD.org recvmsg(2) and sendmsg(2) include provision for "ancillary data" via msg_control and struct cmsghdr but there's no documentation on what cmsg_le= vel and cmsg_type mean or how to set them. recvmsg(2) says "As an example, the SO_TIMESTAMP socket option returns a reception timestamp for UDP packets" b= ut provides no information on how how to actually initialise the cmsghdr to do that (the information is in getsockopt(2) but that isn't clear from the recvmsg(2) man page). In general, the recvmsg/sendmsg "ancillary data" manipulates similar data to the setsockopt(2)/getsockopt(2) calls, but on a per-message basis, rather t= han a per-connection/socket basis. Unfortunately, there's not an exact 1:1 relationship between the functions and in some cases, the data length varies between the two paths - e.g. the only documentation for IP_TOS is in ip(4) = and indicates that it takes an int argument (4 bytes), but=20 https://cgit.freebsd.org/src/tree/sys/netinet/udp_usrreq.c#n1144 shows that when used with sendmsg(2), the argument is a u_char (1 byte). The direction is also unclear: getsockopt(2) and setsockopt(2) explicitly indicate whether the data is being written to the socket or read from the socket, whereas there's no such explicit indication for the msg_control pat= h. --=20 You are receiving this mail because: You are on the CC list for the bug.=