summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/cli_np_tstream.c13
-rw-r--r--source3/libsmb/cli_np_tstream.h2
2 files changed, 15 insertions, 0 deletions
diff --git a/source3/libsmb/cli_np_tstream.c b/source3/libsmb/cli_np_tstream.c
index 814dba8c8f..aa5806bba8 100644
--- a/source3/libsmb/cli_np_tstream.c
+++ b/source3/libsmb/cli_np_tstream.c
@@ -191,6 +191,19 @@ static ssize_t tstream_cli_np_pending_bytes(struct tstream_context *stream)
return cli_nps->read.left;
}
+bool tstream_is_cli_np(struct tstream_context *stream)
+{
+ struct tstream_cli_np *cli_nps =
+ talloc_get_type(_tstream_context_data(stream),
+ struct tstream_cli_np);
+
+ if (!cli_nps) {
+ return false;
+ }
+
+ return true;
+}
+
struct tstream_cli_np_writev_state {
struct tstream_context *stream;
struct tevent_context *ev;
diff --git a/source3/libsmb/cli_np_tstream.h b/source3/libsmb/cli_np_tstream.h
index 4808db6390..c6f5231f81 100644
--- a/source3/libsmb/cli_np_tstream.h
+++ b/source3/libsmb/cli_np_tstream.h
@@ -44,4 +44,6 @@ NTSTATUS _tstream_cli_np_existing(TALLOC_CTX *mem_ctx,
#define tstream_cli_np_existing(mem_ctx, cli, npipe, stream) \
_tstream_cli_np_existing(mem_ctx, cli, npipe, stream, __location__)
+bool tstream_is_cli_np(struct tstream_context *stream);
+
#endif /* _CLI_NP_TSTREAM_H_ */