2005-11-11 08:53:54 +03:00
/*
Unix SMB / CIFS implementation .
SMB2 client calls
Copyright ( C ) Andrew Tridgell 2005
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
2007-07-10 06:07:03 +04:00
the Free Software Foundation ; either version 3 of the License , or
2005-11-11 08:53:54 +03:00
( 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
2007-07-10 06:07:03 +04:00
along with this program . If not , see < http : //www.gnu.org/licenses/>.
2005-11-11 08:53:54 +03:00
*/
2006-03-17 16:55:10 +03:00
# include "libcli/raw/interfaces.h"
2005-11-11 08:53:54 +03:00
struct smb2_negprot {
struct {
2008-02-12 04:54:44 +03:00
uint16_t dialect_count ; /* size of dialects array */
uint16_t security_mode ; /* 0==signing disabled
1 = = signing enabled */
uint16_t reserved ;
uint32_t capabilities ;
struct GUID client_guid ;
NTTIME start_time ;
uint16_t * dialects ;
2005-11-11 08:53:54 +03:00
} in ;
struct {
2005-11-16 14:01:15 +03:00
/* static body buffer 64 (0x40) bytes */
/* uint16_t buffer_code; 0x41 = 0x40 + 1 */
2008-02-13 02:13:28 +03:00
uint16_t security_mode ; /* SMB2_NEGOTIATE_SIGNING_* */
2008-02-12 08:20:13 +03:00
uint16_t dialect_revision ;
uint16_t reserved ;
struct GUID server_guid ;
uint32_t capabilities ;
uint32_t max_transact_size ;
uint32_t max_read_size ;
uint32_t max_write_size ;
NTTIME system_time ;
NTTIME server_start_time ;
2005-11-16 14:01:15 +03:00
/* uint16_t secblob_ofs */
/* uint16_t secblob_size */
2008-02-12 08:20:13 +03:00
uint32_t reserved2 ;
2005-11-11 08:53:54 +03:00
DATA_BLOB secblob ;
} out ;
} ;
2005-11-17 14:06:13 +03:00
/* NOTE! the getinfo fs and file levels exactly match up with the
' passthru ' SMB levels , which are levels > = 1000. The SMB2 client
lib uses the names from the libcli / raw / library */
2005-11-12 10:48:56 +03:00
struct smb2_getinfo {
struct {
2005-11-16 14:01:15 +03:00
/* static body buffer 40 (0x28) bytes */
2008-02-14 09:11:36 +03:00
/* uint16_t buffer_code; 0x29 = 0x28 + 1 */
uint8_t info_type ;
uint8_t info_class ;
uint32_t output_buffer_length ;
/* uint32_t input_buffer_offset; */
uint32_t reserved ;
uint32_t input_buffer_length ;
uint32_t additional_information ; /* SMB2_GETINFO_ADD_* */
uint32_t getinfo_flags ; /* level specific */
2006-06-20 11:03:53 +04:00
union smb_handle file ;
2008-02-14 09:11:36 +03:00
DATA_BLOB blob ;
2005-11-12 10:48:56 +03:00
} in ;
struct {
2005-11-16 14:01:15 +03:00
/* static body buffer 8 (0x08) bytes */
/* uint16_t buffer_code; 0x09 = 0x08 + 1 */
/* uint16_t blob_ofs; */
/* uint16_t blob_size; */
/* dynamic body */
2005-11-12 10:48:56 +03:00
DATA_BLOB blob ;
} out ;
} ;
2005-11-18 09:28:15 +03:00
struct smb2_setinfo {
struct {
uint16_t level ;
uint32_t flags ;
2006-06-20 11:03:53 +04:00
union smb_handle file ;
2005-11-18 09:28:15 +03:00
DATA_BLOB blob ;
} in ;
} ;
2006-03-18 18:42:57 +03:00
struct cli_credentials ;
2008-12-29 22:24:57 +03:00
struct tevent_context ;
2007-12-10 20:41:19 +03:00
struct resolve_context ;
2008-11-02 04:05:48 +03:00
struct gensec_settings ;
2006-01-03 20:27:33 +03:00
# include "libcli/smb2/smb2_proto.h"