Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Typedefs | Functions
socket.h File Reference
#include <sys/cdefs.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  linger
struct  sockaddr
struct  msghdr
struct  cmsghdr

Defines

#define SOCK_STREAM   1 /* stream socket */
#define SOCK_DGRAM   2 /* datagram socket */
#define SOCK_RAW   3 /* raw-protocol interface */
#define SOCK_RDM   4 /* reliably-delivered message */
#define SOCK_SEQPACKET   5 /* sequenced packet stream */
#define SO_DEBUG   0x0001 /* turn on debugging info recording */
#define SO_ACCEPTCONN   0x0002 /* socket has had listen() */
#define SO_REUSEADDR   0x0004 /* allow local address reuse */
#define SO_KEEPALIVE   0x0008 /* keep connections alive */
#define SO_DONTROUTE   0x0010 /* just use interface addresses */
#define SO_BROADCAST   0x0020 /* permit sending of broadcast msgs */
#define SO_USELOOPBACK   0x0040 /* bypass hardware when possible */
#define SO_LINGER   0x0080 /* linger on close if data present */
#define SO_OOBINLINE   0x0100 /* leave received OOB data in line */
#define SO_REUSEPORT   0x0200 /* allow local address & port reuse */
#define SO_SNDBUF   0x1001 /* send buffer size */
#define SO_RCVBUF   0x1002 /* receive buffer size */
#define SO_SNDLOWAT   0x1003 /* send low-water mark */
#define SO_RCVLOWAT   0x1004 /* receive low-water mark */
#define SO_SNDTIMEO   0x1005 /* send timeout */
#define SO_RCVTIMEO   0x1006 /* receive timeout */
#define SO_ERROR   0x1007 /* get error status and clear */
#define SO_TYPE   0x1008 /* get socket type */
#define SOL_SOCKET   0xffff /* options for socket level */
#define AF_UNSPEC   0 /* unspecified */
#define AF_LOCAL   1 /* local to host (pipes, portals) */
#define AF_UNIX   AF_LOCAL /* backward compatibility */
#define AF_INET   2 /* internetwork: UDP, TCP, etc. */
#define AF_PPC   3 /* PPC Toolbox */
#define AF_PAP   4 /* Printer Access Protocol */
#define AF_APPLETALK   16 /* Apple Talk */
#define ATALK_SYMADDR   272 /* Symbolic Address for AppleTalk */
#define AF_MAX   20
#define PF_UNSPEC   0 /* unspecified */
#define PF_LOCAL   1 /* local to host (pipes, portals) */
#define PF_UNIX   AF_LOCAL /* backward compatibility */
#define PF_INET   2 /* internetwork: UDP, TCP, etc. */
#define PF_PPC   3 /* PPC Toolbox */
#define PF_PAP   4 /* Printer Access Protocol */
#define PF_APPLETALK   16 /* Apple Talk */
#define SHUT_RD   0
#define SHUT_WR   1
#define SHUT_RDWR   2
#define _SA_FAMILY_T_DEFINED
#define NET_MAXID   AF_MAX
#define CTL_NET_NAMES
#define NET_RT_DUMP   1 /* dump; may limit to a.f. */
#define NET_RT_FLAGS   2 /* by flags, e.g. RESOLVING */
#define NET_RT_IFLIST   3 /* survey interface list */
#define NET_RT_MAXID   4
#define CTL_NET_RT_NAMES
#define SOMAXCONN   5
#define MSG_OOB   0x1 /* process out-of-band data */
#define MSG_PEEK   0x2 /* peek at incoming message */
#define MSG_DONTROUTE   0x4 /* send without using routing tables */
#define MSG_EOR   0x8 /* data completes record */
#define MSG_TRUNC   0x10 /* data discarded before delivery */
#define MSG_CTRUNC   0x20 /* control data lost before delivery */
#define MSG_WAITALL   0x40 /* wait for full request or error */
#define MSG_DONTWAIT   0x80 /* this message should be nonblocking */
#define CMSG_DATA(cmsg)   ((u_char *)((cmsg) + 1))
#define CMSG_NXTHDR(mhdr, cmsg)
#define CMSG_FIRSTHDR(mhdr)   ((struct cmsghdr *)(mhdr)->msg_control)
#define SCM_RIGHTS   0x01 /* access rights (array of int) */

Typedefs

typedef unsigned socklen_t
typedef unsigned short sa_family_t

Functions

__BEGIN_DECLS int accept __P ((int, struct sockaddr *, socklen_t *))
int bind __P ((int, const struct sockaddr *, socklen_t))
int getsockopt __P ((int, int, int, void *, socklen_t *))
int listen __P ((int, int))
ssize_t recv __P ((int, void *, size_t, int))
ssize_t recvfrom __P ((int, void *, size_t, int, struct sockaddr *, socklen_t *))
ssize_t recvmsg __P ((int, struct msghdr *, int))
ssize_t send __P ((int, const void *, size_t, int))
ssize_t sendto __P ((int, const void *, size_t, int, const struct sockaddr *, socklen_t))
ssize_t sendmsg __P ((int, const struct msghdr *, int))
int setsockopt __P ((int, int, int, const void *, socklen_t))
int socket __P ((int, int, int))
int socketpair __P ((int, int, int, int *))

