Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

socket: communicating with Mac OS X KEXT controls #57986

Closed
goderbauer mannequin opened this issue Jan 12, 2012 · 6 comments
Closed

socket: communicating with Mac OS X KEXT controls #57986

goderbauer mannequin opened this issue Jan 12, 2012 · 6 comments
Labels
extension-modules C modules in the Modules dir type-feature A feature request or enhancement

Comments

@goderbauer
Copy link
Mannequin

goderbauer mannequin commented Jan 12, 2012

BPO 13777
Nosy @loewis, @ronaldoussoren, @ned-deily
PRs
  • [3.6] bpo-31878: Fix _socket module compilation on Cygwin. (GH-4137) #4145
  • Files
  • kext.patch: Patch to support KEXT Controls
  • patch2.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2012-02-03.16:46:12.600>
    created_at = <Date 2012-01-12.18:16:31.798>
    labels = ['extension-modules', 'type-feature']
    title = 'socket: communicating with Mac OS X KEXT controls'
    updated_at = <Date 2017-11-06.13:06:34.286>
    user = 'https://bugs.python.org/goderbauer'

    bugs.python.org fields:

    activity = <Date 2017-11-06.13:06:34.286>
    actor = 'python-dev'
    assignee = 'none'
    closed = True
    closed_date = <Date 2012-02-03.16:46:12.600>
    closer = 'loewis'
    components = ['Extension Modules']
    creation = <Date 2012-01-12.18:16:31.798>
    creator = 'goderbauer'
    dependencies = []
    files = ['24220', '24410']
    hgrepos = []
    issue_num = 13777
    keywords = ['patch']
    message_count = 6.0
    messages = ['151145', '152526', '152529', '152538', '152539', '152540']
    nosy_count = 5.0
    nosy_names = ['loewis', 'ronaldoussoren', 'ned.deily', 'python-dev', 'goderbauer']
    pr_nums = ['4145']
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue13777'
    versions = ['Python 3.3']

    @goderbauer
    Copy link
    Mannequin Author

    goderbauer mannequin commented Jan 12, 2012

    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

    @goderbauer goderbauer mannequin added extension-modules C modules in the Modules dir type-feature A feature request or enhancement labels Jan 12, 2012
    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Feb 3, 2012

    The patch fails to apply in configure.in. Can you please regenerate it?

    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Feb 3, 2012

    Also: Can you propose test cases for this socket family?

    @goderbauer
    Copy link
    Mannequin Author

    goderbauer mannequin commented Feb 3, 2012

    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.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Feb 3, 2012

    New changeset aa3680d2c24d by Martin v. Löwis in branch 'default':
    Issue bpo-13777: Add PF_SYSTEM sockets on OS X.
    http://hg.python.org/cpython/rev/aa3680d2c24d

    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Feb 3, 2012

    Thanks for the patch. Committed with an additional fix in refcounting.

    @loewis loewis mannequin closed this as completed Feb 3, 2012
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    extension-modules C modules in the Modules dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    0 participants