-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-120056: Add IP_RECVERR
, IP_RECVORIGDSTADDR
, IP_RECVTTL
to socket
module
#120058
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 8000
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Modules/socketmodule.c
Outdated
@@ -8421,6 +8421,12 @@ socket_exec(PyObject *m) | |||
#ifdef IP_RECVTOS | |||
ADD_INT_MACRO(m, IP_RECVTOS); | |||
#endif | |||
#ifdef IP_RECVERR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you insert these in alphabetical order?
OOC why these two options? Just looking at man 7 ip, it looks like there are a few other options we are missing, e.g. IP_RECVORIGDSTADDR. Would it make sense to add more to make this list of options more complete?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I added these two, because I only needed these two :)
Will add more.
IP_RECVERR
and IP_RECVTTL
to socket
moduleIP_RECVERR
, IP_RECVORIGDSTADDR
, IP_RECVTTL
to socket
module
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
We don't copy/paste socket constant manual pages (documentation, since the documentation is big, platform dependent, and it would be really complicated to maintain such documentation. If we decide to add a little bit more documentation than the plain generic "Many constants of these forms, documented in the Unix documentation on sockets and/or the IP protocol, are also defined in the socket module" sentence, I suggest to do it in a separated PR and not only for these 3 constants.
Thanks everyone! |
… to `socket` module (python#120058) * pythongh-120056: Add `IP_RECVERR` and `IP_RECVTTL` to `socket` module * Fix news * Address review * Update NEWS
… to `socket` module (python#120058) * pythongh-120056: Add `IP_RECVERR` and `IP_RECVTTL` to `socket` module * Fix news * Address review * Update NEWS
… to `socket` module (python#120058) * pythongh-120056: Add `IP_RECVERR` and `IP_RECVTTL` to `socket` module * Fix news * Address review * Update NEWS
IP_RECVTTL
andIP_RECVERR
constants tosocket
module #120056📚 Documentation preview 📚: https://cpython-previews--120058.org.readthedocs.build/