/*
* Copyright 1989 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Copyright (c) 1982, 1985, 1986 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*/
/*
* Definitions related to sockets: types, address families, options.
*/
/*
* Types
*/
#
define SOCK_RAW 3 /* raw-protocol interface */#
define SOCK_RDM 4 /* reliably-delivered message */
/*
* Option flags per-socket.
*/
#
define SO_DEBUG 0x0001 /* turn on debugging info recording */#
define SO_DONTROUTE 0x0010 /* just use interface addresses */#
define SO_BROADCAST 0x0020 /* permit sending of broadcast msgs */#
define SO_LINGER 0x0080 /* linger on close if data present */#
define SO_OOBINLINE 0x0100 /* leave received OOB data in line *//*
* N.B.: The following definition is present only for compatibility
* with release 3.0. It will disappear in later releases.
*/
/*
* Additional options, not kept in so_options.
*/
#
define SO_SNDBUF 0x1001 /* send buffer size */#
define SO_RCVBUF 0x1002 /* receive buffer size */#
define SO_RCVLOWAT 0x1004 /* receive low-water mark */#
define SO_ERROR 0x1007 /* get error status and clear */#
define SO_TYPE 0x1008 /* get socket type */
/*
* Structure used for manipulating linger option.
*/
};
/*
* Level number for (get/set)sockopt() to apply to socket itself. */
#
define SOL_SOCKET 0xffff /* options for socket level */
/*
* Address families.
*/
#
define AF_UNIX 1 /* local to host (pipes, portals) */#
define AF_INET 2 /* internetwork: UDP, TCP, etc. */#
define AF_PUP 4 /* pup protocols: e.g. BSP */#
define AF_CHAOS 5 /* mit CHAOS protocols */#
define AF_NS 6 /* XEROX NS protocols */#
define AF_NBS 7 /* nbs protocols */#
define AF_ECMA 8 /* european computer manufacturers */#
define AF_CCITT 10 /* CCITT protocols, X.25 etc */#
define AF_SNA 11 /* IBM SNA */#
define AF_DLI 13 /* Direct data link interface */
#
define AF_NIT 17 /* Network Interface Tap */#
define AF_802 18 /* IEEE 802.2, also ISO 8802 */#
define AF_OSI 19 /* umbrella for all families used * by OSI (e.g. protosw lookup) */
#
define AF_X25 20 /* CCITT X.25 in particular */#
define AF_GOSIP 22 /* U.S. Government OSI */
/*
* Structure used by kernel to store most
* addresses.
*/
char sa_data[
14];
/* up to 14 bytes of direct address */ };
/*
* Structure used by kernel to pass protocol
* information in raw sockets.
*/
};
/*
* Protocol families, same as address families for now.
*/
/*
* Maximum queue length specifiable by listen.
*/
/*
* Message header for recvmsg and sendmsg calls.
*/
};
#
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 */
#endif /*!_sys_socket_h*/