Issue 17996: socket module should expose AF_LINK (original) (raw)
This issue has been migrated to GitHub: https://github.com/python/cpython/issues/62196
classification
Title: | socket module should expose AF_LINK | ||
---|---|---|---|
Type: | enhancement | Stage: | resolved |
Components: | Versions: | Python 3.4 |
process
Status: | closed | Resolution: | fixed |
---|---|---|---|
Dependencies: | Superseder: | ||
Assigned To: | giampaolo.rodola | Nosy List: | giampaolo.rodola, neologix, pitrou, python-dev |
Priority: | normal | Keywords: | patch |
Created on 2013-05-17 02:20 by giampaolo.rodola, last changed 2022-04-11 14:57 by admin. This issue is now closed.
Files | |||
---|---|---|---|
File name | Uploaded | Description | Edit |
AF_LINK.patch | giampaolo.rodola,2013-05-21 01:14 | review |
Messages (6) | ||
---|---|---|
msg189420 - (view) | Author: Giampaolo Rodola' (giampaolo.rodola) * ![]() |
Date: 2013-05-17 02:20 |
I bumped into this while exposing getifaddrs() [1] in psutil: https://code.google.com/p/psutil/issues/detail?id=376 In that case AF_LINK would be useful to distinguish MAC addresses (see also: http://carnivore.it/2010/07/22/python_-_getifaddrs). [1] http://man7.org/linux/man-pages/man3/getifaddrs.3.html | ||
msg189572 - (view) | Author: Charles-François Natali (neologix) * ![]() |
Date: 2013-05-19 08:20 |
Well, this just needs a patch :-) | ||
msg189715 - (view) | Author: Giampaolo Rodola' (giampaolo.rodola) * ![]() |
Date: 2013-05-21 00:27 |
Mmm I'm not sure how to do this properly. Apparently it seems I can: --- a/Lib/plat-freebsd8/regen +++ b/Lib/plat-freebsd8/regen @@ -1,3 +1,3 @@ #! /bin/sh set -v -python ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/netinet/in.h +python ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/netinet/in.h /usr/include/sys/socket.h ...and then rerun Tools/scripts/h2py.py in order to "#ifdef AF_LINK" from within socketmodule.c but what about other FreeBSD versions? Why there's no Lib/plat-freebsd9 directory? | ||
msg189716 - (view) | Author: Giampaolo Rodola' (giampaolo.rodola) * ![]() |
Date: 2013-05-21 01:14 |
Nevermind, it seems changing regen is not necessary. Patch is in attachment. | ||
msg189757 - (view) | Author: Charles-François Natali (neologix) * ![]() |
Date: 2013-05-21 14:09 |
> Nevermind, it seems changing regen is not necessary. Patch is in attachment. Go ahead! | ||
msg189777 - (view) | Author: Roundup Robot (python-dev) ![]() |
Date: 2013-05-21 19:02 |
New changeset 155e6fb309f5 by Giampaolo Rodola' in branch 'default': Fix issue #17996: expose socket.AF_LINK constant on BSD and OSX. http://hg.python.org/cpython/rev/155e6fb309f5 |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:57:45 | admin | set | github: 62196 |
2013-05-21 19:03:12 | giampaolo.rodola | set | status: open -> closedassignee: giampaolo.rodolatype: enhancementresolution: fixedstage: resolved |
2013-05-21 19:02:15 | python-dev | set | nosy: + python-devmessages: + |
2013-05-21 14:09:17 | neologix | set | messages: + |
2013-05-21 01:14:28 | giampaolo.rodola | set | files: + AF_LINK.patchkeywords: + patchmessages: + |
2013-05-21 00:27:39 | giampaolo.rodola | set | messages: + |
2013-05-19 08:20:05 | neologix | set | messages: + |
2013-05-17 05:53:22 | pitrou | set | nosy: + neologix |
2013-05-17 02:20:43 | giampaolo.rodola | create |