summaryrefslogtreecommitdiff
path: root/lib/tsocket/tsocket.h
AgeCommit message (Collapse)AuthorFilesLines
2025-06-18lib/tsocket: add tstream_monitor_send/recv infrastructureStefan Metzmacher1-0/+34
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2023-10-24lib/tsocket: add tstream_bsd_fail_readv_first_error()Stefan Metzmacher1-0/+22
This gives the caller the option to fail immediately if TEVENT_FD_ERROR appear even with pending bytes in the recv queue. Servers typically want to activate this in order to avoid pointless work, while clients typically want to read pending responses from the recv queue. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-08-14tsocket: Fix code spellingJoseph Sutton1-7/+7
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-04-14lib:tsocket: Fix code spellingAndreas Schneider1-2/+2
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2021-09-28lib/tsocket: new function to parse host port strs.Matthew Grant1-0/+43
tsocket_address_inet_from_hostport_strings() on top of tsocket_address_inet_from_strings(), implementing the ability to parse a port number appended to an IPv6 or IPv4 address. IPv6 addresses can also optionally have square brackets around them, but these are needed to specify the port number as colon is used to delimit port from the IP address in the string. Note that this code just recognises and parses the strings with port given, or just IPv6 with square brackets. The rest of the parsing is passed on to tsocket_address_inet_from strings(), and errors from there passed back up the stack. Signed-off-by: Matthew Grant <grantma@mattgrant.net.nz> Reviewed-by: Uri Simchoni <uri@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2020-02-28Rename macro argument s_addr due to it already being definedPeter Eriksson1-4/+4
Signed-off-by: Peter Eriksson <pen@lysator.liu.se> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-09-01Spelling fixes s/implentation/implementation/Mathieu Parent1-1/+1
Signed-off-by: Mathieu Parent <math.parent@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2019-07-22lib:tsocket: New function to build a tsocket_context from samba_addressSamuel Cabrero1-0/+27
Signed-off-by: Samuel Cabrero <scabrero@suse.de> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2019-03-22tsocket: Simplify tsocket.hVolker Lendecke1-1/+0
tevent.h already includes talloc.h Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2018-12-17lib:tsocket: Check for DOXYGEN as a #defineAndreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Autobuild-User(master): Gary Lockyer <gary@samba.org> Autobuild-Date(master): Mon Dec 17 00:10:10 CET 2018 on sn-devel-144
2018-01-04tsocket: Fix typosVolker Lendecke1-2/+2
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2015-06-12lib/tsocket: add tdgram_inet_udp_broadcast_socket()Stefan Metzmacher1-0/+29
This is similar to tdgram_inet_udp_socket(), but it allows the use of ipv4 broadcast traffic. 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> Reviewed-by: Jeremy Allison <jra@samba.org>
2015-06-12lib/tsocket: add tdgram_bsd_existing_socket() helper functionStefan Metzmacher1-0/+42
This is similar to tstream_bsd_existing_socket(). Both help to migrate strange code path to using the tstream or tdgram abstractions. 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> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-06-14tsocket: Add some constVolker Lendecke1-2/+2
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2012-11-05lib/tsocket: disable the syscall optimization for recvfrom/readv by defaultStefan Metzmacher1-0/+42
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>
2010-10-23tsocket: let tstream_inet_tcp_connect_recv() optionally return the used ↵Stefan Metzmacher1-4/+9
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-08-28Revert "lib/tsocket: sa_socklen is a macro on irix, so better use sasocklen"Stefan Metzmacher1-8/+8
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 Metzmacher1-8/+8
metze
2010-08-15s3: Fix a typoVolker Lendecke1-1/+1
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 Metzmacher1-0/+12
metze
2010-04-27lib/tsocket: add tsocket_address_is_inet() functionStefan Metzmacher1-0/+17
metze
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-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 complete doxygen documentation.Andreas Schneider1-11/+834
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-12-15tsocket: Fixed typo in LGPL header.Andreas Schneider1-1/+1
2009-12-15tsocket: add tsocket_address_bsd_sockaddr() and ↵Stefan Metzmacher1-0/+15
tsocket_address_bsd_from_sockaddr() metze
2009-11-03tsocket: remove prototype of non-existing tsocket_address_inet_set_broadcast()Stefan Metzmacher1-2/+0
metze
2009-05-01tsocket: add tstream_readv_pdu_queue_send/recv()Stefan Metzmacher1-0/+8
metze
2009-05-01tsocket: add tstream_writev_queue_send/recv()Stefan Metzmacher1-0/+8
metze
2009-05-01tsocket: add tstream_readv_pdu_send/recv()Stefan Metzmacher1-1/+13
metze
2009-05-01tsocket: add tstream implementation for bsd sockets (inet and unix)Stefan Metzmacher1-0/+43
metze
2009-05-01tsocket: add tstream_context infrastructure similar to tdgram_contextStefan Metzmacher1-0/+28
metze
2009-05-01tsocket: rename tdgram_unix_dgram_socket() => tdgram_unix_socket()Stefan Metzmacher1-7/+7
metze
2009-05-01tsocket: remove tsocket_context related stuffStefan Metzmacher1-112/+3
It will be replaced by tdgram_context and tstream_context. metze
2009-04-02tsocket: remove DGRAM support from tsocket_contextStefan Metzmacher1-32/+0
metze
2009-04-02tsocket: add tdgram_sendto_queue_send/recv()Stefan Metzmacher1-0/+13
metze
2009-04-02tsocket: split out a smaller tdgram_context abstractionStefan Metzmacher1-0/+43
The idea is to have a tdgram and a tstream abstraction which only provide tevent_req based io functions. metze
2009-03-19lib/tsocket: add tsocket_readv_send/recv()Stefan Metzmacher1-0/+11
metze
2009-03-19lib/tsocket: add tsocket_writev_queue_send/recv()Stefan Metzmacher1-0/+7
metze
2009-03-19lib/tsocket: add tsocket_writev_send/recv()Stefan Metzmacher1-0/+6
metze
2009-03-19lib/tsocket: add tsocket_connect_send/recv()Stefan Metzmacher1-0/+5
metze
2009-03-19lib/tsocket: add tsocket_sendto_queue_send/recv()Stefan Metzmacher1-0/+8
metze
2009-03-19lib/tsocket: add tsocket_sendto_send/recv()Stefan Metzmacher1-0/+7
metze
2009-03-19lib/tsocket: add tsocket_recvfrom_send/recv()Stefan Metzmacher1-1/+12
metze
2009-03-19lib/tsocket: add an implementation for bsd style sockets.Stefan Metzmacher1-0/+41
metze
2009-03-19lib/tsocket: add generic socket abstraction layerStefan Metzmacher1-0/+124
This will replace source4/lib/socket/. metze