From 8daa83a594a2e98f39d764422bfbdbc62c9efd44 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 19:20:00 +0200 Subject: Adding upstream version 2:4.20.0+dfsg. Signed-off-by: Daniel Baumann --- source3/smbd/fd_handle.h | 49 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 source3/smbd/fd_handle.h (limited to 'source3/smbd/fd_handle.h') diff --git a/source3/smbd/fd_handle.h b/source3/smbd/fd_handle.h new file mode 100644 index 0000000..dc0e5e4 --- /dev/null +++ b/source3/smbd/fd_handle.h @@ -0,0 +1,49 @@ +/* + Unix SMB/CIFS implementation. + Files handle structure handling + Copyright (C) Ralph Boehme 2020 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#ifndef FD_HANDLE_H +#define FD_HANDLE_H + +#include "replace.h" +#include + +struct fd_handle; + +struct fd_handle *fd_handle_create(TALLOC_CTX *mem_ctx); + +size_t fh_get_refcount(struct fd_handle *fh); +void fh_set_refcount(struct fd_handle *fh, size_t ref_count); + +uint64_t fh_get_position_information(struct fd_handle *fh); +void fh_set_position_information(struct fd_handle *fh, uint64_t posinfo); + +off_t fh_get_pos(struct fd_handle *fh); +void fh_set_pos(struct fd_handle *fh, off_t pos); + +uint32_t fh_get_private_options(struct fd_handle *fh); +void fh_set_private_options(struct fd_handle *fh, uint32_t private_options); + +uint64_t fh_get_gen_id(struct fd_handle *fh); +void fh_set_gen_id(struct fd_handle *fh, uint64_t gen_id); + +int fsp_get_io_fd(const struct files_struct *fsp); +int fsp_get_pathref_fd(const struct files_struct *fsp); +void fsp_set_fd(struct files_struct *fsp, int fd); + +#endif -- cgit v1.2.3