* A list of subsidiary connections for DFS.
*/
struct cli_state *prev, *next;
- int fd;
- uint16 cnum;
- uint16 pid;
- uint16 mid;
- uint16 vuid;
- int protocol;
+ enum protocol_types protocol;
int sec_mode;
int rap_error;
NTSTATUS raw_status; /* maybe via NT_STATUS_DOS() */
- int privileges;
-
- char *desthost;
/* The credentials used to open the cli_state connection. */
char *domain;
char *share;
char *dev;
- struct nmb_name called;
- struct sockaddr_storage src_ss;
- struct nmb_name calling;
- struct sockaddr_storage dest_ss;
DATA_BLOB secblob; /* cryptkey or negTokenInit */
uint32 sesskey;
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;
+ const char *remote_realm;
+ struct tevent_req *read_smb_req;
+ struct tevent_queue *outgoing;
+ struct tevent_req **pending;
+ /*
+ * The incoming dispatch function should return:
+ * - NT_STATUS_RETRY, if more incoming PDUs are expected.
+ * - NT_STATUS_OK, if no more processing is desired, e.g.
+ * the dispatch function called
+ * tevent_req_done().
+ * - All other return values disconnect the connection.
+ */
+ NTSTATUS (*dispatch_incoming)(struct cli_state *cli,
+ TALLOC_CTX *frame,
+ uint8_t *inbuf);
+ } conn;
+
+ struct {
+ uint16_t mid;
+ uint16_t pid;
+ uint16_t vc_num;
+ uint16_t tid;
+ uint16_t uid;
+ } smb1;
struct {
uint64_t mid;