Content-type: text/html Manpage of TCBsocket

TCBsocket

Section: Timely Computing Base (1)
Updated: 30 September 2002
Index Return to Main Contents

 

NAME

TCBsocket - create an endpoint for communication on the payload channel of the TCB

 

SYNOPSIS

#include "tcb/tcb.h"

int TCBsocket(int family, TCBsocketDesc* desc, int TCBdescriptor);  

DESCRIPTION

TCBsocket creates an endpoint for communication and returns a descriptor. A TCB socket acts as a wrapper of a BSD datagram socket and therefore BSD socket functions can be used in a TCB socket.

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:

NamePurposeMan 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.

 

RETURN VALUE

a descriptor referencing the socket.

 

ERRORS

if errno==0

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.  

NOTE

see also socket system call.

 

SEE ALSO

socket (2), TCBbind (1), TCBwinfoport (1), TCBsendto (1), TCBrecvfrom (1), TCBsocketClose (1)


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
NOTE
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 23:05:27 GMT, August 06, 2003