[issue24809] Add getprotobynumber to socket module
New submission from Will Booth: Add an old method from netdb to python for a best-effort, centerized look up. For the function to work, /etc/protocols would also need to be present. If the protocol doesn't exist OSError is raised. Patch attached. -- components: Extension Modules files: proto.diff keywords: patch messages: 248128 nosy: wbooth priority: normal severity: normal status: open title: Add getprotobynumber to socket module type: enhancement versions: Python 3.6 Added file: http://bugs.python.org/file40137/proto.diff ___ Python tracker <http://bugs.python.org/issue24809> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24809] Add getprotobynumber to socket module
Changes by Will Booth : -- versions: +Python 3.5 -Python 3.6 ___ Python tracker <http://bugs.python.org/issue24809> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24809] Add getprotobynumber to socket module
Will Booth added the comment: Allow users to translate protocol numbers from IPv4/IPv6 headers to a friendly human readable string. Just filling a gap in the API. There might be a PyPI package out there similar to socket. However, it's complementary function,'getprotobyname', already exist here. getprotobynumber just flips getprotobyname around. -- ___ Python tracker <http://bugs.python.org/issue24809> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com