socket.h File Reference

Socket application program interface (API). More...

#include "byteorder.h"
#include "in.h"
#include "in6.h"
#include "inet.h"
#include "socket_codes.h"
#include "socket_errno.h"
Include dependency graph for socket.h:

Functions

Socket application programming interface



int socket (int domain, int type, int protocol)
 Creates a new socket.
int bind (int socket_id, const struct sockaddr *my_addr, socklen_t addrlen)
 Binds the socket to a port address.
int listen (int socket_id, int backlog)
 Sets the number of connections waiting to be accepted.
int accept (int socket_id, struct sockaddr *cliaddr, socklen_t *addrlen)
 Accepts waiting socket.
int connect (int socket_id, const struct sockaddr *serv_addr, socklen_t addrlen)
 Connects socket to the remote server.
int closesocket (int socket_id)
 Closes the socket.
int send (int socket_id, void *data, size_t datalength, int flags)
 Sends data via the socket.
int sendto (int socket_id, const void *data, size_t datalength, int flags, const struct sockaddr *toaddr, socklen_t addrlen)
 Sends data via the socket to the remote address.
int recv (int socket_id, void *data, size_t datalength, int flags)
 Receives data via the socket.
int recvfrom (int socket_id, void *data, size_t datalength, int flags, struct sockaddr *fromaddr, socklen_t *addrlen)
 Receives data via the socket.
int getsockopt (int socket_id, int level, int optname, void *value, size_t *optlen)
 Gets socket option.
int setsockopt (int socket_id, int level, int optname, const void *value, size_t optlen)
 Sets socket option.

Detailed Description

Socket application program interface (API).

This is a part of the network application library. Based on the BSD socket interface.


Generated on Thu Mar 11 20:46:04 2010 for Networking and TCP/IP stack for HelenOS system by  doxygen 1.6.1