ctdb-scripts: Support storing statd-callout state in cluster filesystem
[samba4-gss.git] / source4 / torture / smb2 / block.h
blob6a6370a1ab580d609b02566d246e82973917df86
1 /*
2 * Unix SMB/CIFS implementation.
4 * block SMB2 transports using iptables
6 * Copyright (C) Guenther Deschner, 2017
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 3 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
22 uint16_t torture_get_local_port_from_transport(struct smb2_transport *t);
24 bool torture_block_tcp_output_port(struct torture_context *tctx,
25 const char *name,
26 uint16_t port);
27 bool torture_unblock_tcp_output_port(struct torture_context *tctx,
28 const char *name,
29 uint16_t port);
30 bool torture_block_tcp_output_setup(struct torture_context *tctx);
31 bool torture_unblock_tcp_output_cleanup(struct torture_context *tctx);
33 bool test_setup_blocked_transports(struct torture_context *tctx);
34 void test_cleanup_blocked_transports(struct torture_context *tctx);
36 #define test_block_smb2_transport(_tctx, _t) _test_block_smb2_transport(_tctx, _t, #_t)
37 bool _test_block_smb2_transport(struct torture_context *tctx,
38 struct smb2_transport *transport,
39 const char *name);
40 #define test_unblock_smb2_transport(_tctx, _t) _test_unblock_smb2_transport(_tctx, _t, #_t)
41 bool _test_unblock_smb2_transport(struct torture_context *tctx,
42 struct smb2_transport *transport,
43 const char *name);