Class Documentation

struct linger

Definition at line 228 of file macsocket.h.

Collaboration diagram for linger:
Class Members
int l_linger
int l_onoff
struct sockaddr

Definition at line 66 of file macsocket.h.

Class Members
char sa_data
unsigned char sa_family
sa_family_t sa_family
unsigned char sa_len
struct msghdr

Definition at line 196 of file socket.h.

Collaboration diagram for msghdr:
Class Members
void * msg_control
socklen_t msg_controllen
int msg_flags
struct iovec * msg_iov
int msg_iovlen
void * msg_name
socklen_t msg_namelen
struct cmsghdr

Definition at line 221 of file socket.h.

Collaboration diagram for cmsghdr:
Class Members
socklen_t cmsg_len
int cmsg_level
int cmsg_type

Define Documentation

Definition at line 124 of file socket.h.

#define AF_APPLETALK   16 /* Apple Talk */

Definition at line 104 of file socket.h.

#define AF_INET   2 /* internetwork: UDP, TCP, etc. */

Definition at line 101 of file socket.h.

#define AF_LOCAL   1 /* local to host (pipes, portals) */

Definition at line 99 of file socket.h.

#define AF_MAX   20

Definition at line 108 of file socket.h.

#define AF_PAP   4 /* Printer Access Protocol */

Definition at line 103 of file socket.h.

#define AF_PPC   3 /* PPC Toolbox */

Definition at line 102 of file socket.h.

#define AF_UNIX   AF_LOCAL /* backward compatibility */

Definition at line 100 of file socket.h.

#define AF_UNSPEC   0 /* unspecified */

Definition at line 98 of file socket.h.

#define ATALK_SYMADDR   272 /* Symbolic Address for AppleTalk */

Definition at line 106 of file socket.h.

#define CMSG_DATA (   cmsg)    ((u_char *)((cmsg) + 1))

Definition at line 229 of file socket.h.

#define CMSG_FIRSTHDR (   mhdr)    ((struct cmsghdr *)(mhdr)->msg_control)

Definition at line 238 of file socket.h.

#define CMSG_NXTHDR (   mhdr,
  cmsg 
)
Value:
(((caddr_t)(cmsg) + (cmsg)->cmsg_len + sizeof(struct cmsghdr) > \
           (mhdr)->msg_control + (mhdr)->msg_controllen) ? \
           (struct cmsghdr *)NULL : \
           (struct cmsghdr *)((caddr_t)(cmsg) + ALIGN((cmsg)->cmsg_len)))

Definition at line 232 of file socket.h.

Value:
{ \
       { 0, 0 }, \
       { "unix", CTLTYPE_NODE }, \
       { "inet", CTLTYPE_NODE }, \
       { "ppc", CTLTYPE_NODE }, \
       { "pap", CTLTYPE_NODE }, \
       { "", CTLTYPE_NODE }, \
       { "", CTLTYPE_NODE }, \
       { "", CTLTYPE_NODE }, \
       { "", CTLTYPE_NODE }, \
       { "", CTLTYPE_NODE }, \
       { "", CTLTYPE_NODE }, \
       { "", CTLTYPE_NODE }, \
       { "", CTLTYPE_NODE }, \
       { "", CTLTYPE_NODE }, \
       { "", CTLTYPE_NODE }, \
       { "", CTLTYPE_NODE }, \
       { "appletalk", CTLTYPE_NODE }, \
}

Definition at line 147 of file socket.h.

Value:
{ \
       { 0, 0 }, \
       { "dump", CTLTYPE_STRUCT }, \
       { "flags", CTLTYPE_STRUCT }, \
       { "iflist", CTLTYPE_STRUCT }, \
}

Definition at line 180 of file socket.h.

#define MSG_CTRUNC   0x20 /* control data lost before delivery */

Definition at line 211 of file socket.h.

#define MSG_DONTROUTE   0x4 /* send without using routing tables */

Definition at line 208 of file socket.h.

#define MSG_DONTWAIT   0x80 /* this message should be nonblocking */

Definition at line 213 of file socket.h.

#define MSG_EOR   0x8 /* data completes record */

Definition at line 209 of file socket.h.

#define MSG_OOB   0x1 /* process out-of-band data */

Definition at line 206 of file socket.h.

#define MSG_PEEK   0x2 /* peek at incoming message */

Definition at line 207 of file socket.h.

#define MSG_TRUNC   0x10 /* data discarded before delivery */

Definition at line 210 of file socket.h.

#define MSG_WAITALL   0x40 /* wait for full request or error */

Definition at line 212 of file socket.h.

Definition at line 145 of file socket.h.

#define NET_RT_DUMP   1 /* dump; may limit to a.f. */

