ctdb: Accept the key in hex format for the pstore command
[Samba.git] / libcli / smb / smb2_negotiate_context.h
blob55aa032665ea54e74dff6a8abe68fce113e0d799
1 /*
2 Unix SMB/CIFS implementation.
4 Copyright (C) Stefan Metzmacher 2014
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef _LIBCLI_SMB_SMB2_NEGOTIATE_BLOB_H_
21 #define _LIBCLI_SMB_SMB2_NEGOTIATE_BLOB_H_
23 struct smb2_negotiate_context {
24 uint16_t type;
25 DATA_BLOB data;
28 struct smb2_negotiate_contexts {
29 uint32_t num_contexts;
30 struct smb2_negotiate_context *contexts;
34 parse a set of SMB2 negotiate contexts
36 NTSTATUS smb2_negotiate_context_parse(TALLOC_CTX *mem_ctx, const DATA_BLOB buffer,
37 struct smb2_negotiate_contexts *contexts);
40 negotiate a buffer of a set of negotiate contexts
42 NTSTATUS smb2_negotiate_context_push(TALLOC_CTX *mem_ctx, DATA_BLOB *buffer,
43 const struct smb2_negotiate_contexts contexts);
45 NTSTATUS smb2_negotiate_context_add(TALLOC_CTX *mem_ctx, struct smb2_negotiate_contexts *c,
46 uint16_t type, DATA_BLOB data);
49 * return the first context with the given tag
51 struct smb2_negotiate_context *smb2_negotiate_context_find(const struct smb2_negotiate_contexts *b,
52 uint16_t type);
53 #define WINDOWS_CLIENT_PURE_SMB2_NEGPROT_INITIAL_CREDIT_ASK 31
55 #endif /* _LIBCLI_SMB_SMB2_NEGOTIATE_BLOB_H_ */