ChorusOS 5.0 Features and Architecture Overview

POSIX Sockets (POSIX_SOCKETS)

The POSIX_SOCKETS feature provides POSIX-compatible socket system calls. For general information on this feature, see the POSIX draft standard P1003.1g. The POSIX_SOCKETS provides support for the AF_LOCAL, AF_INET, AF_INET6, and AF_ROUTE domains. The AF_UNIX domain is only supported when the AF_LOCAL feature is present. The AF_INET6 domain is only supported when the IPv6 feature is present.

POSIX Sockets API

The POSIX_SOCKETS feature API is summarized in the following table. Some of the calls listed are also included in other features:

Function 

Description 

accept()

Accept a connection on a socket 

bind()

Bind a name to a socket 

close()

Close a file descriptor 

connect()

Initiate a connection on a socket 

dup()

Duplicate an open file descriptor 

dup2()

Duplicate an open file descriptor 

fcntl()

File control 

getpeername()

Get name of connected peer 

getsockname()

Get socket name 

setsockopt()

Set options on sockets 

getsockopt()

Get options on sockets 

ioctl()

Device control 

listen()

Listen for connections on a socket 

read()

Read from a socket 

recv()

Receive a message from a socket 

recvfrom()

Receive a message from a socket 

recvmsg()

Receive a message from a socket 

select()

Synchronous I/O multiplexing 

send()

Send a message from a socket 

sendto()

Send a message from a socket. 

sendmsg()

Send a message from a socket 

shutdown()

Shut down part of a full-duplex connection 

socket()

Create an endpoint for communication 

socketpair()

Create a pair of connected sockets 

write()

Write on a socket