[openbeosnetteam] socketpair() implementation

Hello,

Please have a look at http://www.haiku-os.org/bugzilla/show_bug.cgi?id=52 to
give feedback or comments. socketpair() isn't on BeOS, but it's kind of
expected to be here IMO.
I added a socketpair() prototype in our header sys/socket.h.
My opinion about implementation would be to have a socketpair() in
src/kits/network/libsocket/socket.c which does (for AF_INET at least):
- calls socket() twice to have two sockets.
- call a new ioctl to have the network stack do the socketpair hard job :
bind(), listen(), connect(), accept()
- close the listening socket.

As I never tested the Haiku network part, maybe I'm not the right person to code
this.

Thoughts ?
Bye
Jérôme

Other related posts: