diff options
author | Vladimir Zapolskiy <vzapolskiy@gmail.com> | 2010-06-01 20:02:39 +0400 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2010-06-01 12:39:15 -0700 |
commit | 83333e9c873e4eca6b2c945f7770b1f5373b0427 (patch) | |
tree | 180a78c4fea20bcfab59fc73c615e44c2ca13bb3 /libc/sysdeps/linux/common/bits/socket.h | |
parent | b2c4199f0fd53c009858e7ce27f932a4ac92bc60 (diff) |
bits/socket.h: add SOCK_CLOEXEC and SOCK_NONBLOCK support
This patch adds support for SOCK_CLOEXEC and SOCK_NONBLOCK socket
descriptor flags, which are introduced since Linux 2.6.27
Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'libc/sysdeps/linux/common/bits/socket.h')
-rw-r--r-- | libc/sysdeps/linux/common/bits/socket.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/common/bits/socket.h b/libc/sysdeps/linux/common/bits/socket.h index ac5a4336b..11f6e9715 100644 --- a/libc/sysdeps/linux/common/bits/socket.h +++ b/libc/sysdeps/linux/common/bits/socket.h @@ -53,10 +53,20 @@ enum __socket_type SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, datagrams of fixed maximum length. */ #define SOCK_SEQPACKET SOCK_SEQPACKET - SOCK_PACKET = 10 /* Linux specific way of getting packets + SOCK_PACKET = 10, /* Linux specific way of getting packets at the dev level. For writing rarp and other similar things on the user level. */ #define SOCK_PACKET SOCK_PACKET + + /* Flags to be ORed into the type parameter of socket and socketpair and + used for the flags parameter of paccept. */ + + SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the + new descriptor(s). */ +#define SOCK_CLOEXEC SOCK_CLOEXEC + SOCK_NONBLOCK = 04000 /* Atomically mark descriptor(s) as + non-blocking. */ +#define SOCK_NONBLOCK SOCK_NONBLOCK }; /* Protocol families. */ |