Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Kern-control and enqueuing data



I have implemented a kern-control handler in kext. I want to pass some data to the user space program using recv queue. Whenever I tried to enqueue data using ctl_enqueuedata( ), it use to return an error code EINVAL. I was using the kern_ctl_ref and kern_ctl_reg.unit field that I got after ctl_register( ) call. Then I tried to enqueue data in setsockopt call handler (ctl_setopt) by using the parameters passed to that call and ctl_enqueuedata( ) worked fine.
Then I realized that the unit parameter passed to ctl_enqueuedata was not correct and the function was failing in kcb_find( ) call.
 
Is it correct to expect that kernel sets the proper value in kern_ctl_reg.unit after making ctl_register( ) call ?
Or is there any API to get the unit number by passing kern_ctl_ref ?
 
- Leo


Yahoo! Shopping
Find Great Deals on Gifts at Yahoo! Shopping
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-kernel/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.