summaryrefslogtreecommitdiff
path: root/libcli/smb/smb2_create_blob.h
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-08-12 17:43:03 +0200
committerStefan Metzmacher <metze@samba.org>2009-08-12 19:22:06 +0200
commit1d75a6e2245c022e2688d5fa6807d572fa18bcd6 (patch)
treef86ae9bd5b2316a97b05c02d9cb3256654b181bd /libcli/smb/smb2_create_blob.h
parent1df883aa39ce69b040f9d9e72125bf4b80c714a9 (diff)
downloadsamba-1d75a6e2245c022e2688d5fa6807d572fa18bcd6.tar.gz
samba-1d75a6e2245c022e2688d5fa6807d572fa18bcd6.tar.bz2
samba-1d75a6e2245c022e2688d5fa6807d572fa18bcd6.zip
libcli/smb: move smb2_create_blob code to libcli/smb/
I want to use this in source3/smbd/ metze
Diffstat (limited to 'libcli/smb/smb2_create_blob.h')
-rw-r--r--libcli/smb/smb2_create_blob.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/libcli/smb/smb2_create_blob.h b/libcli/smb/smb2_create_blob.h
new file mode 100644
index 0000000000..e8b8f12fe3
--- /dev/null
+++ b/libcli/smb/smb2_create_blob.h
@@ -0,0 +1,51 @@
+/*
+ Unix SMB/CIFS implementation.
+
+ SMB2 Create Context Blob handling
+
+ Copyright (C) Andrew Tridgell 2005
+ Copyright (C) Stefan Metzmacher 2008-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 _LIBCLI_SMB_SMB2_CREATE_BLOB_H_
+#define _LIBCLI_SMB_SMB2_CREATE_BLOB_H_
+
+struct smb2_create_blob {
+ const char *tag;
+ DATA_BLOB data;
+};
+
+struct smb2_create_blobs {
+ uint32_t num_blobs;
+ struct smb2_create_blob *blobs;
+};
+
+/*
+ parse a set of SMB2 create blobs
+*/
+NTSTATUS smb2_create_blob_parse(TALLOC_CTX *mem_ctx, const DATA_BLOB buffer,
+ struct smb2_create_blobs *blobs);
+
+/*
+ create a buffer of a set of create blobs
+*/
+NTSTATUS smb2_create_blob_push(TALLOC_CTX *mem_ctx, DATA_BLOB *buffer,
+ const struct smb2_create_blobs blobs);
+
+NTSTATUS smb2_create_blob_add(TALLOC_CTX *mem_ctx, struct smb2_create_blobs *b,
+ const char *tag, DATA_BLOB data);
+
+#endif /* _LIBCLI_SMB_SMB2_CREATE_BLOB_H_ */