summaryrefslogtreecommitdiff
path: root/libhfnetdriver/netdriver.h
diff options
context:
space:
mode:
Diffstat (limited to 'libhfnetdriver/netdriver.h')
-rw-r--r--libhfnetdriver/netdriver.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/libhfnetdriver/netdriver.h b/libhfnetdriver/netdriver.h
index 4dcaab63..c666c6cd 100644
--- a/libhfnetdriver/netdriver.h
+++ b/libhfnetdriver/netdriver.h
@@ -2,14 +2,19 @@
#define _HF_NETDRIVER_NETDRIVER_H
#include <inttypes.h>
+#include <stddef.h>
#include <stdint.h>
+#include <sys/socket.h>
+#include <sys/types.h>
#ifdef __cplusplus
extern "C" {
#endif
-#define HFND_TMP_DIR_OLD "/tmp/FUZZ"
-#define HFND_TMP_DIR "/tmp/HFND_TMP_DIR"
+#define HFND_TMP_DIR_OLD "/tmp/FUZZ"
+#define HFND_TMP_DIR "/tmp/HFND_TMP_DIR"
+#define HFND_DEFAULT_TCP_PORT 8080
+#define HFND_DEFAULT_SOCK_PATH "socket"
/*
* Flags which will be passed to the original program running in a separate thread should go into
@@ -20,6 +25,17 @@ int HonggfuzzNetDriverArgsForServer(int argc, char** argv, int* server_argc, cha
* TCP port that the fuzzed data inputs will be sent to
*/
uint16_t HonggfuzzNetDriverPort(int argc, char** argv);
+/*
+ * Mount point for temporary filesystem
+ */
+int HonggfuzzNetDriverTempdir(char* str, size_t size);
+/*
+ * Provide your own connection address, could be e.g. an AF_UNIX socket.
+ *
+ * Return 0 if only the standard connection protocols should be used (i.e. currently TCP4/TCP6 and
+ * PF_UNIX via a set of standardized TCP ports (e.g. 8080) and paths)
+ */
+socklen_t HonggfuzzNetDriverServerAddress(struct sockaddr_storage* addr, int* type, int* protocol);
#ifdef __cplusplus
}