• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Using ctl_enqueuembuf
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using ctl_enqueuembuf


  • Subject: Re: Using ctl_enqueuembuf
  • From: Justin Walker <email@hidden>
  • Date: Wed, 20 Apr 2005 13:17:51 -0700


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);
[snip]
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?

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

In short how can I find/obtain the socket descriptor(int) that the
kernel is currently talking/connected to?

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.


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      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >RE: Using ctl_enqueuembuf (From: "Carl Smith" <email@hidden>)

  • Prev by Date: RE: Using ctl_enqueuembuf
  • Next by Date: Passing data from Userland to Kernel
  • Previous by thread: RE: Using ctl_enqueuembuf
  • Next by thread: Re: Cann't make connection to a graphics IOService
  • Index(es):
    • Date
    • Thread