about summary refs log tree commit diff stats
path: root/inc
diff options
context:
space:
mode:
Diffstat (limited to 'inc')
-rw-r--r--inc/handlers.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/inc/handlers.h b/inc/handlers.h
new file mode 100644
index 0000000..9f1988f
--- /dev/null
+++ b/inc/handlers.h
@@ -0,0 +1,17 @@
+#ifndef NBD_NBTPD_HANDLERS_H
+#define NBD_NBTPD_HANDLERS_H
+
+#include <netinet/in.h>
+#include "packet.h"
+
+typedef struct {
+	char path[768];
+	char mode[32];
+	struct sockaddr_in client;
+} nbd_nbtpd_args;
+
+void read_req_resp(nbd_nbtpd_args args);
+void write_req_resp(nbd_nbtpd_args args);
+void nbd_nbtpd_resp_error(nbd_nbtpd_args args);
+
+#endif