Kostya Serebryany | 016852c | 2015-02-19 18:45:37 +0000 | [diff] [blame^] | 1 | //===- FuzzerInterface.h - Interface header for the Fuzzer ------*- C++ -* ===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // Define the interface between the Fuzzer and the library being tested. |
| 10 | //===----------------------------------------------------------------------===// |
| 11 | |
| 12 | #ifndef LLVM_FUZZER_INTERFACE_H |
| 13 | #define LLVM_FUZZER_INTERFACE_H |
| 14 | |
| 15 | #include <cstddef> |
| 16 | #include <cstdint> |
| 17 | |
| 18 | namespace fuzzer { |
| 19 | |
| 20 | typedef void (*UserCallback)(const uint8_t *data, size_t size); |
| 21 | int FuzzerDriver(int argc, char **argv, UserCallback Callback); |
| 22 | |
| 23 | } // namespace fuzzer |
| 24 | |
| 25 | #endif // LLVM_FUZZER_INTERFACE_H |