I think my program might be better off using sockets. From my daemon to daemon testing of sockets, I really appreciate the power they have. The only reason I am confused is because of the lack of documentation on the Kernel side of sockets, etc. Because with the daemon side of the socket the recv and send functions are different than the sosend and sorecv of the Kernel side, the arguments don't map to each other, I know I am overlooking something, but say I wanted to send something to the daemon that waiting on a recv? And the Daemon is set to recv it in a buffer of a given size. In the sosend function there is mbufs and aiov args that are confusing as how to get information to the recv in the daemon which its arg is buffer and the size of buffer. Matt On Feb 15, 2004, at 12:49 AM, Mike Smith wrote: With the exception of client termination notification, I think Matt might be better off using sysctl. Sockets mostly just add overhead and confusion, especially if the developer doesn't appreciate the subtleties of their decoupled nature. = Mike On Feb 14, 2004, at 6:37 PM, Vincent Lubet wrote: On Feb 14, 2004, at 2:58 PM, Matt Jaffa wrote: I have been trying to implement this System control socket, but can't seem to get it to work, The problem is I don't know how to make sockets within the KERNEL connect up with the socket in my Daemon. I wan't the Daemon socket to act as the server and the KEXT socket to call out when it has work to do then wait to receive a message back. I can do this with AF_UNIX when it is daemon to daemon, but I can't get KEXT to daemon sockets to work. Do you know of any code out there that can demonstrate the KEXT connecting to a daemon socket? I do not know of any AF_UNIX code but the kernel NFS code shows how to use sockets from the kernel. Using sockets in the kernel is pretty similar to using sockets in user space except the function are different. The main point is you cannot use select() and instead you should set the so_upcall with the address of a function that gets the event notification. Basically this is what you should do: 1) call socreate() 2) set the so_upcall and associated field 3) call soconnect() with the address of the deamon. Vincent _______________________________________________ darwin-kernel mailing list | darwin-kernel@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel Do not post admin requests to the list. They will be ignored. _______________________________________________ darwin-kernel mailing list | darwin-kernel@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel Do not post admin requests to the list. They will be ignored. _______________________________________________ darwin-kernel mailing list | darwin-kernel@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel Do not post admin requests to the list. They will be ignored.