-
Notifications
You must be signed in to change notification settings - Fork 30
/
fuzz_bufq.h
52 lines (48 loc) · 1.86 KB
/
fuzz_bufq.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 2017, Max Dymond, <[email protected]>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at https://curl.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the COPYING file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
***************************************************************************/
/**
* Limits for fields
*/
#define FUZZ_MAX_CHUNK_SIZE (16 * 1024)
#define FUZZ_MAX_CHUNKS_QTY (1 * 1024)
#define FUZZ_MAX_MAX_SPARE (1 * 1024)
#define FUZZ_MAX_RW_SIZE (FUZZ_MAX_CHUNKS_QTY * FUZZ_MAX_CHUNK_SIZE)
/**
* Operation identifiers
*/
#define OP_TYPE_WRITE 0
#define OP_TYPE_READ 1
#define OP_TYPE_SKIP 2
#define OP_TYPE_RESET 3
#define OP_TYPE_PEEK 4
#define OP_TYPE_PEEK_AT 5
#define OP_TYPE_SIPN 6
#define OP_TYPE_SLURP 7
#define OP_TYPE_PASS 8
#define OP_TYPE_MAX 8
/**
* Helper macros
*/
#define FV_PRINTF(verbose, ...) \
if(!!(verbose)) { \
printf(__VA_ARGS__); \
}