classification
Title: socket: communicating with Mac OS X KEXT controls
Type: enhancement Stage:
Components: Extension Modules Versions: Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: goderbauer, loewis, ned.deily, python-dev, ronaldoussoren
Priority: normal Keywords: patch

Created on 2012-01-12 18:16 by goderbauer, last changed 2012-02-03 16:46 by loewis. This issue is now closed.

Files
File name Uploaded Description Edit
kext.patch goderbauer, 2012-01-12 18:16 Patch to support KEXT Controls review
patch2.patch goderbauer, 2012-02-03 16:33 review
Messages (6)
msg151145 - (view) Author: Michael Goderbauer (goderbauer) * Date: 2012-01-12 18:16
Mac OS X provides a socket-based API to communicate with Kernel Extensions (KEXTs) called "KEXT Controls". For this, Mac OS X defines PF_SYSTEM as a new socket domain which supports the SYSPROTO_CONTROL protocol.

Right now the PF_SYSTEM domain and the SYSPROTO_CONTROL protocol are not supported by Python's socket module. I am attaching a patch that introduces support for both.

More information on KEXT Controls can be found here:
http://developer.apple.com/library/mac/documentation/Darwin/Conceptual/NKEConceptual/control/control.html
msg152526 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2012-02-03 15:52
The patch fails to apply in configure.in. Can you please regenerate it?
msg152529 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2012-02-03 15:58
Also: Can you propose test cases for this socket family?
msg152538 - (view) Author: Michael Goderbauer (goderbauer) * Date: 2012-02-03 16:33
Here is the regenerated patch.

To write a test case I would need a PF_SYSTEM socket to connect to. As far as I know Mac OS X doesn't provide a demo socket for this.
msg152539 - (view) Author: Roundup Robot (python-dev) Date: 2012-02-03 16:45
New changeset aa3680d2c24d by Martin v. Löwis in branch 'default':
Issue #13777: Add PF_SYSTEM sockets on OS X.
http://hg.python.org/cpython/rev/aa3680d2c24d
msg152540 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2012-02-03 16:46
Thanks for the patch. Committed with an additional fix in refcounting.
History
Date User Action Args
2012-02-03 16:46:12loewissetstatus: open -> closed
resolution: fixed
messages: + msg152540
2012-02-03 16:45:07python-devsetnosy: + python-dev
messages: + msg152539
2012-02-03 16:33:24goderbauersetfiles: + patch2.patch

messages: + msg152538
2012-02-03 15:58:53loewissetmessages: + msg152529
2012-02-03 15:52:08loewissetnosy: + loewis
messages: + msg152526
2012-01-12 19:11:56rosslagerwallsetnosy: + ronaldoussoren, ned.deily
2012-01-12 18:16:31goderbauercreate