s3:smbd/globals: change 'int am_parent' into 'struct smbd_parent_context *am_parent'
[kai/samba.git] / source3 / smbd / globals.h
index 4d954534dc393d254a49b915fcc79615c87c49b5..020e1bcddeb090d7d77b20537143180733f70594 100644 (file)
@@ -74,9 +74,8 @@ extern pid_t background_lpq_updater_pid;
 ****************************************************************************/
 extern uint32_t common_flags2;
 
-struct smb_srv_trans_enc_ctx;
-extern struct smb_srv_trans_enc_ctx *partial_srv_trans_enc_ctx;
-extern struct smb_srv_trans_enc_ctx *srv_trans_enc_ctx;
+extern struct smb_trans_enc_state *partial_srv_trans_enc_ctx;
+extern struct smb_trans_enc_state *srv_trans_enc_ctx;
 
 struct sec_ctx {
        struct security_unix_token ut;
@@ -114,9 +113,8 @@ extern int32_t exclusive_oplocks_open;
 extern int32_t level_II_oplocks_open;
 extern struct kernel_oplocks *koplocks;
 
-extern int am_parent;
-extern struct event_context *smbd_event_ctx;
-extern struct messaging_context *smbd_msg_ctx;
+struct smbd_parent_context;
+extern struct smbd_parent_context *am_parent;
 extern struct memcache *smbd_memcache_ctx;
 extern bool exit_firsttime;
 struct child_pid;
@@ -222,10 +220,6 @@ NTSTATUS smbd_calculate_access_mask(connection_struct *conn,
                                    bool file_existed,
                                    uint32_t access_mask,
                                    uint32_t *access_mask_out);
-NTSTATUS smbd_check_open_rights(struct connection_struct *conn,
-                               const struct smb_filename *smb_fname,
-                               uint32_t access_mask,
-                               uint32_t *access_granted);
 
 void smbd_notify_cancel_by_smbreq(const struct smb_request *smbreq);
 
@@ -264,7 +258,8 @@ NTSTATUS smbd_smb2_send_oplock_break(struct smbd_server_connection *sconn,
                                     uint8_t oplock_level);
 
 NTSTATUS smbd_smb2_request_pending_queue(struct smbd_smb2_request *req,
-                                        struct tevent_req *subreq);
+                                        struct tevent_req *subreq,
+                                        uint32_t defer_time);
 
 struct smb_request *smbd_smb2_fake_smb_request(struct smbd_smb2_request *req);
 void remove_smb2_chained_fsp(files_struct *fsp);
@@ -344,13 +339,15 @@ struct smbd_smb2_request {
 
        /* the session the request operates on, maybe NULL */
        struct smbd_smb2_session *session;
+       uint64_t last_session_id;
 
        /* the tcon the request operates on, maybe NULL */
        struct smbd_smb2_tcon *tcon;
+       uint32_t last_tid;
 
        int current_idx;
        bool do_signing;
-       bool async;
+       struct tevent_timer *async_te;
        bool cancelled;
        bool compound_related;
 
@@ -453,6 +450,7 @@ struct smbd_server_connection {
        const struct tsocket_address *local_address;
        const struct tsocket_address *remote_address;
        const char *remote_hostname;
+       struct tevent_context *ev_ctx;
        struct messaging_context *msg_ctx;
        struct {
                bool got_session;
@@ -585,7 +583,6 @@ struct smbd_server_connection {
                } locks;
        } smb1;
        struct {
-               struct tevent_context *event_ctx;
                struct tevent_queue *recv_queue;
                struct tevent_queue *send_queue;
                struct tstream_context *stream;
@@ -610,6 +607,9 @@ struct smbd_server_connection {
                uint64_t seqnum_low;
                uint32_t credits_granted;
                uint32_t max_credits;
+               uint32_t max_trans;
+               uint32_t max_read;
+               uint32_t max_write;
                struct bitmap *credits_bitmap;
                bool compound_related_in_progress;
        } smb2;