Kern-control and enqueuing data
Kern-control and enqueuing data
- Subject: Kern-control and enqueuing data
- From: Sudarshan S <email@hidden>
- Date: Mon, 5 Dec 2005 00:39:15 -0800 (PST)
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:
This email sent to email@hidden