mirror of
https://github.com/python/cpython.git
synced 2026-01-05 06:52:26 +00:00
[3.12] Correct documentation for AF_PACKET (GH-112339) (#112477)
Correct documentation for AF_PACKET (GH-112339) Protocol in the address tuple should *not* be in the network-byte-order, because it is converted internally[1]. [1]89ddea4886/Modules/socketmodule.cGH-L2144network byte order doesn't make sense for a python level int anyways. It's a fixed size C serialization concept. (cherry picked from commit562d7149c6) Co-authored-by: Eugene Toder <eltoder@users.noreply.github.com>
This commit is contained in:
parent
ee7dc67081
commit
60a08e6ff2
1 changed files with 1 additions and 2 deletions
|
|
@ -185,7 +185,7 @@ 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.
|
||||
|
|
@ -193,7 +193,6 @@ created. Socket addresses are represented as follows:
|
|||
May be :data:`ETH_P_ALL` to capture all protocols,
|
||||
one of the :ref:`ETHERTYPE_* constants <socket-ethernet-types>`
|
||||
or any other Ethernet protocol number.
|
||||
Value must be in network-byte-order.
|
||||
- *pkttype* - Optional integer specifying the packet type:
|
||||
|
||||
- ``PACKET_HOST`` (the default) - Packet addressed to the local host.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue