Send data from kernel to userspace with KEXT control ?
Send data from kernel to userspace with KEXT control ?
- Subject: Send data from kernel to userspace with KEXT control ?
- From: NAHieu <email@hidden>
- Date: Wed, 6 Sep 2006 18:25:35 +0900
Hi,
I have a kext that has some data to send out to userspace. After some
time of investigations (great thanks to developers on this ML), I
think it is a good idea to employ network stack for this job.
To do that, I register a kernel control (ctl_register() function) in
kernel, and have an application in userspace. The application will
periodically send request for data to kernel. Inside kernel, I have a
buffer, and it is necessary to send all the data from the buffer out
to the userspace application.
However, from the guide "Network kernel extensions programming
guide", we read :
" ..... the user process can communicate with the control using
getsockopt, setsockopt, recv, and send on the socket. With the
exception of recv (which is transparently handled with a queue), calls
in user space to these functions result in a kernel-space call to the
equivalent functions in the control, ctl_getopt_func, ctl_setopt_func,
and ctl_send, respectively.
........"
So it is not clear how we can handle receive function (recv) from
inside kernel?
I understand that to send data out (when client requests with recv()),
I must handle the buffer for recv(), but I dont know how to do that.
Too bad the documentation is quite ambiguity to me.
Would anybody help me?
Many thanks,
H
_______________________________________________
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