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
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.