summaryrefslogtreecommitdiff
path: root/libcli/named_pipe_auth/npa_tstream.h
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-03-12 18:10:19 +0100
committerStefan Metzmacher <metze@samba.org>2009-05-01 17:42:08 +0200
commit92a1890b90f5cb4bfb9988a521fcbfb22bebc82d (patch)
tree0c7867cf978189cd114b24e7d47c9896b264297a /libcli/named_pipe_auth/npa_tstream.h
parent2ae92c759925023cc6d357c4f4d9cc3b308186aa (diff)
downloadsamba-92a1890b90f5cb4bfb9988a521fcbfb22bebc82d.tar.gz
samba-92a1890b90f5cb4bfb9988a521fcbfb22bebc82d.tar.bz2
samba-92a1890b90f5cb4bfb9988a521fcbfb22bebc82d.zip
libcli/named_pipe_auth: add tstream_npa_connect_send/recv()
Add a tstream client implemenation for the named pipe auth code. This supports byte and message mode. metze
Diffstat (limited to 'libcli/named_pipe_auth/npa_tstream.h')
-rw-r--r--libcli/named_pipe_auth/npa_tstream.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/libcli/named_pipe_auth/npa_tstream.h b/libcli/named_pipe_auth/npa_tstream.h
new file mode 100644
index 0000000000..6ffd7b8632
--- /dev/null
+++ b/libcli/named_pipe_auth/npa_tstream.h
@@ -0,0 +1,59 @@
+/*
+ Unix SMB/CIFS implementation.
+
+ Copyright (C) Stefan Metzmacher 2009
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef NPA_TSTREAM_H
+#define NPA_TSTREAM_H
+
+struct tevent_req;
+struct tevent_context;
+struct netr_SamInfo3;
+
+struct tevent_req *tstream_npa_connect_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct smb_iconv_convenience *smb_iconv_c,
+ const char *directory,
+ const char *npipe,
+ const struct tsocket_address *client,
+ const char *client_name,
+ const struct tsocket_address *server,
+ const char *server_name,
+ const struct netr_SamInfo3 *info3,
+ DATA_BLOB session_key);
+int _tstream_npa_connect_recv(struct tevent_req *req,
+ int *perrno,
+ TALLOC_CTX *mem_ctx,
+ struct tstream_context **stream,
+ uint16_t *file_type,
+ uint16_t *device_state,
+ uint64_t *allocation_size,
+ const char *location);
+#define tstream_npa_connect_recv(req, perrno, mem_ctx, stream, f, d, a) \
+ _tstream_npa_connect_recv(req, perrno, mem_ctx, stream, f, d, a, \
+ __location__)
+
+int _tstream_npa_existing_socket(TALLOC_CTX *mem_ctx,
+ int fd,
+ uint16_t file_type,
+ struct tstream_context **_stream,
+ const char *location);
+#define tstream_npa_existing_socket(mem_ctx, fd, ft, stream) \
+ _tstream_npa_existing_socket(mem_ctx, fd, ft, stream, \
+ __location__)
+
+#endif /* NPA_TSTREAM_H */