socket.h File Reference

API published in:
API deprecated in:


#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/_types.h>
#include <sys/_iovec.h>
#include <machine/param.h>

Go to the source code of this file.


Data Structures

struct   linger
struct   sockaddr
struct   sockaddr_storage
struct   msghdr
struct   cmsghdr

Defines

#define  _NO_NAMESPACE_POLLUTION
#define  SOCK_STREAM   1
#define  SOCK_DGRAM   2
#define  SOCK_RAW   3
#define  SOCK_SEQPACKET   5
#define  SO_DEBUG   0x0001
#define  SO_ACCEPTCONN   0x0002
#define  SO_REUSEADDR   0x0004
#define  SO_KEEPALIVE   0x0008
#define  SO_DONTROUTE   0x0010
#define  SO_BROADCAST   0x0020
#define  SO_LINGER   0x0080
#define  SO_OOBINLINE   0x0100
#define  SO_SNDBUF   0x1001
#define  SO_RCVBUF   0x1002
#define  SO_SNDLOWAT   0x1003
#define  SO_RCVLOWAT   0x1004
#define  SO_SNDTIMEO   0x1005
#define  SO_RCVTIMEO   0x1006
#define  SO_ERROR   0x1007
#define  SO_TYPE   0x1008
#define  SOL_SOCKET   0xffff
#define  AF_UNSPEC   0
#define  AF_UNIX   1
#define  AF_INET   2
#define  AF_INET6   28
#define  _SS_MAXSIZE   128U
#define  _SS_ALIGNSIZE   (sizeof(__int64_t))
#define  _SS_PAD1SIZE
#define  _SS_PAD2SIZE
#define  SOMAXCONN   128
#define  MSG_OOB   0x1
#define  MSG_PEEK   0x2
#define  MSG_DONTROUTE   0x4
#define  MSG_EOR   0x8
#define  MSG_TRUNC   0x10
#define  MSG_CTRUNC   0x20
#define  MSG_WAITALL   0x40
#define  CMSG_DATA(cmsg)
#define  CMSG_NXTHDR(mhdr, cmsg)
#define  CMSG_FIRSTHDR(mhdr)
#define  SCM_RIGHTS   0x01
#define  SHUT_RD   0
#define  SHUT_WR   1
#define  SHUT_RDWR   2

Typedefs

typedef __sa_family_t  sa_family_t
typedef __socklen_t  socklen_t
typedef __ssize_t  ssize_t

Functions

__BEGIN_DECLS IMPORT_C int  accept (int, struct sockaddr *__restrict, socklen_t *__restrict)
IMPORT_C int  bind (int, const struct sockaddr *, socklen_t)
IMPORT_C int  connect (int, const struct sockaddr *, socklen_t)
IMPORT_C int  getpeername (int, struct sockaddr *__restrict, socklen_t *__restrict)
IMPORT_C int  getsockname (int, struct sockaddr *__restrict, socklen_t *__restrict)
IMPORT_C int  getsockopt (int, int, int, void *__restrict, socklen_t *__restrict)
IMPORT_C int  listen (int, int)
IMPORT_C ssize_t  recv (int, void *, size_t, int)
IMPORT_C ssize_t  recvfrom (int, void *, size_t, int, struct sockaddr *__restrict, socklen_t *__restrict)
IMPORT_C ssize_t  recvmsg (int, struct msghdr *, int)
IMPORT_C ssize_t  send (int, const void *, size_t, int)
IMPORT_C ssize_t  sendto (int, const void *, size_t, int, const struct sockaddr *, socklen_t)
IMPORT_C ssize_t  sendmsg (int, const struct msghdr *, int)
IMPORT_C int  setsockopt (int, int, int, const void *, socklen_t)
IMPORT_C int  shutdown (int, int)
IMPORT_C int  sockatmark (int)
IMPORT_C int  socket (int, int, int)

Define Documentation

#define _NO_NAMESPACE_POLLUTION
 
#define _SS_ALIGNSIZE   (sizeof(__int64_t))
 
#define _SS_MAXSIZE   128U
 
#define _SS_PAD1SIZE
 

Value:

(_SS_ALIGNSIZE - sizeof(unsigned char) - \
                            sizeof(sa_family_t))
#define _SS_PAD2SIZE
 

Value:

(_SS_MAXSIZE - sizeof(unsigned char) - \
                            sizeof(sa_family_t) - _SS_PAD1SIZE - _SS_ALIGNSIZE)
