gh-120056: Add IP_RECVERR, IP_RECVORIGDSTADDR, IP_RECVTTL to socket module#120058
gh-120056: Add IP_RECVERR, IP_RECVORIGDSTADDR, IP_RECVTTL to socket module#120058jeremyhylton merged 4 commits intopython:mainfrom
IP_RECVERR, IP_RECVORIGDSTADDR, IP_RECVTTL to socket module#120058Conversation
Modules/socketmodule.c
Outdated
| #ifdef IP_RECVTOS | ||
| ADD_INT_MACRO(m, IP_RECVTOS); | ||
| #endif | ||
| #ifdef IP_RECVERR |
There was a problem hiding this comment.
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.
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.
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_RECVTTLandIP_RECVERRconstants tosocketmodule #120056📚 Documentation preview 📚: https://cpython-previews--120058.org.readthedocs.build/