2 * Unix SMB/CIFS implementation.
4 * Copyright (C) Stefan Metzmacher 2012
5 * Copyright (C) Michael Adam 2012
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 #ifndef __SMBXSRV_OPEN_H__
22 #define __SMBXSRV_OPEN_H__
25 #include "libcli/util/ntstatus.h"
26 #include "lib/util/time.h"
27 #include "lib/util/data_blob.h"
28 #include "librpc/gen_ndr/misc.h"
30 struct smbXsrv_connection
;
31 struct auth_session_info
;
33 struct smbXsrv_open_global0
;
34 struct smbXsrv_client
;
36 NTSTATUS
smbXsrv_open_global_init(void);
37 NTSTATUS
smbXsrv_open_create(struct smbXsrv_connection
*conn
,
38 struct auth_session_info
*session_info
,
40 struct smbXsrv_open
**_open
);
41 NTSTATUS
smbXsrv_open_update(struct smbXsrv_open
*_open
);
42 NTSTATUS
smbXsrv_open_close(struct smbXsrv_open
*op
, NTTIME now
);
43 NTSTATUS
smb1srv_open_table_init(struct smbXsrv_connection
*conn
);
44 NTSTATUS
smb1srv_open_lookup(struct smbXsrv_connection
*conn
,
45 uint16_t fnum
, NTTIME now
,
46 struct smbXsrv_open
**_open
);
47 NTSTATUS
smb2srv_open_table_init(struct smbXsrv_connection
*conn
);
48 NTSTATUS
smb2srv_open_lookup(struct smbXsrv_connection
*conn
,
49 uint64_t persistent_id
,
52 struct smbXsrv_open
**_open
);
53 NTSTATUS
smbXsrv_open_purge_replay_cache(struct smbXsrv_client
*client
,
54 const struct GUID
*create_guid
);
55 NTSTATUS
smb2srv_open_lookup_replay_cache(struct smbXsrv_connection
*conn
,
56 struct GUID caller_req_guid
,
57 struct GUID create_guid
,
60 struct smbXsrv_open
**_open
);
61 NTSTATUS
smb2srv_open_recreate(struct smbXsrv_connection
*conn
,
62 struct auth_session_info
*session_info
,
63 uint64_t persistent_id
,
64 const struct GUID
*create_guid
,
66 struct smbXsrv_open
**_open
);
67 NTSTATUS
smbXsrv_open_global_traverse(
68 int (*fn
)(struct smbXsrv_open_global0
*, void *),
71 NTSTATUS
smbXsrv_open_cleanup(uint64_t persistent_id
);