s3:include: change cli->protocol to enum protocol_types
[samba.git] / source3 / include / client.h
index eada7924039bb9d4a5e24a9e24c208f0181c621b..a4d43218e6f58c610e568749354eb38d73c6b037 100644 (file)
@@ -51,18 +51,10 @@ struct cli_state {
         * 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;
@@ -80,10 +72,6 @@ struct cli_state {
 
        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;
@@ -125,17 +113,29 @@ struct cli_state {
        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;