Skip to content

[3.12] Correct documentation for AF_PACKET (GH-112339) #112477

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 27, 2023

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 [email protected]


📚 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 <[email protected]>
@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