#define AF_INET   2
 
#define AF_INET6   28
 
#define AF_UNIX   1
 
#define AF_UNSPEC   0
 
#define CMSG_DATA cmsg   ) 
 

Value:

((unsigned char *)(cmsg) + \
                                 _ALIGN(sizeof(struct cmsghdr)))
#define CMSG_FIRSTHDR mhdr   ) 
 

Value:

((mhdr)->msg_controllen >= sizeof(struct cmsghdr) ? \
         (struct cmsghdr *)(mhdr)->msg_control : \
         (struct cmsghdr *)NULL)
#define CMSG_NXTHDR mhdr,
cmsg   ) 
 

Value:

(((char *)(cmsg) + _ALIGN((cmsg)->cmsg_len) + \
          _ALIGN(sizeof(struct cmsghdr)) > \
            (char *)(mhdr)->msg_control + (mhdr)->msg_controllen) ? \
            (struct cmsghdr *)0 : \
            (struct cmsghdr *)((char *)(cmsg) + _ALIGN((cmsg)->cmsg_len)))
#define MSG_CTRUNC   0x20
 
#define MSG_DONTROUTE   0x4
 
#define MSG_EOR   0x8
 
#define MSG_OOB   0x1
 
#define MSG_PEEK   0x2
 
#define MSG_TRUNC   0x10
 
#define MSG_WAITALL   0x40
 
#define SCM_RIGHTS   0x01
 
#define SHUT_RD   0
 
#define SHUT_RDWR   2
 
#define SHUT_WR   1
 
#define SO_ACCEPTCONN   0x0002
 
#define SO_BROADCAST   0x0020
 
#define SO_DEBUG   0x0001
 
#define SO_DONTROUTE   0x0010
 
#define SO_ERROR   0x1007
 
#define SO_KEEPALIVE   0x0008
 
#define SO_LINGER   0x0080
 
#define SO_OOBINLINE   0x0100
 
#define SO_RCVBUF   0x1002
 
#define SO_RCVLOWAT   0x1004
 
#define SO_RCVTIMEO   0x1006
 
#define SO_REUSEADDR   0x0004
 
#define SO_SNDBUF   0x1001
 
#define SO_SNDLOWAT   0x1003
 
#define SO_SNDTIMEO   0x1005
 
#define SO_TYPE   0x1008
 
#define SOCK_DGRAM   2
 
#define SOCK_RAW   3
 
#define SOCK_SEQPACKET   5
 
#define SOCK_STREAM   1
 
#define SOL_SOCKET   0xffff
 
#define SOMAXCONN   128
 

Typedef Documentation

typedef __sa_family_t sa_family_t
 
typedef __socklen_t socklen_t
 
typedef __ssize_t ssize_t
 

Function Documentation

__BEGIN_DECLS IMPORT_C int accept int  ,
struct sockaddr __restrict,
socklen_t __restrict
 
IMPORT_C int bind int  ,
const struct sockaddr ,
socklen_t 
 
IMPORT_C int connect int  ,
const struct sockaddr ,
socklen_t 
 
IMPORT_C int getpeername int  ,
struct sockaddr __restrict,
socklen_t __restrict
 
IMPORT_C int getsockname int  ,
struct sockaddr __restrict,
socklen_t __restrict
 
IMPORT_C int getsockopt int  ,
int  ,
int  ,
void *  __restrict,
socklen_t __restrict
 
IMPORT_C int listen int  ,
int 
 
IMPORT_C ssize_t recv int  ,
void *  ,
size_t  ,
int 
 
IMPORT_C ssize_t recvfrom int  ,
void *  ,
size_t  ,
int  ,
struct sockaddr __restrict,
socklen_t __restrict
 
IMPORT_C ssize_t recvmsg int  ,
struct msghdr ,
int 
 
IMPORT_C ssize_t send int  ,
const void *  ,
size_t  ,
int 
 
IMPORT_C ssize_t sendmsg int  ,
const struct msghdr ,
int 
 
IMPORT_C ssize_t sendto int  ,
const void *  ,
size_t  ,
int  ,
const struct sockaddr ,
socklen_t 
 
IMPORT_C int setsockopt int  ,
int  ,
int  ,
const void *  ,
socklen_t 
 
IMPORT_C int shutdown int  ,
int 
 
IMPORT_C int sockatmark int   ) 
 
IMPORT_C int socket int  ,
int  ,
int 
 

Copyright © Nokia Corporation 2001-2008
Back to top