Content-type: text/html
int TCBsocket(int family, TCBsocketDesc* desc, int TCBdescriptor);
The family parameter specifies a communication domain; this selects the protocol family which will be used for communication. These families are defined in <sys/socket.h>. The currently understood formats include:
Name | Purpose | Man page |
PF_UNIX,PF_LOCAL | Local communication |
unix(7)
|
PF_INET | IPv4 Internet protocols |
ip(7)
|
PF_INET6 | IPv6 Internet protocols | |
PF_IPX | IPX - Novell protocols | |
PF_NETLINK | Kernel user interface device |
netlink(7)
|
PF_X25 | ITU-T X.25 / ISO-8208 protocol |
x25(7)
|
PF_AX25 | Amateur radio AX.25 protocol | |
PF_ATMPVC | Access to raw ATM PVCs | |
PF_APPLETALK | Appletalk |
ddp(7)
|
PF_PACKET | Low level packet interface |
packet(7)
|
A socket has a proper communication semantics. The TCB suports only the following type:
SOCK_DGRAM Supports datagrams (connectionless, unreliable messages of a fixed maximum length).
The parameter *desc is a pointer to a variable that the TCB will sets with the descriptor of the TCB socket.
TCBdescriptor references the connection to the TCB.
TCB_ACESS_ERROR
if an error occurred on the access to the TCB.
if errno!=0
EPROTONOSUPPORT The protocol type or the specified protocol is not supported within this domain.
ENFILE Not enough kernel memory to allocate a new socket structure.
EMFILE Process file table overflow.
EACCES Permission to create a socket of the specified type and/or protocol is denied.
ENOBUFS or ENOMEM Insufficient memory is available. The socket cannot be created until sufficient resources are freed.
EINVAL Unknown protocol, or protocol family not available.
Other errors may be generated by the underlying protocol modules.
socket (2), TCBbind (1), TCBwinfoport (1), TCBsendto (1), TCBrecvfrom (1), TCBsocketClose (1)