Skip to content

Conversation

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Nov 27, 2023

Protocol in the address tuple should not be in the network-byte-order, because it is converted internally[1].

[1] https://github.com/python/cpython/blob/89ddea4886942b0c27a778a0ad3f0d5ac5f518f0/Modules/socketmodule.cGH-L2144

network byte order doesn't make sense for a python level int anyways. It's a fixed size C serialization concept.
(cherry picked from commit 562d714)

Co-authored-by: Eugene Toder eltoder@users.noreply.github.com


📚 Documentation preview 📚: https://cpython-previews--112477.org.readthedocs.build/

Protocol in the address tuple should *not* be in the network-byte-order, because it is converted internally[1].

[1] https://github.com/python/cpython/blob/89ddea4886942b0c27a778a0ad3f0d5ac5f518f0/Modules/socketmodule.cGH-L2144

network byte order doesn't make sense for a python level int anyways. It's a fixed size C serialization concept.
(cherry picked from commit 562d714)

Co-authored-by: Eugene Toder <eltoder@users.noreply.github.com>
@bedevere-app bedevere-app bot added awaiting review docs Documentation in the Doc dir skip news labels Nov 27, 2023
@gpshead gpshead enabled auto-merge (squash) November 27, 2023 23:43
gpshead added a commit to gpshead/cpython that referenced this pull request Nov 27, 2023
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.
@gpshead gpshead merged commit 60a08e6 into python:3.12 Nov 27, 2023
gpshead added a commit that referenced this pull request Nov 27, 2023
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip issue skip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants