3 Declarations and administrivia.
5 Copyright (C) James Peach 2005-2006
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 extern const char * const PROGNAME
;
33 const char * arg_name
;
34 enum argtype arg_type
;
35 const char * arg_help
;
45 int set_arg_argv(const char * argv
);
46 void set_arg_val(const char * name
, ...);
48 bool check_arg_bool(const char * name
);
49 uint64_t check_arg_numeric(const char * name
);
50 const char * check_arg_pathname(const char * name
);
52 typedef bool (*dd_seek_func
)(void * handle
, uint64_t offset
);
53 typedef bool (*dd_read_func
)(void * handle
, uint8_t * buf
,
54 uint64_t wanted
, uint64_t * actual
);
55 typedef bool (*dd_write_func
)(void * handle
, uint8_t * buf
,
56 uint64_t wanted
, uint64_t * actual
);
58 struct dd_stats_record
62 uint64_t fblocks
; /* Full blocks. */
63 uint64_t pblocks
; /* Partial blocks. */
64 uint64_t bytes
; /* Total bytes read. */
68 uint64_t fblocks
; /* Full blocks. */
69 uint64_t pblocks
; /* Partial blocks. */
70 uint64_t bytes
; /* Total bytes written. */
74 extern struct dd_stats_record dd_stats
;
80 dd_write_func io_write
;
84 #define DD_END_OF_FILE 0x10000000
86 #define DD_DIRECT_IO 0x00000001
87 #define DD_SYNC_IO 0x00000002
88 #define DD_WRITE 0x00000004
89 #define DD_OPLOCK 0x00000008
91 struct smbcli_options
;
92 struct smbcli_session_options
;
93 struct tevent_context
;
95 struct dd_iohandle
* dd_open_path(struct resolve_context
*resolve_ctx
,
96 struct tevent_context
*ev
,
99 uint64_t io_size
, int options
,
100 const char *socket_options
,
101 struct smbcli_options
*smb_options
,
102 struct smbcli_session_options
*smb_session_options
,
103 struct gensec_settings
*gensec_settings
);
104 bool dd_fill_block(struct dd_iohandle
* h
, uint8_t * buf
,
105 uint64_t * buf_size
, uint64_t need_size
, uint64_t block_size
);
106 bool dd_flush_block(struct dd_iohandle
* h
, uint8_t * buf
,
107 uint64_t * buf_size
, uint64_t block_size
);
109 /* vim: set sw=8 sts=8 ts=8 tw=79 : */