From nobody Mon Oct 02 23:58:45 2023 X-Original-To: bugs@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 4Rzyb9496Kz4wf6l 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 4Rzyb92yFSz3gD1 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=DAWuWPgx1PIyDRIiGftjGqKso1IidNPppLqgtHJeB49ouFwlJVpfYxETX9rnPr7X8luQQD N6CFJMHfA+Np4kActwPYVyWIgZc/DYv4E0Yc2mKV7a0/F1j3h8NMemI6QBhYBf+b05VTkj BcjjV3utgwOk7UfSbVsiO1lvW4T/YG9jatbBWQ9Hj9CmEXYc10kAJ7JbK1ZnJ0mboAdsMk 9xeGHfYVqrQzRvSrxTPmla8ACD2U7SQx/UDoMEuS4JC9IpIVmjd4C1OKuUqvWOyPbFAGuX 7XshwBRlI3MMpkS97Ivs7KCxjRPJm4k6gaW56pz0V9YU9MDErrUVH/RY9N+ljw== 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=3NDvwEPuwAWYaJSPANyMXePGWMExVAVX9ShbmSzWrjM=; b=OqtIZTm1GbDrb304+cqDGsDA3t3SoaRp85O4IVlazgt+vgIlORJNvrRxMm8ixvzjLiVgkZ l6nHpQnUGuTY3eKQL4OIEzDCkUWJsfEyJ5/7/fHet/nqqpUqjDk/2x0r0NISycMRfTf3AZ bthk2t1Untg3MAIErYa/SvwCUZui5lY9yIrDpJSpL6FotGGbzWaq+hxp70x9UOSJJRfMud /2Zz5khw13ZTwTRTdN8TGy0hpF4Cj9blAyi1CEA8Qz6Gb6AHSBuZ5WwIr99NNMghncc2vh NviGwbGgqZn6iBJWepxqAW8223+8eR+0iIvxAnvIGwqd4RkrtiDZqtUnmHe+hw== 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 4Rzyb91xM2zXSk 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 392NwjuW015786 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 392Nwj0h015785 for bugs@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: bugs@FreeBSD.org Subject: [Bug 274226] No documentation for sendmsg/recvmsg ancilliary data. Date: Mon, 02 Oct 2023 23:58:45 +0000 X-Bugzilla-Reason: AssignedTo 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: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@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 the assignee for the bug.=