summaryrefslogtreecommitdiff
path: root/source4/libcli/raw
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-04 03:38:46 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-04 03:38:46 +0000
commitd8cbe76b868eb6f2b3876fa540e0847bd2d4f9d7 (patch)
tree916a6642bb57c169aca82ac14bd31154fdc82366 /source4/libcli/raw
parent994301bfec372f0b929a61425fc1eb180d16cbb1 (diff)
downloadsamba-d8cbe76b868eb6f2b3876fa540e0847bd2d4f9d7.tar.gz
samba-d8cbe76b868eb6f2b3876fa540e0847bd2d4f9d7.tar.bz2
samba-d8cbe76b868eb6f2b3876fa540e0847bd2d4f9d7.zip
added support for fragmented sends
(This used to be commit f51a216136b7cc7d4d07d4acb80e0a710d82841a)
Diffstat (limited to 'source4/libcli/raw')
-rw-r--r--source4/libcli/raw/rawdcerpc.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/source4/libcli/raw/rawdcerpc.c b/source4/libcli/raw/rawdcerpc.c
index d548129ab1..a6cd75eeaa 100644
--- a/source4/libcli/raw/rawdcerpc.c
+++ b/source4/libcli/raw/rawdcerpc.c
@@ -218,3 +218,35 @@ NTSTATUS dcerpc_raw_packet_secondary(struct dcerpc_pipe *p,
return status;
}
+
+
+/*
+ send an initial pdu in a multi-pdu sequence
+*/
+NTSTATUS dcerpc_raw_packet_initial(struct dcerpc_pipe *p,
+ TALLOC_CTX *mem_ctx,
+ DATA_BLOB *blob)
+{
+ union smb_write io;
+ NTSTATUS status;
+
+ io.generic.level = RAW_WRITE_WRITEX;
+ io.writex.in.fnum = p->fnum;
+ io.writex.in.offset = 0;
+ io.writex.in.wmode = PIPE_START_MESSAGE;
+ io.writex.in.remaining = blob->length;
+ io.writex.in.count = blob->length;
+ io.writex.in.data = blob->data;
+
+ status = smb_raw_write(p->tree, &io);
+ if (NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ /* make sure it accepted it all */
+ if (io.writex.out.nwritten != blob->length) {
+ return NT_STATUS_UNSUCCESSFUL;
+ }
+
+ return status;
+}