1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
Commit Graph

26 Commits

Author SHA1 Message Date
Volker Lendecke
e593f96960 lib: Make accept_recv() return the listening socket
This is helpful if you are in a listening loop with the same receiver
for many sockets doing the same thing.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-01-22 19:54:38 +00:00
Volker Lendecke
40e4958953 lib: Make accept_recv() return struct samba_sockaddr
Avoid casting problems by using the samba_sockaddr union

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-01-22 19:54:38 +00:00
Volker Lendecke
6d26d7253e lib: Add accept_send/recv
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-06-07 14:34:10 +02:00
Uri Simchoni
0c6dc1ecf9 async_req: check for errors when monitoring socket for readability
Add an option to wait_for_read_send(), so that the request, upon
calling back, report whether the socket actually contains data
or is in EOF/error state. EOF is signalled via the EPIPE error.

This is useful for clients which do not expect data to arrive but
wait for readability to detect a closed socket (i.e. they do not
intend to actually read the socket when it's readable). Actual data
arrival would indicate a bug in this case, so the check can
be used to print an error message.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11397

Signed-off-by: Uri Simchoni <urisimchoni@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2015-07-15 22:41:13 +02:00
Stefan Metzmacher
ccd038e152 lib/async_req: remove unused sendto_{send,recv} and recvfrom_{send,recv}
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2015-06-12 17:08:17 +02:00
Volker Lendecke
d67e614a07 lib: Add before/after hooks to async_connect
This will facilitiate [un]become_root for smbd to connect safely to ctdbd.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
2013-05-17 11:22:45 +02:00
Volker Lendecke
849648cdb2 lib: Make async_sock includable on its own
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Sep 25 18:03:46 CEST 2012 on sn-devel-104
2012-09-25 18:03:46 +02:00
Volker Lendecke
4281967990 Add wait_for_read_send/recv
Wait for readability of a socket as a tevent_req
2011-07-28 17:42:22 +02:00
Volker Lendecke
65f4f22cb4 Use sockaddr_storage in async sendto/recvfrom 2010-12-29 22:44:06 +01:00
Volker Lendecke
c4b18bd860 async_send->sendto, async_recv->recvfrom 2010-12-28 12:59:11 +01:00
Stefan Metzmacher
faabc97c9a async_sock: try fix the source4 build on FreeBSD, Solaris, SLES8
metze
2009-06-08 09:40:06 +02:00
Volker Lendecke
9d8766e176 async_sock: Change license to LGPLv3+ 2009-05-29 18:17:38 +02:00
Volker Lendecke
a8e02b591b Add "err_on_readability" to writev_send
A socket where the other side has closed only becomes readable. To catch
errors early when sitting in a pure writev, we need to also test for
readability.
2009-05-24 13:47:29 +02:00
Volker Lendecke
ccd293ba0e Remove async_req 2009-04-08 23:11:59 +02:00
Volker Lendecke
fe486d7b9f Add "queue" to writev_send
Unless higher levels queue themselves somehow, writev will *always* be queued.
So the queueing should be done at the right level.
2009-03-08 11:20:59 +01:00
Volker Lendecke
423c1d88fc Remove async_req based async_send 2009-02-25 13:04:19 +01:00
Volker Lendecke
00ad0c4a43 Remove async_req based async_recv 2009-02-25 13:04:18 +01:00
Volker Lendecke
25df6d7413 Add more conventional async_recv 2009-02-24 20:40:48 +01:00
Volker Lendecke
a60480b71a Add more conventional async_send 2009-02-24 20:40:48 +01:00
Volker Lendecke
bbbdfa2056 Remove unused recvall 2009-02-24 20:40:48 +01:00
Volker Lendecke
4021029cdd Add async read_packet 2009-02-24 20:40:47 +01:00
Volker Lendecke
e50075a580 Remove async sendall 2009-02-24 20:40:47 +01:00
Volker Lendecke
76c6330dfb Add async writev 2009-02-24 20:40:47 +01:00
Volker Lendecke
39976035eb Convert async_connect to tevent_req 2009-02-24 20:40:47 +01:00
Kai Blin
c3b9b6c8aa async_sock: Use unix errnos instead of NTSTATUS
This also switches wb_reqtrans to use wbcErr instead of NTSTATUS as it would
be pointless to convert to errno first and to wbcErr later.
2009-02-09 08:36:08 +01:00
Kai Blin
ab63bad94b async_sock: Move to top level 2009-01-28 11:35:32 +01:00