1 | /*
|
---|
2 | Unix SMB/CIFS implementation.
|
---|
3 |
|
---|
4 | SMB2 Create Context Blob handling
|
---|
5 |
|
---|
6 | Copyright (C) Andrew Tridgell 2005
|
---|
7 | Copyright (C) Stefan Metzmacher 2008-2009
|
---|
8 |
|
---|
9 | This program is free software; you can redistribute it and/or modify
|
---|
10 | it under the terms of the GNU General Public License as published by
|
---|
11 | the Free Software Foundation; either version 3 of the License, or
|
---|
12 | (at your option) any later version.
|
---|
13 |
|
---|
14 | This program is distributed in the hope that it will be useful,
|
---|
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
17 | GNU General Public License for more details.
|
---|
18 |
|
---|
19 | You should have received a copy of the GNU General Public License
|
---|
20 | along with this program. If not, see <http://www.gnu.org/licenses/>.
|
---|
21 | */
|
---|
22 |
|
---|
23 | #ifndef _LIBCLI_SMB_SMB2_CREATE_BLOB_H_
|
---|
24 | #define _LIBCLI_SMB_SMB2_CREATE_BLOB_H_
|
---|
25 |
|
---|
26 | struct smb2_create_blob {
|
---|
27 | const char *tag;
|
---|
28 | DATA_BLOB data;
|
---|
29 | };
|
---|
30 |
|
---|
31 | struct smb2_create_blobs {
|
---|
32 | uint32_t num_blobs;
|
---|
33 | struct smb2_create_blob *blobs;
|
---|
34 | };
|
---|
35 |
|
---|
36 | /*
|
---|
37 | parse a set of SMB2 create blobs
|
---|
38 | */
|
---|
39 | NTSTATUS smb2_create_blob_parse(TALLOC_CTX *mem_ctx, const DATA_BLOB buffer,
|
---|
40 | struct smb2_create_blobs *blobs);
|
---|
41 |
|
---|
42 | /*
|
---|
43 | create a buffer of a set of create blobs
|
---|
44 | */
|
---|
45 | NTSTATUS smb2_create_blob_push(TALLOC_CTX *mem_ctx, DATA_BLOB *buffer,
|
---|
46 | const struct smb2_create_blobs blobs);
|
---|
47 |
|
---|
48 | NTSTATUS smb2_create_blob_add(TALLOC_CTX *mem_ctx, struct smb2_create_blobs *b,
|
---|
49 | const char *tag, DATA_BLOB data);
|
---|
50 |
|
---|
51 | /*
|
---|
52 | * return the first blob with the given tag
|
---|
53 | */
|
---|
54 | struct smb2_create_blob *smb2_create_blob_find(const struct smb2_create_blobs *b,
|
---|
55 | const char *tag);
|
---|
56 |
|
---|
57 | #endif /* _LIBCLI_SMB_SMB2_CREATE_BLOB_H_ */
|
---|