Anders Persson wrote:
> A kernel sockets prototype has just been pushed to the project's
> mercurial gate. The prototype handles TCP and UDP sockets, but SCTP and
> SDP sockets are not yet supported. Please check out the project page [1]
> on how to obtain and use the prototype.
Some late comments.
For ksock_socket(), I think you need a flag to indicate
whether the call can sleep or not. For all the other
socket calls, it can be inferred from the blocking ioctl
value. But this very first call cannot.
For the send function, you may want to consider modeling
after sendmsg(), or also adding ksock_sendmsg(). Then
the send op is just a wrapper to the sendsmg call. The
sendmsg call provides a richer feature set then send. In
fact, I suspect that you need that to make the kernel socket
interface work with SCTP (probably for IPv6 and routing
socket). BTW, you'll also need to use the 3XNET semantics
for SCTP. Same comment on the receive side.
I think for the bind ops, we may want to have something
like bindx, which can add or remove addresses. Although
currently it only works for SCTP, I've been trying to make
it work for TCP and UDP also. So for the kernel socket
interface, we may just skip having bind and go straight
for bindx. Same comment for connect. Or if we keep the
current bind and connect ops, we can add bindx and connectx
later.
Since async notification is supported, I'm wondering if
some short cut can also be considered. For example, in
the SCTP kernel interface, there is no accept op. The
reason is that the new SCTP association handle is one
parameter of the newconn call back. You may want to take
a look at the SCTP kernel interface for some ideas. It
has some short comings. But it is working example of
a kernel level socket like interface.
--
K. Poon.
[EMAIL PROTECTED]
_______________________________________________
networking-discuss mailing list
[email protected]