Socketpair – Comtrol eCos User Manual
Page 577

Chapter 38. TCP/IP Library Reference
The socket() call fails if:
[EPROTONOSUPPORT]
The protocol type or the specified protocol is not
supported within this domain.
[EMFILE]
The per-process descriptor table is full.
[ENFILE]
The system file table is full.
[EACCES]
Permission to create a socket of the specified type
and/or protocol is denied.
[ENOBUFS]
Insufficient buffer space is available.
The socket
cannot be created until sufficient resources are
freed.
SEE ALSO
accept(2), bind(2), connect(2), getsockname(2), getsockopt(2), ioctl(2),
listen(2), poll(2), read(2), recv(2), select(2), send(2), setsockopt(2),
shutdown(2), socketpair(2), write(2), getprotoent(3), netintro(4)
An Introductory 4.3 BSD Interprocess Communication Tutorial, reprinted in
UNIX Programmer’s Supplementary Documents Volume 1.
BSD Interprocess Communication Tutorial, reprinted in UNIX Programmer’s
Supplementary Documents Volume 1.
HISTORY
The socket() function call appeared in 4.2BSD.
BSD
June 4, 1993
BSD
socketpair
SOCKETPAIR(2)
System Calls Manual
SOCKETPAIR(2)
NAME
socketpair - create a pair of connected sockets
SYNOPSIS
#include
<
sys/types.h>
#include
<
sys/socket.h>
int
socketpair(int d, int type, int protocol, int *sv);
DESCRIPTION
The socketpair() call creates an unnamed pair of connected sockets in the
specified domain d, of the specified type, and using the optionally spec-
ified protocol.
The descriptors used in referencing the new sockets are
returned in sv[0] and sv[1].
The two sockets are indistinguishable.
473