Definition at line 175 of file socket.h.

#define NET_RT_FLAGS   2 /* by flags, e.g. RESOLVING */

Definition at line 176 of file socket.h.

#define NET_RT_IFLIST   3 /* survey interface list */

Definition at line 177 of file socket.h.

Definition at line 178 of file socket.h.

#define PF_APPLETALK   16 /* Apple Talk */

Definition at line 116 of file socket.h.

#define PF_INET   2 /* internetwork: UDP, TCP, etc. */

Definition at line 113 of file socket.h.

#define PF_LOCAL   1 /* local to host (pipes, portals) */

Definition at line 111 of file socket.h.

#define PF_PAP   4 /* Printer Access Protocol */

Definition at line 115 of file socket.h.

#define PF_PPC   3 /* PPC Toolbox */

Definition at line 114 of file socket.h.

#define PF_UNIX   AF_LOCAL /* backward compatibility */

Definition at line 112 of file socket.h.

#define PF_UNSPEC   0 /* unspecified */

Definition at line 110 of file socket.h.

#define SCM_RIGHTS   0x01 /* access rights (array of int) */

Definition at line 241 of file socket.h.

#define SHUT_RD   0

Definition at line 119 of file socket.h.

#define SHUT_RDWR   2

Definition at line 121 of file socket.h.

#define SHUT_WR   1

Definition at line 120 of file socket.h.

#define SO_ACCEPTCONN   0x0002 /* socket has had listen() */

Definition at line 57 of file socket.h.

#define SO_BROADCAST   0x0020 /* permit sending of broadcast msgs */

Definition at line 61 of file socket.h.

#define SO_DEBUG   0x0001 /* turn on debugging info recording */

Definition at line 56 of file socket.h.

#define SO_DONTROUTE   0x0010 /* just use interface addresses */

Definition at line 60 of file socket.h.

#define SO_ERROR   0x1007 /* get error status and clear */

Definition at line 76 of file socket.h.

#define SO_KEEPALIVE   0x0008 /* keep connections alive */

Definition at line 59 of file socket.h.

#define SO_LINGER   0x0080 /* linger on close if data present */

Definition at line 63 of file socket.h.

#define SO_OOBINLINE   0x0100 /* leave received OOB data in line */

Definition at line 64 of file socket.h.

#define SO_RCVBUF   0x1002 /* receive buffer size */

Definition at line 71 of file socket.h.

#define SO_RCVLOWAT   0x1004 /* receive low-water mark */

Definition at line 73 of file socket.h.

#define SO_RCVTIMEO   0x1006 /* receive timeout */

Definition at line 75 of file socket.h.

#define SO_REUSEADDR   0x0004 /* allow local address reuse */

Definition at line 58 of file socket.h.

#define SO_REUSEPORT   0x0200 /* allow local address & port reuse */

Definition at line 65 of file socket.h.

#define SO_SNDBUF   0x1001 /* send buffer size */

Definition at line 70 of file socket.h.

#define SO_SNDLOWAT   0x1003 /* send low-water mark */

Definition at line 72 of file socket.h.

#define SO_SNDTIMEO   0x1005 /* send timeout */

Definition at line 74 of file socket.h.

#define SO_TYPE   0x1008 /* get socket type */

Definition at line 77 of file socket.h.

#define SO_USELOOPBACK   0x0040 /* bypass hardware when possible */

Definition at line 62 of file socket.h.

#define SOCK_DGRAM   2 /* datagram socket */

Definition at line 48 of file socket.h.

#define SOCK_RAW   3 /* raw-protocol interface */

Definition at line 49 of file socket.h.

#define SOCK_RDM   4 /* reliably-delivered message */

Definition at line 50 of file socket.h.

#define SOCK_SEQPACKET   5 /* sequenced packet stream */

Definition at line 51 of file socket.h.

Definition at line 47 of file socket.h.

#define SOL_SOCKET   0xffff /* options for socket level */

Definition at line 93 of file socket.h.

#define SOMAXCONN   5

Definition at line 190 of file socket.h.


Typedef Documentation

typedef unsigned short sa_family_t

Definition at line 125 of file socket.h.

typedef unsigned socklen_t

Definition at line 80 of file socket.h.


Function Documentation

int getsockname __P ( (int, struct sockaddr *, socklen_t *)  )
int connect __P ( (int, const struct sockaddr *, socklen_t )
int listen __P ( (int, int )
ssize_t recv __P ( (int, void *, size_t, int )
ssize_t recvfrom __P ( (int, void *, size_t, int, struct sockaddr *, socklen_t *)  )
ssize_t recvmsg __P ( (int, struct msghdr *, int )
ssize_t send __P ( (int, const void *, size_t, int )
ssize_t sendto __P ( (int, const void *, size_t, int, const struct sockaddr *, socklen_t )
ssize_t sendmsg __P ( (int, const struct msghdr *, int )
int fchown __P ( (int, int, int )
int socketpair __P ( (int, int, int, int *)  )