diff --git a/README.mkd b/README.mkd
new file mode 100644
--- /dev/null
+++ b/README.mkd
@@ -0,0 +1,15 @@
+network-info
+=============
+
+This library provides simple read-only access to the local computer's
+networking configuration. It is currently capable of getting a list of
+all the network interfaces and their respective IPv4, IPv6 and MAC
+addresses.
+
+Compatibility
+--------------
+
+network-info has been tested and is known to work on Ubuntu 10.04 and
+Windows XP. It probably works on other flavours of Linux and Windows as
+well. I haven't tried to get it working on BSD or Mac OS X yet but it
+should be quite similar if not the same as the code for Linux.
diff --git a/cbits/common.h b/cbits/common.h
new file mode 100644
--- /dev/null
+++ b/cbits/common.h
@@ -0,0 +1,26 @@
+inline void ipv4copy(ipv4 *dst, struct sockaddr *addr)
+{
+    *dst = ((struct sockaddr_in *)addr)->sin_addr.s_addr;
+}
+
+inline void ipv6copy(ipv6 *dst, struct sockaddr *addr)
+{
+    memcpy(dst, ((struct sockaddr_in6 *)addr)->sin6_addr.s6_addr, sizeof(ipv6));
+}
+
+inline int wcsempty(const wchar_t *str)
+{
+    return wcslen(str) == 0;
+}
+
+inline void wszcopy(wchar_t *dst, const wchar_t *src, size_t dst_size)
+{
+    wcsncpy(dst, src, dst_size - 1);
+    dst[dst_size - 1] = '\0';
+}
+
+inline void mbswszcopy(wchar_t *dst, const char *src, size_t dst_size)
+{
+    mbstowcs(dst, src, dst_size - 1);
+    dst[dst_size - 1] = '\0';
+}
diff --git a/cbits/network.h b/cbits/network.h
new file mode 100644
--- /dev/null
+++ b/cbits/network.h
@@ -0,0 +1,14 @@
+#define NAME_SIZE (128+4)
+#define MAC_SIZE 6
+
+typedef long ipv4;
+typedef long ipv6[4];
+
+struct network_interface {
+    wchar_t name[NAME_SIZE];
+    ipv4 ip_address;
+    ipv6 ip6_address;
+    unsigned char mac_address[MAC_SIZE];
+};
+
+int c_get_network_interfaces(struct network_interface *ns, int max_ns);
diff --git a/network-info.cabal b/network-info.cabal
--- a/network-info.cabal
+++ b/network-info.cabal
@@ -1,5 +1,5 @@
 Name:                network-info
-version:             0.1
+version:             0.1.0.1
 synopsis:            Access the local computer's basic network configuration
 description:         This library provides simple read-only access to the local computer's
                      networking configuration. It is currently capable of getting a list of
@@ -16,6 +16,13 @@
 category:            Network
 build-type:          Simple
 cabal-version:       >=1.8.0.4
+
+extra-source-files:
+  cbits/common.h,
+  cbits/network.h,
+  README.mkd,
+  run-tests.sh,
+  run-tests.bat
 
 source-repository head
   type:     git
diff --git a/run-tests.bat b/run-tests.bat
new file mode 100644
--- /dev/null
+++ b/run-tests.bat
@@ -0,0 +1,2 @@
+@echo off
+cabal configure -ftest && cabal build && dist\build\test-network-info\test-network-info.exe
diff --git a/run-tests.sh b/run-tests.sh
new file mode 100644
--- /dev/null
+++ b/run-tests.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+cabal configure -ftest && cabal build && dist/build/test-network-info/test-network-info
