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

Last change on this file since 4828 was 4828, checked in by wisk, 8 years ago

fix tmp file creation on win32, start to implement handling of win32 exception with GetExitCodeProcess?

  • Property svn:keywords set to Id
File size: 1.6 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
17#ifdef _WIN32
18#   include <Windows.h>
19#endif
20
21struct opts
22{
23    enum opmode
24    {
25        OPMODE_PRELOAD,
26        OPMODE_COPY,
27    } opmode;
28    char **oldargv;
29    int oldargc;
30    char *fuzzing, *bytes, *list, *ports, *protect, *refuse, *allow;
31    uint32_t seed;
32    uint32_t endseed;
33    double minratio;
34    double maxratio;
35    int quiet;
36    int maxbytes;
37    int maxcpu;
38    int md5;
39    int checkexit;
40    int verbose;
41    int maxmem;
42    int64_t starttime;
43    int64_t maxtime;
44    int64_t maxusertime;
45    int64_t delay;
46    int64_t lastlaunch;
47
48    int maxchild, nchild, maxcrashes, crashes;
49    struct child
50    {
51        enum status
52        {
53            STATUS_FREE,
54            STATUS_RUNNING,
55            STATUS_SIGTERM,
56            STATUS_SIGKILL,
57            STATUS_EOF,
58        } status;
59
60        pid_t pid;
61#ifdef _WIN32
62        HANDLE process_handle;
63#endif
64        int fd[3]; /* 0 is debug, 1 is stderr, 2 is stdout */
65        int bytes, seed;
66        double ratio;
67        int64_t date;
68        struct md5 *ctx;
69        char **newargv;
70    } *child;
71};
72
73void _zz_opts_init(struct opts *);
74void _zz_opts_fini(struct opts *);
75
Note: See TracBrowser for help on using the repository browser.