diff -urN glib-2.38.2/gio/giomodule.c glib-2.38.2-win32/gio/giomodule.c
--- glib-2.38.2/gio/giomodule.c	2013-11-12 06:30:22.000000000 +0100
+++ glib-2.38.2-win32/gio/giomodule.c	2014-01-02 01:39:29.000000000 +0100
@@ -897,6 +897,7 @@
 #ifdef G_PLATFORM_WIN32
 
 #include <windows.h>
+extern GType _g_network_monitor_windows_get_type (void);
 
 static HMODULE gio_dll = NULL;
 
@@ -1079,6 +1080,9 @@
 #ifdef HAVE_NETLINK
       g_type_ensure (_g_network_monitor_netlink_get_type ());
 #endif
+#ifdef G_OS_WIN32
+      g_type_ensure (_g_network_monitor_windows_get_type ());
+#endif
     }
 
   G_UNLOCK (loaded_dirs);
diff -urN glib-2.38.2/gio/gnetworkmonitorwindows.c glib-2.38.2-win32/gio/gnetworkmonitorwindows.c
--- glib-2.38.2/gio/gnetworkmonitorwindows.c	1970-01-01 01:00:00.000000000 +0100
+++ glib-2.38.2-win32/gio/gnetworkmonitorwindows.c	2014-01-04 01:30:17.000000000 +0100
@@ -0,0 +1,272 @@
+/* GIO - GLib Input, Output and Streaming Library
+ *
+ * Copyright 2014 Jan-Michael Brummer <jan.brummer@tabos.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <errno.h>
+#include <unistd.h>
+
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#include <iphlpapi.h>
+#include <stdio.h>
+
+#include "gnetworkmonitorwindows.h"
+#include "ginetaddress.h"
+#include "ginetaddressmask.h"
+#include "ginitable.h"
+#include "giomodule-priv.h"
+#include "glibintl.h"
+#include "glib/gstdio.h"
+#include "gnetworkingprivate.h"
+#include "gsocket.h"
+#include "gnetworkmonitor.h"
+
+static void g_network_monitor_windows_iface_init (GNetworkMonitorInterface *iface);
+static void g_network_monitor_windows_initable_iface_init (GInitableIface *iface);
+
+struct _GNetworkMonitorWindowsPrivate
+{
+  OVERLAPPED           overlap;
+
+  GThread             *thread;
+  gboolean             quit;
+};
+
+#define g_network_monitor_windows_get_type _g_network_monitor_windows_get_type
+G_DEFINE_TYPE_WITH_CODE (GNetworkMonitorWindows, g_network_monitor_windows, G_TYPE_NETWORK_MONITOR_BASE,
+                         G_ADD_PRIVATE (GNetworkMonitorWindows)
+                         G_IMPLEMENT_INTERFACE (G_TYPE_NETWORK_MONITOR,
+                                                g_network_monitor_windows_iface_init)
+                         G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE,
+                                                g_network_monitor_windows_initable_iface_init)
+                         _g_io_modules_ensure_extension_points_registered ();
+                         g_io_extension_point_implement (G_NETWORK_MONITOR_EXTENSION_POINT_NAME,
+                                                         g_define_type_id,
+                                                         "windows",
+                                                         20))
+
+static void
+g_network_monitor_windows_init (GNetworkMonitorWindows *win)
+{
+  win->priv = g_network_monitor_windows_get_instance_private (win);
+}
+
+static gint
+win_network_monitor_mask_get_len (gulong addr)
+{
+  gint i;
+  gint count = 0;
+
+  for (i = 31; i >= 0; i--)
+    {
+      if (addr & (1<<i))
+        {
+          count++;
+        }
+      else if (count)
+        {
+          break;
+        }
+    }
+
+    return count;
+}
+
+static gboolean
+win_network_monitor_process_table (GNetworkMonitorWindows *win)
+{
+  PMIB_IPFORWARDTABLE ip_forward_table;
+  DWORD ret = 0;
+  DWORD size = 0;
+  GPtrArray *networks;
+  gint i;
+
+  /* Try to read the table with the default size */
+  ip_forward_table = g_malloc (sizeof (MIB_IPFORWARDTABLE));
+
+  /* NOTE:
+   * We are using GetIpForwardTable () here which only delivers IPV4 family
+   * entries. As glib is currently focusing on XP+ we cannot make use of
+   * GetIpForwardTable2 () (IPV4/IPV6) as it is only supported on >= Vista.
+   *
+   * If the focus of glib will switch to >= Vista, please feel free to move
+   * to the newer function.
+   */
+  ret = GetIpForwardTable (ip_forward_table, &size, 0);
+  if (ret == ERROR_INSUFFICIENT_BUFFER)
+    {
+      g_free (ip_forward_table);
+
+      /* The above command failed due to insufficient buffer space.
+       * As "size" contains the needed buffer size, try to allocate
+       * it.
+       */
+      ip_forward_table = g_malloc (size);
+
+      ret = GetIpForwardTable (ip_forward_table, &size, 0);
+    }
+
+  if (ret != NO_ERROR)
+    {
+      g_warning ("GetIpForwardTable () failed: %ld\n", ret);
+      g_free (ip_forward_table);
+
+      return FALSE;
+    }
+
+  networks = g_ptr_array_sized_new (ip_forward_table->dwNumEntries);
+  for (i = 0; i < ip_forward_table->dwNumEntries; i++)
+    {
+      GInetAddress *dest_addr;
+      GInetAddressMask *network;
+      guint8 *dest = (guint8 *) &ip_forward_table->table[i].dwForwardDest;
+      gint family = G_SOCKET_FAMILY_IPV4;
+      gint len;
+
+      if (dest)
+        dest_addr = g_inet_address_new_from_bytes (dest, family);
+      else
+        dest_addr = g_inet_address_new_any (family);
+
+      len = win_network_monitor_mask_get_len (ip_forward_table->table[i].dwForwardMask);
+      network = g_inet_address_mask_new (dest_addr, len, NULL);
+      g_object_unref (dest_addr);
+      g_return_if_fail (network != NULL);
+
+      g_ptr_array_add (networks, network);
+    }
+
+  g_network_monitor_base_set_networks(G_NETWORK_MONITOR_BASE (win),
+                                      (GInetAddressMask **) networks->pdata,
+                                      ip_forward_table->dwNumEntries);
+
+  g_free (ip_forward_table);
+
+  return TRUE;
+}
+
+static int
+win_network_monitor_request_update (GNetworkMonitorWindows *win)
+{
+  DWORD ret;
+  HANDLE hand;
+
+  ret = NotifyRouteChange (&hand, &win->priv->overlap);
+  if (ret != NO_ERROR)
+    {
+      if (WSAGetLastError () != WSA_IO_PENDING)
+        {
+          g_warning ("NotifyRouteChange error...%d\n", WSAGetLastError ());
+          return 1;
+        }
+    }
+
+  return 0;
+}
+
+static gpointer
+win_network_monitor_thread_func (gpointer data)
+{
+  GNetworkMonitorWindows *win = data;
+
+  do {
+    /* Wait for network change event */
+    if (WaitForSingleObject (win->priv->overlap.hEvent, INFINITE) ==
+      WAIT_OBJECT_0)
+      {
+        win_network_monitor_process_table (win);
+      }
+
+    /* After receiving an event, we must re-request our notification */
+    if (win_network_monitor_request_update (win))
+      {
+        /* An error occurred on re-requesting the notification, abort */
+        break;
+      }
+  } while (!win->priv->quit);
+
+  return NULL;
+}
+
+static gboolean
+g_network_monitor_windows_initable_init (GInitable     *initable,
+                                         GCancellable  *cancellable,
+                                         GError       **error)
+{
+  GNetworkMonitorWindows *win = G_NETWORK_MONITOR_WINDOWS (initable);
+  gboolean ret;
+
+  /* Read and process table */
+  ret = win_network_monitor_process_table (win);
+  if (!ret)
+    {
+      return FALSE;
+    }
+
+  /* Create event */
+  win->priv->overlap.hEvent = WSACreateEvent ();
+
+  /* Request an update notification */
+  if (win_network_monitor_request_update (win))
+    {
+        /* An error occurred on requesting the notification, abort */
+        return FALSE;;
+    }
+
+  /* Prepare network update thread */
+  win->priv->quit = FALSE;
+  win->priv->thread = g_thread_new ("windows network monitor",
+                                   win_network_monitor_thread_func,
+                                   win);
+
+  return TRUE;
+}
+
+static void
+g_network_monitor_windows_finalize (GObject *object)
+{
+  GNetworkMonitorWindows *win = G_NETWORK_MONITOR_WINDOWS (object);
+
+  /* Cancel the thread an the notification event */
+  win->priv->quit = TRUE;
+  CancelIPChangeNotify (&win->priv->overlap);
+
+  G_OBJECT_CLASS (g_network_monitor_windows_parent_class)->finalize (object);
+}
+
+static void
+g_network_monitor_windows_class_init (GNetworkMonitorWindowsClass *win_class)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (win_class);
+
+  gobject_class->finalize = g_network_monitor_windows_finalize;
+}
+
+static void
+g_network_monitor_windows_iface_init (GNetworkMonitorInterface *monitor_iface)
+{
+}
+
+static void
+g_network_monitor_windows_initable_iface_init (GInitableIface *iface)
+{
+  iface->init = g_network_monitor_windows_initable_init;
+}
diff -urN glib-2.38.2/gio/gnetworkmonitorwindows.h glib-2.38.2-win32/gio/gnetworkmonitorwindows.h
--- glib-2.38.2/gio/gnetworkmonitorwindows.h	1970-01-01 01:00:00.000000000 +0100
+++ glib-2.38.2-win32/gio/gnetworkmonitorwindows.h	2014-01-03 23:12:04.000000000 +0100
@@ -0,0 +1,53 @@
+/* GIO - GLib Input, Output and Streaming Library
+ *
+ * Copyright 2014 Jan-Michael Brummer <jan.brummer@tabos.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __G_NETWORK_MONITOR_WINDOWS_H__
+#define __G_NETWORK_MONITOR_WINDOWS_H__
+
+#include "gnetworkmonitorbase.h"
+
+G_BEGIN_DECLS
+
+#define G_TYPE_NETWORK_MONITOR_WINDOWS         (_g_network_monitor_windows_get_type ())
+#define G_NETWORK_MONITOR_WINDOWS(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_NETWORK_MONITOR_WINDOWS, GNetworkMonitorWindows))
+#define G_NETWORK_MONITOR_WINDOWS_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_NETWORK_MONITOR_WINDOWS, GNetworkMonitorWindowsClass))
+#define G_IS_NETWORK_MONITOR_WINDOWS(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_NETWORK_MONITOR_WINDOWS))
+#define G_IS_NETWORK_MONITOR_WINDOWS_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_NETWORK_MONITOR_WINDOWS))
+#define G_NETWORK_MONITOR_WINDOWS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_NETWORK_MONITOR_WINDOWS, GNetworkMonitorWindowsClass))
+
+typedef struct _GNetworkMonitorWindows        GNetworkMonitorWindows;
+typedef struct _GNetworkMonitorWindowsClass   GNetworkMonitorWindowsClass;
+typedef struct _GNetworkMonitorWindowsPrivate GNetworkMonitorWindowsPrivate;
+
+struct _GNetworkMonitorWindows {
+  GNetworkMonitorBase parent_instance;
+
+  GNetworkMonitorWindowsPrivate *priv;
+};
+
+struct _GNetworkMonitorWindowsClass {
+  GNetworkMonitorBaseClass parent_class;
+};
+
+GType _g_network_monitor_windows_get_type (void);
+
+G_END_DECLS
+
+#endif /* __G_NETWORK_MONITOR_WINDOWS_H__ */
diff -urN glib-2.38.2/gio/Makefile.am glib-2.38.2-win32/gio/Makefile.am
--- glib-2.38.2/gio/Makefile.am	2013-11-12 06:30:22.000000000 +0100
+++ glib-2.38.2-win32/gio/Makefile.am	2014-01-03 23:04:04.000000000 +0100
@@ -303,6 +303,8 @@
 	gwin32inputstream.c \
 	gwin32outputstream.c \
 	gwin32outputstream.h \
+	gnetworkmonitorwindows.c \
+	gnetworkmonitorwindows.h
 	$(NULL)
 
 win32_more_sources_for_vcproj = \
