r15746: - reorder elements of smb2srv_request
[kai/samba.git] / source4 / smb_server / smb2 / smb2_server.h
1 /* 
2    Unix SMB2 implementation.
3    
4    Copyright (C) Stefan Metzmacher            2005
5    
6    This program is free software; you can redistribute it and/or modify
7    it under the terms of the GNU General Public License as published by
8    the Free Software Foundation; either version 2 of the License, or
9    (at your option) any later version.
10    
11    This program is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15    
16    You should have received a copy of the GNU General Public License
17    along with this program; if not, write to the Free Software
18    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 */
20
21 /* the context for a single SMB2 request. This is passed to any request-context 
22    functions */
23 struct smb2srv_request {
24         /* the smbsrv_connection needs a list of requests queued for send */
25         struct smb2srv_request *next, *prev;
26
27         /* the server_context contains all context specific to this SMB socket */
28         struct smbsrv_connection *smb_conn;
29
30         /* conn is only set for operations that have a valid TID */
31         struct smbsrv_tcon *tcon;
32
33         /* the session context is derived from the vuid */
34         struct smbsrv_session *session;
35
36 #define SMB2SRV_REQ_CTRL_FLAG_NOT_REPLY (1<<0)
37         uint32_t control_flags;
38
39         /* the system time when the request arrived */
40         struct timeval request_time;
41
42         /* a pointer to the per request union smb_* io structure */
43         void *io_ptr;
44
45         /* the ntvfs_request */
46         struct ntvfs_request *ntvfs;
47
48         /* Now the SMB2 specific stuff */
49
50         /* the status the backend returned */
51         NTSTATUS status;
52
53         /* for matching request and reply */
54         uint64_t seqnum;
55
56         struct smb2_request_buffer in;
57         struct smb2_request_buffer out;
58 };
59
60 struct smbsrv_request;
61
62 #include "smb_server/smb2/smb2_proto.h"