summaryrefslogtreecommitdiff
path: root/testing/hstox/driver.h
diff options
context:
space:
mode:
Diffstat (limited to 'testing/hstox/driver.h')
-rw-r--r--testing/hstox/driver.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/testing/hstox/driver.h b/testing/hstox/driver.h
new file mode 100644
index 00000000..219df8a1
--- /dev/null
+++ b/testing/hstox/driver.h
@@ -0,0 +1,20 @@
1#pragma once
2
3#include <stdbool.h>
4#include <stdint.h>
5
6// Settings for the test runner.
7struct settings {
8 // Print the msgpack object on test failure.
9 bool debug;
10 // Write test sample files into test-inputs/. These files, one per test
11 // method, are used to seed the fuzzer.
12 bool collect_samples;
13};
14
15// Main loop communicating via read/write file descriptors. The two fds can be
16// the same in case of a network socket.
17int communicate(struct settings cfg, int read_fd, int write_fd);
18
19// Open a TCP socket on the given port and start communicate().
20uint32_t network_main(struct settings cfg, uint16_t port, unsigned int timeout);