site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com On Apr 20, 2005, at 13:01, Carl Smith wrote: Oh sorry. In my kernel I use the function 'int ctl_register(struct kern_ctl_reg *userctl, void *userdata, kern_ctl_ref *ctlref)'. In my code it looks like Ctl_register(My_kern_ctl_struct, 0, &my_kern_ctl_ref); Now in kernel_control calls I would use the returned value in my_kern_ctl_ref in subsequent calls to functions like ctl_enqueuembuf, as follows: ctl_enqueuembuf(my_kern_ctl_ref, my_mbuf, myFlags); so I am asking seeing as how ctl_enqueuembuf can obtain the struct sockbuf pointer from my_kern_ctl_ref, can I also obtain a socket descriptor from my_kern_ctl_ref? In short how can I find/obtain the socket descriptor(int) that the kernel is currently talking/connected to? Regards, Justin -- Justin C. Walker, Curmudgeon at Large Institute for General Semantics ----------- My wife 'n kids 'n dog are gone, I can't get Jesus on the phone, But Ol' Milwaukee's Best is my best friend. ----------- _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... [snip] You are slightly confused. Socket descriptors are user-mode gizmos, namely, file descriptors that are returned by the socket() call. Nothing in the kernel uses file descriptors (save for those calls that manipulate them on behalf of the user). I'm still not clear on what you want. For a start, review the kern_control source (xnu/bsd/kern/kernel_control.c) to see how things are set up. I don't know that there is any source that currently uses this stuff (to use as an example); someone else will have to answer that. This email sent to site_archiver@lists.apple.com
participants (1)
-
Justin Walker