|
Packit |
6c4009 |
/* Define enum __socket_type for generic Linux.
|
|
Packit |
6c4009 |
Copyright (C) 1991-2018 Free Software Foundation, Inc.
|
|
Packit |
6c4009 |
This file is part of the GNU C Library.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
The GNU C Library is free software; you can redistribute it and/or
|
|
Packit |
6c4009 |
modify it under the terms of the GNU Lesser General Public
|
|
Packit |
6c4009 |
License as published by the Free Software Foundation; either
|
|
Packit |
6c4009 |
version 2.1 of the License, or (at your option) any later version.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
The GNU C Library is distributed in the hope that it will be useful,
|
|
Packit |
6c4009 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
6c4009 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
6c4009 |
Lesser General Public License for more details.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
You should have received a copy of the GNU Lesser General Public
|
|
Packit |
6c4009 |
License along with the GNU C Library; if not, see
|
|
Packit |
6c4009 |
<http://www.gnu.org/licenses/>. */
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#ifndef _SYS_SOCKET_H
|
|
Packit |
6c4009 |
# error "Never include <bits/socket_type.h> directly; use <sys/socket.h> instead."
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Types of sockets. */
|
|
Packit |
6c4009 |
enum __socket_type
|
|
Packit |
6c4009 |
{
|
|
Packit |
6c4009 |
SOCK_STREAM = 1, /* Sequenced, reliable, connection-based
|
|
Packit |
6c4009 |
byte streams. */
|
|
Packit |
6c4009 |
#define SOCK_STREAM SOCK_STREAM
|
|
Packit |
6c4009 |
SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams
|
|
Packit |
6c4009 |
of fixed maximum length. */
|
|
Packit |
6c4009 |
#define SOCK_DGRAM SOCK_DGRAM
|
|
Packit |
6c4009 |
SOCK_RAW = 3, /* Raw protocol interface. */
|
|
Packit |
6c4009 |
#define SOCK_RAW SOCK_RAW
|
|
Packit |
6c4009 |
SOCK_RDM = 4, /* Reliably-delivered messages. */
|
|
Packit |
6c4009 |
#define SOCK_RDM SOCK_RDM
|
|
Packit |
6c4009 |
SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based,
|
|
Packit |
6c4009 |
datagrams of fixed maximum length. */
|
|
Packit |
6c4009 |
#define SOCK_SEQPACKET SOCK_SEQPACKET
|
|
Packit |
6c4009 |
SOCK_DCCP = 6, /* Datagram Congestion Control Protocol. */
|
|
Packit |
6c4009 |
#define SOCK_DCCP SOCK_DCCP
|
|
Packit |
6c4009 |
SOCK_PACKET = 10, /* Linux specific way of getting packets
|
|
Packit |
6c4009 |
at the dev level. For writing rarp and
|
|
Packit |
6c4009 |
other similar things on the user level. */
|
|
Packit |
6c4009 |
#define SOCK_PACKET SOCK_PACKET
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Flags to be ORed into the type parameter of socket and socketpair and
|
|
Packit |
6c4009 |
used for the flags parameter of paccept. */
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the
|
|
Packit |
6c4009 |
new descriptor(s). */
|
|
Packit |
6c4009 |
#define SOCK_CLOEXEC SOCK_CLOEXEC
|
|
Packit |
6c4009 |
SOCK_NONBLOCK = 00004000 /* Atomically mark descriptor(s) as
|
|
Packit |
6c4009 |
non-blocking. */
|
|
Packit |
6c4009 |
#define SOCK_NONBLOCK SOCK_NONBLOCK
|
|
Packit |
6c4009 |
};
|