Re: connect or sock_connect?
Re: connect or sock_connect?
- Subject: Re: connect or sock_connect?
- From: Josh Graessley <email@hidden>
- Date: Thu, 7 Jul 2005 09:42:58 -0700
Justin is correct. Another hint is that sys/kpi_socket.h only appears
in the Kernel framework. If you look at sys/socket.h in the kernel
framework, you'll find that functions like socket, accept, listen,
bind, connect, etc are not declared. When working in the kernel, you
use the headers from the Kernel Framework. When working in user
space, you use headers from a variety of places but not the kernel
framework.
-josh
On Jul 6, 2005, at 6:09 PM, Justin C. Walker wrote:
On Jul 6, 2005, at 17:52 , Allan Hoeltje wrote:
The Network Kernel Extensions Programming Guide, section KEXT
Controls and
Notifications, describes how an application client can communicate
with a
KEXT via sockets. There is a bare bones code snippet that uses
socket,
ioctl, connect, and setsockopt calls. It does not say which
framework nor
which header file to use.
I would assume it needs sys/socket.h?
User code should use <sys/socket.h>
However, there is a header sys/kpi_socket.h that defines a socket
api and
all funtions are prefixed with "sock_". The parameters are slightly
different from the functions defined in sys/socket.h.
What are these sock_ calls for? Is the NKE doc in error? Or are
the sock_
calls for sockets used only within KEXTs and not a client app
talking to a
KEXT?
Anything in the kpi world is for the use of kexts, not for user-
mode code.
Regards,
Justin
--
Justin C. Walker, Curmudgeon-At-Large
Institute for General Semantics
--------
"Weaseling out of things is what separates us from the animals.
Well, except the weasel."
- Homer J Simpson
--------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40apple.com
This email sent to email@hidden
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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