]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] Backport PR #112477: correct socket AF_PACKET docs (#112478)
authorGregory P. Smith <greg@krypto.org>
Mon, 27 Nov 2023 23:54:21 +0000 (15:54 -0800)
committerGitHub <noreply@github.com>
Mon, 27 Nov 2023 23:54:21 +0000 (23:54 +0000)
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

index 9cfa0c4f25e2c89478a683057de76e63285096f7..b9f47ae2e6d3f4853c10aef1ae243836904f145a 100644 (file)
@@ -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.