summaryrefslogtreecommitdiff
path: root/lib/tsocket/tsocket.h
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-04-03 12:15:27 +0200
committerStefan Metzmacher <metze@samba.org>2009-05-01 17:41:55 +0200
commitee6d796c19e15f6a2e3044ce85ea9ff30dfeb5f0 (patch)
tree299bd623e0534a49c80869dda0cc82442cfca8f8 /lib/tsocket/tsocket.h
parent8a090c4b8bb805bdc8debc8ca8ced5cd6f362d2e (diff)
downloadsamba-ee6d796c19e15f6a2e3044ce85ea9ff30dfeb5f0.tar.gz
samba-ee6d796c19e15f6a2e3044ce85ea9ff30dfeb5f0.tar.bz2
samba-ee6d796c19e15f6a2e3044ce85ea9ff30dfeb5f0.zip
tsocket: add tstream implementation for bsd sockets (inet and unix)
metze
Diffstat (limited to 'lib/tsocket/tsocket.h')
-rw-r--r--lib/tsocket/tsocket.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/lib/tsocket/tsocket.h b/lib/tsocket/tsocket.h
index 96fd6fe395..6583a5e786 100644
--- a/lib/tsocket/tsocket.h
+++ b/lib/tsocket/tsocket.h
@@ -146,6 +146,49 @@ int _tdgram_unix_socket(const struct tsocket_address *local,
#define tdgram_unix_socket(local, remote, mem_ctx, dgram) \
_tdgram_unix_socket(local, remote, mem_ctx, dgram, __location__)
+struct tevent_req * tstream_inet_tcp_connect_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ const struct tsocket_address *local,
+ const struct tsocket_address *remote);
+int _tstream_inet_tcp_connect_recv(struct tevent_req *req,
+ int *perrno,
+ TALLOC_CTX *mem_ctx,
+ struct tstream_context **stream,
+ const char *location);
+#define tstream_inet_tcp_connect_recv(req, perrno, mem_ctx, stream) \
+ _tstream_inet_tcp_connect_recv(req, perrno, mem_ctx, stream, \
+ __location__)
+
+struct tevent_req * tstream_unix_connect_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ const struct tsocket_address *local,
+ const struct tsocket_address *remote);
+int _tstream_unix_connect_recv(struct tevent_req *req,
+ int *perrno,
+ TALLOC_CTX *mem_ctx,
+ struct tstream_context **stream,
+ const char *location);
+#define tstream_unix_connect_recv(req, perrno, mem_ctx, stream) \
+ _tstream_unix_connect_recv(req, perrno, mem_ctx, stream, \
+ __location__)
+
+int _tstream_unix_socketpair(TALLOC_CTX *mem_ctx1,
+ struct tstream_context **_stream1,
+ TALLOC_CTX *mem_ctx2,
+ struct tstream_context **_stream2,
+ const char *location);
+#define tstream_unix_socketpair(mem_ctx1, stream1, mem_ctx2, stream2) \
+ _tstream_unix_socketpair(mem_ctx1, stream1, mem_ctx2, stream2, \
+ __location__)
+
+int _tstream_bsd_existing_socket(TALLOC_CTX *mem_ctx,
+ int fd,
+ struct tstream_context **_stream,
+ const char *location);
+#define tstream_bsd_existing_socket(mem_ctx, fd, stream) \
+ _tstream_bsd_existing_socket(mem_ctx, fd, stream, \
+ __location__)
+
/*
* Queue helpers
*/