summaryrefslogtreecommitdiffstats
path: root/kernel/misc.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/misc.h')
-rw-r--r--kernel/misc.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/kernel/misc.h b/kernel/misc.h
new file mode 100644
index 0000000..8f7f511
--- /dev/null
+++ b/kernel/misc.h
@@ -0,0 +1,23 @@
+/*
+ * kernel/misc.h - Usefull stuff that doesn't fit anywhere else.
+ */
+
+
+#define SEND 1
+#define RECV 0
+
+
+/*
+ * Jiffies between now and @then.
+ */
+uint16_t diff(uint16_t then);
+
+/*
+ * Send or receive packet (from nbd.c)
+ */
+int sock_xmit(struct socket *sock, int send, void *buf, int size);
+
+/*
+ * Pretty printing of IPs.
+ */
+char *inet_ntoa(uint32_t ip);