4f9a1807aa62a40bca56f82da205822acbb24a56
[vlendec/samba-autobuild/.git] / source3 / torture / proto.h
1 /*
2    Unix SMB/CIFS implementation.
3
4    SMB torture tester - header file
5
6    Copyright (C) Andrew Tridgell 1997-1998
7    Copyright (C) Jeremy Allison 2009
8
9    This program is free software; you can redistribute it and/or modify
10    it under the terms of the GNU General Public License as published by
11    the Free Software Foundation; either version 3 of the License, or
12    (at your option) any later version.
13
14    This program is distributed in the hope that it will be useful,
15    but WITHOUT ANY WARRANTY; without even the implied warranty of
16    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17    GNU General Public License for more details.
18
19    You should have received a copy of the GNU General Public License
20    along with this program.  If not, see <http://www.gnu.org/licenses/>.
21 */
22
23 #ifndef __TORTURE_H__
24 #define __TORTURE_H__
25
26 /* The following definitions come from torture/denytest.c  */
27
28 bool torture_denytest1(int dummy);
29 bool torture_denytest2(int dummy);
30
31 /* The following definitions come from torture/mangle_test.c  */
32
33 bool torture_mangle(int dummy);
34
35 /* The following definitions come from torture/nbio.c  */
36
37 double nbio_total(void);
38 void nb_alarm(int ignore);
39 void nbio_shmem(int n);
40 void nb_setup(struct cli_state *cli);
41 void nb_unlink(const char *fname);
42 void nb_createx(const char *fname,
43                 unsigned create_options, unsigned create_disposition, int handle);
44 void nb_writex(int handle, int offset, int size, int ret_size);
45 void nb_readx(int handle, int offset, int size, int ret_size);
46 void nb_close(int handle);
47 void nb_rmdir(const char *fname);
48 void nb_rename(const char *oldname, const char *newname);
49 void nb_qpathinfo(const char *fname);
50 void nb_qfileinfo(int fnum);
51 void nb_qfsinfo(int level);
52 void nb_findfirst(const char *mask);
53 void nb_flush(int fnum);
54 void nb_deltree(const char *dname);
55 void nb_cleanup(void);
56
57 /* The following definitions come from torture/scanner.c  */
58
59 bool torture_trans2_scan(int dummy);
60 bool torture_nttrans_scan(int dummy);
61
62 /* The following definitions come from torture/torture.c  */
63
64 void *shm_setup(int size);
65 bool smbcli_parse_unc(const char *unc_name, TALLOC_CTX *mem_ctx,
66                       char **hostname, char **sharename);
67 void torture_open_connection_free_unclist(char **unc_list);
68 bool torture_open_connection(struct cli_state **c, int conn_index);
69 bool torture_cli_session_setup2(struct cli_state *cli, uint16 *new_vuid);
70 bool torture_close_connection(struct cli_state *c);
71 bool torture_ioctl_test(int dummy);
72 bool torture_chkpath_test(int dummy);
73 NTSTATUS torture_setup_unix_extensions(struct cli_state *cli);
74
75 /* The following definitions come from torture/utable.c  */
76
77 bool torture_utable(int dummy);
78 bool torture_casetable(int dummy);
79
80 /*
81  * Misc
82  */
83
84 bool run_posix_append(int dummy);
85
86 bool run_nbench2(int dummy);
87
88 #endif /* __TORTURE_H__ */