summaryrefslogtreecommitdiff
path: root/lib/tsocket
AgeCommit message (Collapse)AuthorFilesLines
2013-03-13tsocket: ENOMEM can be retried on illumos/Solaris.Ira Cooper1-0/+6
The writev system call can return -1 and errno ENOMEM, as a retriable condition. Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Mar 13 23:50:05 CET 2013 on sn-devel-104
2013-03-04tsocket_bsd: Attempt to increase the SO_SNDBUF if we get EMSGSIZE in sendto()Andrew Bartlett1-0/+26
This matches what was done for lib/socket/socket_unix.c in c692bb02b039ae8fef6ba968fd13b36ad7d62a72. (and is based on that patch by Landon Fuller <landonf@bikemonkey.org>) Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Mon Mar 4 11:15:35 CET 2013 on sn-devel-104
2012-11-05lib/tsocket: optimize syscalls in tstream_readv_pdu_send()Stefan Metzmacher1-0/+29
Once we've got the first part of a pdu we try to optimize readv calls for the rest of the pdu. Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-11-05lib/tsocket: disable the syscall optimization for recvfrom/readv by defaultStefan Metzmacher2-6/+109
We only do the optimization on recvfrom/readv if the caller asked for it. This is needed because in most cases we preferr to flush send buffers before receiving incoming requests. Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-10-23lib/tsocket: fix loop in tdgram_bsd_recvfrom() (bug #9184)Stefan Metzmacher1-1/+9
If the socket is not readable yet, we need to retry if tsocket_bsd_pending() returns 0. See also https://lists.samba.org/archive/samba-technical/2012-October/087164.html metze Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Oct 23 14:44:21 CEST 2012 on sn-devel-104
2012-09-22lib/tsocket: fix receiving of udp packets from 0 bytes (bug #9184)Stefan Metzmacher1-4/+1
It's possible for a client to send 0 bytes in a UDP packet, we need still need to call recvfrom() and skip the invalid packet at a higher level. Otherwise the kernel receive queue is blocked. metze
2012-04-17tsocket: Fix a couple of typos and spellings in tsocket_guide.txtMichael Adam1-26/+27
Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Tue Apr 17 14:41:53 CEST 2012 on sn-devel-104
2011-08-10tsocket: make use of tevent_queue_add_optimize_empty() to optimize for the ↵Stefan Metzmacher1-37/+48
empty queue case metze
2011-06-20Use tevent_req_oomVolker Lendecke1-3/+3
This fixes a few Coverity errors
2010-11-05tsocket: fill in sa.sa_len if the system supports itStefan Metzmacher1-0/+12
metze
2010-10-31s4: Remove the old perl/m4/make/mk-based build system.Jelmer Vernooij1-13/+0
The new waf-based build system now has all the same functionality, and the old build system has been broken for quite some time. Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sun Oct 31 02:01:44 UTC 2010 on sn-devel-104
2010-10-23tsocket: let tstream_inet_tcp_connect_recv() optionally return the used ↵Stefan Metzmacher2-5/+11
local address tstream_inet_tcp_connect_send() usually only gets no local port number and it may use the wildcard address '0.0.0.0' or '::'. tstream_inet_tcp_connect_recv() provides the used local address and port which are used on the wire. metze
2010-10-23tsocket: ask the kernel for the specific local address after a tcp connectStefan Metzmacher1-3/+54
metze
2010-10-04tsocket: make sure we delete the fd event before calling close()Stefan Metzmacher1-0/+1
We got random double free errors, when getting events from epoll_wait() and try to dereference the private talloc pointer attached to it. Before doing the close() in the tstream_disconnect_send() function we need to delete the fd event. commit 38f505530ba06323a56c7d3914630efffcd12629 only fixed it for tdgram sockets. metze
2010-09-28tsocket: make sure we delete the fd event before calling close()Stefan Metzmacher1-0/+1
We got random double free errors, when getting events from epoll_wait() and try to dereference the private talloc pointer attached to it. Before doing the close() in the tstream_disconnect_send() function we need to delete the fd event. metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Tue Sep 28 01:02:55 UTC 2010 on sn-devel-104
2010-09-15tsocket: we return -1 on error, not fdAndrew Tridgell1-7/+7
the code used this pattent: if (fd < 0) { ...various cleanups... return fd; } it is much clearer to do this: if (fd < 0) { ...various cleanups... return -1; } as otherwise when reading the code you think this function may return a fd. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-28Revert "lib/tsocket: sa_socklen is a macro on irix, so better use sasocklen"Stefan Metzmacher3-39/+39
This reverts commit 3d4fb698660381e650d7caeb5b7cff12847c0fb8. This was wrong... The problem was in the caller, sa_len is a macro on irix metze
2010-08-27lib/tsocket: sa_socklen is a macro on irix, so better use sasocklenStefan Metzmacher3-39/+39
metze
2010-08-15s3: Fix a typoVolker Lendecke1-1/+1
2010-07-11tsocket: Fix some unreachable codeVolker Lendecke1-2/+1
2010-06-21tsocket: Fix some type-punned warningsVolker Lendecke1-2/+2
2010-05-19tsocket: Improve the language in some parts of the guide.Simo Sorce1-41/+37
2010-05-05tsocket: Added the warning again to tsocket_address_bsd_sockaddr.Andreas Schneider1-0/+3
2010-05-03tsocket: Fixed the documentation of tsocket_address_bsd_sockaddr.Andreas Schneider1-6/+13
2010-04-27lib/tsocket: add tsocket_address_is_unix() functionStefan Metzmacher2-0/+29
metze
2010-04-27lib/tsocket: add tsocket_address_is_inet() functionStefan Metzmacher2-0/+54
metze
2010-04-24Revert "tsocket: not all systems have IPV6_V6ONLY"Stefan Metzmacher1-2/+2
This reverts commit 63fc3978089df403d7e63462593784ff3d05e6e7. We now don't support IPv6 when IPV6_V6ONLY isn't available, as we rely on the behavior. metze
2010-04-12s4-waf: inline LIBREPLACE_NETWORK into 'replace'Stefan Metzmacher1-1/+0
metze
2010-04-08tsocket_bsd: Always use a real length for the sa_socklen, and keep it aroundAndrew Bartlett1-68/+16
The previous code assumed the OS would happily accept sizeof(struct sockaddr_storage). It seems some versions of Solaris do not like this. Andrew Bartlett
2010-04-06s4-waf: removed the AUTOGENERATED markersAndrew Tridgell1-3/+0
we won't be using the mk -> wscript generator again
2010-04-06s4-waf: mark the wscript files as python so vim/emacs knows how to highlight ↵Andrew Tridgell1-0/+2
them
2010-04-06build: commit all the waf build files in the treeAndrew Tridgell1-0/+11
2010-03-26tsocket: not all systems have IPV6_V6ONLYAndrew Tridgell1-2/+2
2010-02-26tsocket: Improve the tsocket_address_bsd_sockaddr documentation.Andreas Schneider1-1/+3
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-22Spelling fixes for tsocket API documentation.Brad Hards1-14/+14
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2010-02-18tsocket/bsd: fix comment in tdgram_bsd_recvfrom_handler()Stefan Metzmacher1-2/+4
metze
2010-02-17Fix commit d07cd37b993d3c9beded20323174633b806196b5Jeremy Allison1-1/+4
Which was: tsocket/bsd: fix bug #7115 FreeBSD includes the UDP header in FIONREAD Metze, this has to have been wrong - you are throwing away the talloc_realloc pointer returned. Also no error checking. Please review. Thank goodness for gcc warnings :-). Jeremy.
2010-02-17tsocket/bsd: fix bug #7115 FreeBSD includes the UDP header in FIONREADStefan Metzmacher1-4/+6
metze
2010-02-17tsocket/bsd: set IPV6_V6ONLY on AF_INET6 socketsStefan Metzmacher1-0/+36
Some system already have this as default. It's easier to behave the same way on all systems and handle ipv6 and ipv4 sockets separate. metze
2010-02-17tsocket/bsd: fix bug #7140 autodetect ipv4 and ipv6 based on the remote ↵Stefan Metzmacher1-2/+53
address if the local address is any metze
2010-02-17tsocket/bsd: fix bug #7140 use calculated sa_socklen for bind() in ↵Stefan Metzmacher1-1/+1
tstream_bsd_connect_send() This is needed because, we can't use sizeof(sockaddr_storage) for AF_UNIX sockets. Also some platforms require exact values for AF_INET and AF_INET6. metze
2010-02-17tsocket/bsd: fix do_bind logic for AF_INETStefan Metzmacher1-2/+2
We want the explicit bind() when we don't use the any address. metze
2010-01-28tsocket: Fix the description of tstream_writev_queue_send/recvKai Blin1-6/+6
2010-01-28tsocket: Fix description for tstream_readv_pdu_queue_send/recvKai Blin1-7/+6
2010-01-11tsocket: Added doxygen config file.Andreas Schneider1-0/+1538
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-01-11tsocket: Added complete doxygen documentation.Andreas Schneider2-63/+834
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-12-24tsocket: only copy the specific part of sockaddr*Stefan Metzmacher1-0/+5
This makes sure we fill the unspefic bytes with 0 and have zero termination for sockaddr_un. metze
2009-12-24tsocket: allow AF_UNIX sockaddrs smaller than sizeof(sockaddr_un)Stefan Metzmacher1-4/+5
This is needed as getpeername() truncates the length to 2 if the peer socket has no name. metze
2009-12-15tsocket: Fixed tsocket_guide.txt asciidoc syntax.Andreas Schneider1-148/+161
2009-12-15tsocket: Fixed documentation for tsocket_address_bsd_sockaddr().Andreas Schneider1-6/+5