about summary refs log tree commit diff stats
path: root/inc
diff options
context:
space:
mode:
authorRen Kararou <[email protected]>2024-12-30 15:30:46 -0600
committerRen Kararou <[email protected]>2024-12-30 15:30:46 -0600
commit810de0a90148d5dc7fe5919949220a00d14f6447 (patch)
tree61464902efd5718456561983825137a19dc80aa4 /inc
parentd9111c41e8160c69a79e03e88b9219cb1c0ac27e (diff)
downloadnbtpd-810de0a90148d5dc7fe5919949220a00d14f6447.tar.gz
nbtpd-810de0a90148d5dc7fe5919949220a00d14f6447.tar.bz2
nbtpd-810de0a90148d5dc7fe5919949220a00d14f6447.zip
fix silly errors in last commit; start impl of handlers
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