New submission from Artyom Gavrichenkov <xima...@highloadlab.com>:

Currently the Python implementation of socket.getsockopt allows only option 
name, level name and buffer size as its arguments. However, IEEE Standard 
1003.1-2008 allows one further argument -- an actual buffer to modify at the 
kernel level. POSIX does not prohibit the kernel from reading this buffer 
before modification, and the contents of the buffer may be used together with 
option and level names to specify an exact socket option to return.

In fact, this is how some applications already work, ipset 
(http://ipset.netfilter.org/) being a noticeable example.

The patch, written against Python 3.2 and aiming at providing this 
functionality, is attached. It may also apply to previous Python versions, 
though it's not tested against anything except Python 3.2.

----------
components: Extension Modules
files: getsockopt_buffer_input.patch
keywords: patch
messages: 144526
nosy: Artyom.Gavrichenkov
priority: normal
severity: normal
status: open
title: [PATCH] socket.getsockopt may require custom buffer contents
type: feature request
versions: Python 3.2
Added file: http://bugs.python.org/file23243/getsockopt_buffer_input.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue13045>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to