socket

socket

Functions

int accept ()
int bind ()
int connect ()
int getpeername ()
int getsockname ()
int getsockopt ()
int listen ()
ssize_t recv ()
ssize_t recvfrom ()
ssize_t recvmsg ()
ssize_t send ()
ssize_t sendmsg ()
ssize_t sendto ()
int setsockopt ()
int shutdown ()
int socket ()
int socketpair ()

Types and Values

#define socklen_t
#define sockaddr_storage
#define SOCK_STREAM
#define SOCK_DGRAM
#define SOCK_RAW
#define SOCK_SEQPACKET
#define SO_ACCEPTCONN
#define SO_BROADCAST
#define SO_DEBUG
#define SO_DONTROUTE
#define SO_ERROR
#define SO_KEEPALIVE
#define SO_LINGER
#define SO_OOBINLINE
#define SO_RCVBUF
#define SO_RCVLOWAT
#define SO_RCVTIMEO
#define SO_REUSEADDR
#define SO_SNDBUF
#define SO_SNDLOWAT
#define SO_SNDTIMEO
#define SO_TYPE
#define AF_UNSPEC
#define AF_UNIX
#define AF_INET
#define AF_INET6

Description

Functions

accept ()

int
accept (int fd,
        struct sockaddr *addr,
        socklen_t *len);

bind ()

int
bind (int fd,
      const struct sockaddr *addr,
      socklen_t len);

connect ()

int
connect (int fd,
         const struct sockaddr *addr,
         socklen_t len);

getpeername ()

int
getpeername (int fd,
             struct sockaddr *addr,
             socklen_t *len);

getsockname ()

int
getsockname (int fd,
             struct sockaddr *addr,
             socklen_t *len);

getsockopt ()

int
getsockopt (int fd,
            int level,
            int name,
            const void *value,
            socklen_t *len);

listen ()

int
listen (int fd,
        int backlog);

recv ()

ssize_t
recv (int fd,
      void *buf,
      size_t len,
      int flags);

recvfrom ()

ssize_t
recvfrom (int fd,
          void *buf,
          size_t len,
          int flags,
          struct sockaddr *addr,
          socklen_t *addrlen);

recvmsg ()

ssize_t
recvmsg (int fd,
         struct msghdr *msg,
         int flags);

send ()

ssize_t
send (int fd,
      const void *buf,
      size_t len,
      int flags);

sendmsg ()

ssize_t
sendmsg (int fd,
         const struct msghdr *msg,
         int flags);

sendto ()

ssize_t
sendto (int fd,
        const void *buf,
        size_t len,
        int flags,
        struct sockaddr *addr,
        socklen_t addrlen);

setsockopt ()

int
setsockopt (int fd,
            int level,
            int name,
            const void *value,
            socklen_t len);

shutdown ()

int
shutdown (int fd,
          int how);

socket ()

int
socket (int domain,
        int type,
        int protocol);

socketpair ()

int
socketpair (int domain,
            int type,
            int protocol,
            int fds[2]);

Types and Values

socklen_t

#define             socklen_t

sockaddr_storage

# define sockaddr_storage sockaddr_storage

SOCK_STREAM

# define SOCK_STREAM 1

SOCK_DGRAM

# define SOCK_DGRAM 2

SOCK_RAW

# define SOCK_RAW 3

SOCK_SEQPACKET

# define SOCK_SEQPACKET 5

SO_ACCEPTCONN

# define SO_ACCEPTCONN 0x0002

SO_BROADCAST

# define SO_BROADCAST 0x0020

SO_DEBUG

# define SO_DEBUG 0x0001

SO_DONTROUTE

# define SO_DONTROUTE 0x0010

SO_ERROR

# define SO_ERROR 0x1007

SO_KEEPALIVE

# define SO_KEEPALIVE 0x0008

SO_LINGER

# define SO_LINGER 0x0080

SO_OOBINLINE

# define SO_OOBINLINE 0x0100

SO_RCVBUF

# define SO_RCVBUF 0x1002

SO_RCVLOWAT

# define SO_RCVLOWAT 0x1004

SO_RCVTIMEO

# define SO_RCVTIMEO 0x1006

SO_REUSEADDR

# define SO_REUSEADDR 0x0004

SO_SNDBUF

# define SO_SNDBUF 0x1001

SO_SNDLOWAT

# define SO_SNDLOWAT 0x1003

SO_SNDTIMEO

# define SO_SNDTIMEO 0x1005

SO_TYPE

# define SO_TYPE 0x1008

AF_UNSPEC

# define AF_UNSPEC 0

AF_UNIX

# define AF_UNIX 1

AF_INET

# define AF_INET 2

AF_INET6

# define AF_INET6 24