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
RevLine 
[1692]1/*
2 *  zzuf - general purpose fuzzer
[4253]3 *  Copyright (c) 2002-2010 Sam Hocevar <sam@hocevar.net>
[1692]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
[4828]17#ifdef _WIN32
18#   include <Windows.h>
19#endif
20
[1692]21struct opts
22{
[4393]23    enum opmode
24    {
25        OPMODE_PRELOAD,
26        OPMODE_COPY,
27    } opmode;
[1707]28    char **oldargv;
[4393]29    int oldargc;
[4239]30    char *fuzzing, *bytes, *list, *ports, *protect, *refuse, *allow;
[1692]31    uint32_t seed;
32    uint32_t endseed;
33    double minratio;
34    double maxratio;
35    int quiet;
36    int maxbytes;
[1801]37    int maxcpu;
[1692]38    int md5;
39    int checkexit;
40    int verbose;
41    int maxmem;
[4264]42    int64_t starttime;
[1692]43    int64_t maxtime;
[4264]44    int64_t maxusertime;
[1692]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;
[4828]61#ifdef _WIN32
62        HANDLE process_handle;
63#endif
[1692]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;
[4393]69        char **newargv;
[1692]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.