From 5992bf282a0c4e71168ff4040f8e8f4b1ab76db2 Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith [Google LLC]" Date: Mon, 27 Nov 2023 15:46:13 -0800 Subject: [PATCH] Backport PR #112477: correct socket AF_PACKET docs Network byte order is not involved in the `int` on the Python side. That happens under the hood. Correctly use the term addresses instead of packets. --- Doc/library/socket.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst index 7193713984f169..6d0629a0994d54 100644 --- a/Doc/library/socket.rst +++ b/Doc/library/socket.rst @@ -185,12 +185,11 @@ created. Socket addresses are represented as follows: .. versionadded:: 3.7 - :const:`AF_PACKET` is a low-level interface directly to network devices. - The packets are represented by the tuple + The addresses are represented by the tuple ``(ifname, proto[, pkttype[, hatype[, addr]]])`` where: - *ifname* - String specifying the device name. - - *proto* - An in network-byte-order integer specifying the Ethernet - protocol number. + - *proto* - An integer specifying the Ethernet protocol number. - *pkttype* - Optional integer specifying the packet type: - ``PACKET_HOST`` (the default) - Packet addressed to the local host.