1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
samba-mirror/lib/tsocket
Ralph Boehme 574313a1e1 lib/tsocket: workaround sockets not supporting FIONREAD
Netlink sockets don't support querying pending bytes with ioctl(fd,
FIONREAD, ...) and would return EOPNOTSUPP, so use recvmsg() with
MSG_PEEK|MSG_TRUNC as a fallback.

The MSG_TRUNC flag to recvmsg() is Linux only, but netlink is as well,
so we're safe for now.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=11714

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Feb 10 10:30:24 CET 2016 on sn-devel-144
2016-02-10 10:30:23 +01:00
..
doxy.config tsocket: Added doxygen config file. 2010-01-11 11:23:04 +01:00
tsocket_bsd.c lib/tsocket: workaround sockets not supporting FIONREAD 2016-02-10 10:30:23 +01:00
tsocket_guide.txt tsocket: Fix a couple of typos and spellings in tsocket_guide.txt 2012-04-17 14:41:52 +02:00
tsocket_helpers.c lib/tsocket: optimize syscalls in tstream_readv_pdu_send() 2012-11-05 17:13:40 +01:00
tsocket_internal.h tsocket: Fixed typo in LGPL header. 2009-12-15 23:34:22 +01:00
tsocket.c tsocket: Fix some unreachable code 2010-07-11 18:14:33 +02:00
tsocket.h lib/tsocket: add tdgram_inet_udp_broadcast_socket() 2015-06-12 17:08:17 +02:00
wscript_build tsocket: Use common code in tsocket_bsd_common_prepare_fd 2015-06-05 14:33:19 +02:00