* A list of subsidiary connections for DFS.
*/
struct cli_state *prev, *next;
- int port;
- int fd;
- /* Last read or write error. */
- enum smb_read_errors smb_rw_error;
- uint16 cnum;
- uint16 pid;
- uint16 mid;
- uint16 vuid;
- int protocol;
+ enum protocol_types protocol;
int sec_mode;
int rap_error;
- int privileges;
-
- char *desthost;
+ NTSTATUS raw_status; /* maybe via NT_STATUS_DOS() */
/* The credentials used to open the cli_state connection. */
char *domain;
char *share;
char *dev;
- struct nmb_name called;
- struct nmb_name calling;
- struct sockaddr_storage dest_ss;
DATA_BLOB secblob; /* cryptkey or negTokenInit */
uint32 sesskey;
int timeout; /* in milliseconds. */
size_t max_xmit;
size_t max_mux;
- char *outbuf;
- char *inbuf;
- unsigned int bufsize;
int initialised;
int win95;
bool is_samba;
bool use_oplocks; /* should we use oplocks? */
bool use_level_II_oplocks; /* should we use level II oplocks? */
- /* a oplock break request handler */
- NTSTATUS (*oplock_handler)(struct cli_state *cli, uint16_t fnum, unsigned char level);
-
bool force_dos_errors;
bool case_sensitive; /* False by default. */
/* Where (if anywhere) this is mounted under DFS. */
char *dfs_mountpoint;
- struct tevent_queue *outgoing;
- struct tevent_req **pending;
+ struct {
+ int fd;
+ struct sockaddr_storage local_ss;
+ struct sockaddr_storage remote_ss;
+ const char *remote_name;
+ struct tevent_req *read_smb_req;
+ struct tevent_queue *outgoing;
+ struct tevent_req **pending;
+ } conn;
+
+ struct {
+ uint16_t mid;
+ uint16_t pid;
+ uint16_t vc_num;
+ uint16_t tid;
+ uint16_t uid;
+ } smb1;
+
+ struct {
+ uint64_t mid;
+ uint32_t pid;
+ uint32_t tid;
+ uint64_t uid;
+
+ /* SMB2 negprot */
+ uint16_t security_mode;
+ uint16_t dialect_revision;
+ struct GUID server_guid;
+ uint16_t server_capabilities;
+ uint32_t max_transact_size;
+ uint32_t max_read_size;
+ uint32_t max_write_size;
+ struct timespec system_time;
+ struct timespec server_start_time;
+
+ /* SMB2 tcon */
+ uint8_t share_type;
+ uint32_t share_flags;
+ uint32_t maximal_access;
+ } smb2;
};
struct file_info {
struct timespec atime_ts;
struct timespec ctime_ts;
char *name;
- char short_name[13*3]; /* the *3 is to cope with multi-byte */
+ char *short_name;
};
#define CLI_FULL_CONNECTION_DONT_SPNEGO 0x0001