source: zzuf/trunk/src/opts.h @ 4393

Last change on this file since 4393 was 4393, checked in by Sam Hocevar, 10 years ago

New operating mode "copy". It uses temporary files instead of preloading
libzzuf into the process.

  • Property svn:keywords set to Id
File size: 1.5 KB
Line 
1/*
2 *  zzuf - general purpose fuzzer
3 *  Copyright (c) 2002-2010 Sam Hocevar <sam@hocevar.net>
4 *                All Rights Reserved
5 *
6 *  This program is free software. It comes without any warranty, to
7 *  the extent permitted by applicable law. You can redistribute it
8 *  and/or modify it under the terms of the Do What The Fuck You Want
9 *  To Public License, Version 2, as published by Sam Hocevar. See
10 *  http://sam.zoy.org/wtfpl/COPYING for more details.
11 */
12
13/*
14 *  opts.h: configuration handling
15 */
16
17struct opts
18{
19    enum opmode
20    {
21        OPMODE_PRELOAD,
22        OPMODE_COPY,
23    } opmode;
24    char **oldargv;
25    int oldargc;
26    char *fuzzing, *bytes, *list, *ports, *protect, *refuse, *allow;
27    uint32_t seed;
28    uint32_t endseed;
29    double minratio;
30    double maxratio;
31    int quiet;
32    int maxbytes;
33    int maxcpu;
34    int md5;
35    int checkexit;
36    int verbose;
37    int maxmem;
38    int64_t starttime;
39    int64_t maxtime;
40    int64_t maxusertime;
41    int64_t delay;
42    int64_t lastlaunch;
43
44    int maxchild, nchild, maxcrashes, crashes;
45    struct child
46    {
47        enum status
48        {
49            STATUS_FREE,
50            STATUS_RUNNING,
51            STATUS_SIGTERM,
52            STATUS_SIGKILL,
53            STATUS_EOF,
54        } status;
55
56        pid_t pid;
57        int fd[3]; /* 0 is debug, 1 is stderr, 2 is stdout */
58        int bytes, seed;
59        double ratio;
60        int64_t date;
61        struct md5 *ctx;
62        char **newargv;
63    } *child;
64};
65
66void _zz_opts_init(struct opts *);
67void _zz_opts_fini(struct opts *);
68
Note: See TracBrowser for help on using the repository browser.