CHATGPT AI
define
__SYS_SOCKET_H
#include <sys/types.h>
/*
* Definitions related to sockets: types, address families, options.
*/
/*
* Types
*/
#define SOCK_STREAM 1 /* stream socket */
#define SOCK_DGRAM 2 /* datagram socket */
#define SOCK_RAW 3 /* raw-protocol interface */
/*
* Option flags per-socket.
*/
#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 */
/* allow bind to same port on different IPs (not supported)*/ /* not supported yet*/ #define SO_REUSEPORT 0x0008 /* allow local address and port reuse*/ #define SO_KEEPALIVE 0x0010 /* keep connections alive and send KEEPALIVE packets when idle for more than xx seconds*/ #define SO_DONTROUTE 0x0020 /* just use interface addresses*/ #define SO_BROADCAST 0x0040 /* permit sending of broadcast messages (not supported)*/ #define SO_USELOOPBACK 0x0080 /* bypass hardware when possible (not supported)*/ #define SO_LINGER 0x0100 /* linger on close if data present (not supported)*/ #define SO_OOBINLINE 0x0200 /* leave received OOB data in line (not supported)*/ #ifndef _POSIX_SOURCE # define SO_DONTLINGER (int)(~SO_LINGER) /* ~SO_LINGER */ #endif /* POSIX SOURCE */ /* additional options, not kept in so_options */ #ifndef _POSIX
#include <sys/types.h>
/*
* Definitions related to sockets: types, address families, options.
*/
/*
* Types
*/
#define SOCK_STREAM 1 /* stream socket */
#define SOCK_DGRAM 2 /* datagram socket */
#define SOCK_RAW 3 /* raw-protocol interface */
/*
* Option flags per-socket.
*/
#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 */
/* allow bind to same port on different IPs (not supported)*/ /* not supported yet*/ #define SO_REUSEPORT 0x0008 /* allow local address and port reuse*/ #define SO_KEEPALIVE 0x0010 /* keep connections alive and send KEEPALIVE packets when idle for more than xx seconds*/ #define SO_DONTROUTE 0x0020 /* just use interface addresses*/ #define SO_BROADCAST 0x0040 /* permit sending of broadcast messages (not supported)*/ #define SO_USELOOPBACK 0x0080 /* bypass hardware when possible (not supported)*/ #define SO_LINGER 0x0100 /* linger on close if data present (not supported)*/ #define SO_OOBINLINE 0x0200 /* leave received OOB data in line (not supported)*/ #ifndef _POSIX_SOURCE # define SO_DONTLINGER (int)(~SO_LINGER) /* ~SO_LINGER */ #endif /* POSIX SOURCE */ /* additional options, not kept in so_options */ #ifndef _POSIX
__SYS_SOCKET_H
#include <sys/types.h>
/*
* Definitions related to sockets: types, address families, options.
*/
/*
* Types
*/
#define SOCK_STREAM 1 /* stream socket */
#define SOCK_DGRAM 2 /* datagram socket */
#define SOCK_RAW 3 /* raw-protocol interface */
/*
* Option flags per-socket.
*/
#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 */
/* allow bind to same port on different IPs (not supported)*/ /* not supported yet*/ #define SO_REUSEPORT 0x0008 /* allow local address and port reuse*/ #define SO_KEEPALIVE 0x0010 /* keep connections alive and send KEEPALIVE packets when idle for more than xx seconds*/ #define SO_DONTROUTE 0x0020 /* just use interface addresses*/ #define SO_BROADCAST 0x0040 /* permit sending of broadcast messages (not supported)*/ #define SO_USELOOPBACK 0x0080 /* bypass hardware when possible (not supported)*/ #define SO_LINGER 0x0100 /* linger on close if data present (not supported)*/ #define SO_OOBINLINE 0x0200 /* leave received OOB data in line (not supported)*/ #ifndef _POSIX_SOURCE # define SO_DONTLINGER (int)(~SO_LINGER) /* ~SO_LINGER */ #endif /* POSIX SOURCE */ /* additional options, not kept in so_options */ #ifndef _POSIX
0 Comments & Tags
0 Parts
1 Vue