shill: export a shared library for RTNL interface.

Export a shared library "libshill-net-<(libbase-ver)" from shill, which
currently includes the RTNL interface and other codes that it depends on
(mainly ByteString, IPAddress, IOHandler, TimeStamp, and Sockets). All the
library codes are moved to under "shill/net/".

Upcoming changes:
- Remove dependency for "shill/error.h" which depends on dbus-c++.
- Add Netlink interface to the shared library.

BUG=chromium:427982
TEST=unittests
CQ-DEPEND=CL:226103

Change-Id: I7f5c183b8a347c02e80ffed5e3497f691dde517c
Reviewed-on: https://chromium-review.googlesource.com/226110
Reviewed-by: Peter Qiu <zqiu@chromium.org>
Tested-by: Peter Qiu <zqiu@chromium.org>
Commit-Queue: Peter Qiu <zqiu@chromium.org>
diff --git a/arp_client.cc b/arp_client.cc
index 59e1b5a..880a55a 100644
--- a/arp_client.cc
+++ b/arp_client.cc
@@ -11,9 +11,9 @@
 #include <string.h>
 
 #include "shill/arp_packet.h"
-#include "shill/byte_string.h"
 #include "shill/logging.h"
-#include "shill/sockets.h"
+#include "shill/net/byte_string.h"
+#include "shill/net/sockets.h"
 
 namespace shill {
 
diff --git a/arp_client_unittest.cc b/arp_client_unittest.cc
index 680f414..82223ff 100644
--- a/arp_client_unittest.cc
+++ b/arp_client_unittest.cc
@@ -12,9 +12,9 @@
 #include <gtest/gtest.h>
 
 #include "shill/arp_packet.h"
-#include "shill/ip_address.h"
 #include "shill/mock_log.h"
-#include "shill/mock_sockets.h"
+#include "shill/net/ip_address.h"
+#include "shill/net/mock_sockets.h"
 
 using testing::_;
 using testing::AnyNumber;
diff --git a/arp_packet.h b/arp_packet.h
index da1709c..2e0b8e9 100644
--- a/arp_packet.h
+++ b/arp_packet.h
@@ -5,8 +5,8 @@
 #ifndef SHILL_ARP_PACKET_H_
 #define SHILL_ARP_PACKET_H_
 
-#include "shill/byte_string.h"
-#include "shill/ip_address.h"
+#include "shill/net/byte_string.h"
+#include "shill/net/ip_address.h"
 
 namespace shill {
 
diff --git a/async_connection.cc b/async_connection.cc
index ed5dd3b..843fd17 100644
--- a/async_connection.cc
+++ b/async_connection.cc
@@ -11,8 +11,8 @@
 #include <string>
 
 #include "shill/event_dispatcher.h"
-#include "shill/ip_address.h"
-#include "shill/sockets.h"
+#include "shill/net/ip_address.h"
+#include "shill/net/sockets.h"
 
 using base::Bind;
 using base::Callback;
diff --git a/async_connection_unittest.cc b/async_connection_unittest.cc
index cbb3404..724a0b4 100644
--- a/async_connection_unittest.cc
+++ b/async_connection_unittest.cc
@@ -11,9 +11,9 @@
 #include <base/bind.h>
 #include <gtest/gtest.h>
 
-#include "shill/ip_address.h"
 #include "shill/mock_event_dispatcher.h"
-#include "shill/mock_sockets.h"
+#include "shill/net/ip_address.h"
+#include "shill/net/mock_sockets.h"
 
 using base::Bind;
 using base::Callback;
diff --git a/cellular.cc b/cellular.cc
index e24aa32..1ae98f3 100644
--- a/cellular.cc
+++ b/cellular.cc
@@ -34,12 +34,12 @@
 #include "shill/logging.h"
 #include "shill/manager.h"
 #include "shill/mobile_operator_info.h"
+#include "shill/net/rtnl_handler.h"
 #include "shill/ppp_device.h"
 #include "shill/ppp_device_factory.h"
 #include "shill/profile.h"
 #include "shill/property_accessor.h"
 #include "shill/proxy_factory.h"
-#include "shill/rtnl_handler.h"
 #include "shill/store_interface.h"
 #include "shill/technology.h"
 
diff --git a/cellular_capability_classic_unittest.cc b/cellular_capability_classic_unittest.cc
index 306f5f9..f261c4b 100644
--- a/cellular_capability_classic_unittest.cc
+++ b/cellular_capability_classic_unittest.cc
@@ -21,7 +21,7 @@
 #include "shill/mock_modem_proxy.h"
 #include "shill/mock_modem_simple_proxy.h"
 #include "shill/mock_profile.h"
-#include "shill/mock_rtnl_handler.h"
+#include "shill/net/mock_rtnl_handler.h"
 #include "shill/proxy_factory.h"
 #include "shill/testing.h"
 
diff --git a/cellular_capability_universal_unittest.cc b/cellular_capability_universal_unittest.cc
index ab8d335..2dc4668 100644
--- a/cellular_capability_universal_unittest.cc
+++ b/cellular_capability_universal_unittest.cc
@@ -33,7 +33,7 @@
 #include "shill/mock_modem_info.h"
 #include "shill/mock_pending_activation_store.h"
 #include "shill/mock_profile.h"
-#include "shill/mock_rtnl_handler.h"
+#include "shill/net/mock_rtnl_handler.h"
 #include "shill/proxy_factory.h"
 #include "shill/testing.h"
 
diff --git a/cellular_unittest.cc b/cellular_unittest.cc
index fc98681..29d4b31 100644
--- a/cellular_unittest.cc
+++ b/cellular_unittest.cc
@@ -38,7 +38,7 @@
 #include "shill/mock_modem_simple_proxy.h"
 #include "shill/mock_ppp_device.h"
 #include "shill/mock_ppp_device_factory.h"
-#include "shill/mock_rtnl_handler.h"
+#include "shill/net/mock_rtnl_handler.h"
 #include "shill/property_store_unittest.h"
 #include "shill/proxy_factory.h"
 #include "shill/rpc_task.h"  // for RpcTaskDelegate
diff --git a/connection.cc b/connection.cc
index b492234..940ceb2 100644
--- a/connection.cc
+++ b/connection.cc
@@ -11,9 +11,9 @@
 
 #include "shill/device_info.h"
 #include "shill/logging.h"
+#include "shill/net/rtnl_handler.h"
 #include "shill/resolver.h"
 #include "shill/routing_table.h"
-#include "shill/rtnl_handler.h"
 
 using base::Bind;
 using base::Closure;
diff --git a/connection.h b/connection.h
index c767c0d..c9175bd 100644
--- a/connection.h
+++ b/connection.h
@@ -13,8 +13,8 @@
 #include <base/memory/weak_ptr.h>
 #include <gtest/gtest_prod.h>  // for FRIEND_TEST
 
-#include "shill/ip_address.h"
 #include "shill/ipconfig.h"
+#include "shill/net/ip_address.h"
 #include "shill/refptr_types.h"
 #include "shill/technology.h"
 
diff --git a/connection_health_checker.cc b/connection_health_checker.cc
index ebd73a8..2e3d0f7 100644
--- a/connection_health_checker.cc
+++ b/connection_health_checker.cc
@@ -21,12 +21,12 @@
 #include "shill/dns_client_factory.h"
 #include "shill/error.h"
 #include "shill/http_url.h"
-#include "shill/ip_address.h"
 #include "shill/ip_address_store.h"
 #include "shill/logging.h"
+#include "shill/net/ip_address.h"
+#include "shill/net/sockets.h"
 #include "shill/socket_info.h"
 #include "shill/socket_info_reader.h"
-#include "shill/sockets.h"
 
 using base::Bind;
 using base::Unretained;
diff --git a/connection_health_checker.h b/connection_health_checker.h
index 24827ee..4940221 100644
--- a/connection_health_checker.h
+++ b/connection_health_checker.h
@@ -16,9 +16,9 @@
 #include <base/memory/weak_ptr.h>
 #include <gtest/gtest_prod.h>
 
+#include "shill/net/sockets.h"
 #include "shill/refptr_types.h"
 #include "shill/socket_info.h"
-#include "shill/sockets.h"
 
 namespace shill {
 
diff --git a/connection_health_checker_unittest.cc b/connection_health_checker_unittest.cc
index 8d008d3..877bd4a 100644
--- a/connection_health_checker_unittest.cc
+++ b/connection_health_checker_unittest.cc
@@ -25,7 +25,7 @@
 #include "shill/mock_event_dispatcher.h"
 #include "shill/mock_ip_address_store.h"
 #include "shill/mock_socket_info_reader.h"
-#include "shill/mock_sockets.h"
+#include "shill/net/mock_sockets.h"
 
 using base::Bind;
 using base::Callback;
diff --git a/connection_info.h b/connection_info.h
index 152e788..e0719a1 100644
--- a/connection_info.h
+++ b/connection_info.h
@@ -7,7 +7,7 @@
 
 #include <base/macros.h>
 
-#include "shill/ip_address.h"
+#include "shill/net/ip_address.h"
 
 namespace shill {
 
diff --git a/connection_unittest.cc b/connection_unittest.cc
index 75e40a0..034fcec 100644
--- a/connection_unittest.cc
+++ b/connection_unittest.cc
@@ -20,7 +20,7 @@
 #include "shill/mock_device_info.h"
 #include "shill/mock_resolver.h"
 #include "shill/mock_routing_table.h"
-#include "shill/mock_rtnl_handler.h"
+#include "shill/net/mock_rtnl_handler.h"
 #include "shill/routing_table_entry.h"
 
 using std::string;
diff --git a/connectivity_trial.cc b/connectivity_trial.cc
index 914636e..80a42bd 100644
--- a/connectivity_trial.cc
+++ b/connectivity_trial.cc
@@ -18,9 +18,9 @@
 #include "shill/event_dispatcher.h"
 #include "shill/http_request.h"
 #include "shill/http_url.h"
-#include "shill/ip_address.h"
 #include "shill/logging.h"
-#include "shill/sockets.h"
+#include "shill/net/ip_address.h"
+#include "shill/net/sockets.h"
 
 using base::Bind;
 using base::Callback;
diff --git a/connectivity_trial.h b/connectivity_trial.h
index aa3318f..23e11b6 100644
--- a/connectivity_trial.h
+++ b/connectivity_trial.h
@@ -17,9 +17,9 @@
 
 #include "shill/http_request.h"
 #include "shill/http_url.h"
+#include "shill/net/shill_time.h"
+#include "shill/net/sockets.h"
 #include "shill/refptr_types.h"
-#include "shill/shill_time.h"
-#include "shill/sockets.h"
 
 namespace shill {
 
diff --git a/connectivity_trial_unittest.cc b/connectivity_trial_unittest.cc
index 42c658a..e2644d7 100644
--- a/connectivity_trial_unittest.cc
+++ b/connectivity_trial_unittest.cc
@@ -16,7 +16,7 @@
 #include "shill/mock_device_info.h"
 #include "shill/mock_event_dispatcher.h"
 #include "shill/mock_http_request.h"
-#include "shill/mock_time.h"
+#include "shill/net/mock_time.h"
 
 using base::Bind;
 using base::Callback;
diff --git a/crypto_util_proxy.h b/crypto_util_proxy.h
index c3c94bd..876a421 100644
--- a/crypto_util_proxy.h
+++ b/crypto_util_proxy.h
@@ -18,7 +18,7 @@
 
 #include "shill/callbacks.h"
 #include "shill/error.h"
-#include "shill/io_handler.h"
+#include "shill/net/io_handler.h"
 #include "shill/proto_bindings/shims/protos/crypto_util.pb.h"
 
 namespace shill {
diff --git a/device.cc b/device.cc
index 5af11f4..de06b48 100644
--- a/device.cc
+++ b/device.cc
@@ -29,16 +29,16 @@
 #include "shill/event_dispatcher.h"
 #include "shill/geolocation_info.h"
 #include "shill/http_proxy.h"
-#include "shill/ip_address.h"
 #include "shill/ip_address_store.h"
 #include "shill/link_monitor.h"
 #include "shill/logging.h"
 #include "shill/manager.h"
 #include "shill/metrics.h"
-#include "shill/ndisc.h"
+#include "shill/net/ip_address.h"
+#include "shill/net/ndisc.h"
+#include "shill/net/rtnl_handler.h"
 #include "shill/property_accessor.h"
 #include "shill/refptr_types.h"
-#include "shill/rtnl_handler.h"
 #include "shill/service.h"
 #include "shill/socket_info_reader.h"
 #include "shill/store_interface.h"
diff --git a/device.h b/device.h
index f15c160..f5edac8 100644
--- a/device.h
+++ b/device.h
@@ -20,13 +20,13 @@
 #include "shill/connectivity_trial.h"
 #include "shill/dns_server_tester.h"
 #include "shill/event_dispatcher.h"
-#include "shill/ip_address.h"
 #include "shill/ipconfig.h"
+#include "shill/net/ip_address.h"
+#include "shill/net/shill_time.h"
 #include "shill/portal_detector.h"
 #include "shill/property_store.h"
 #include "shill/refptr_types.h"
 #include "shill/service.h"
-#include "shill/shill_time.h"
 #include "shill/technology.h"
 
 namespace shill {
diff --git a/device_info.cc b/device_info.cc
index 2daa888..042704c 100644
--- a/device_info.cc
+++ b/device_info.cc
@@ -35,17 +35,17 @@
 #include "shill/ethernet.h"
 #include "shill/logging.h"
 #include "shill/manager.h"
-#include "shill/ndisc.h"
+#include "shill/net/ndisc.h"
+#include "shill/net/rtnl_handler.h"
+#include "shill/net/rtnl_listener.h"
+#include "shill/net/rtnl_message.h"
+#include "shill/net/shill_time.h"
+#include "shill/net/sockets.h"
 #include "shill/netlink_attribute.h"
 #include "shill/netlink_manager.h"
 #include "shill/nl80211_message.h"
 #include "shill/routing_table.h"
-#include "shill/rtnl_handler.h"
-#include "shill/rtnl_listener.h"
-#include "shill/rtnl_message.h"
 #include "shill/service.h"
-#include "shill/shill_time.h"
-#include "shill/sockets.h"
 #include "shill/virtio_ethernet.h"
 #include "shill/vpn_provider.h"
 #include "shill/wifi.h"
diff --git a/device_info.h b/device_info.h
index 7d7600b..6b013d1 100644
--- a/device_info.h
+++ b/device_info.h
@@ -18,11 +18,11 @@
 #include <base/memory/weak_ptr.h>
 #include <gtest/gtest_prod.h>  // for FRIEND_TEST
 
-#include "shill/byte_string.h"
 #include "shill/device.h"
-#include "shill/ip_address.h"
-#include "shill/rtnl_listener.h"
-#include "shill/shill_time.h"
+#include "shill/net/byte_string.h"
+#include "shill/net/ip_address.h"
+#include "shill/net/rtnl_listener.h"
+#include "shill/net/shill_time.h"
 #include "shill/technology.h"
 
 namespace shill {
diff --git a/device_info_unittest.cc b/device_info_unittest.cc
index 31236a8..682f110 100644
--- a/device_info_unittest.cc
+++ b/device_info_unittest.cc
@@ -25,7 +25,6 @@
 #include <gmock/gmock.h>
 #include <gtest/gtest.h>
 
-#include "shill/ip_address.h"
 #include "shill/logging.h"
 #include "shill/manager.h"
 #include "shill/mock_control.h"
@@ -37,14 +36,15 @@
 #include "shill/mock_modem_info.h"
 #include "shill/mock_netlink_manager.h"
 #include "shill/mock_routing_table.h"
-#include "shill/mock_rtnl_handler.h"
-#include "shill/mock_sockets.h"
-#include "shill/mock_time.h"
 #include "shill/mock_vpn_provider.h"
 #include "shill/mock_wimax_provider.h"
+#include "shill/net/ip_address.h"
+#include "shill/net/mock_rtnl_handler.h"
+#include "shill/net/mock_sockets.h"
+#include "shill/net/mock_time.h"
+#include "shill/net/rtnl_message.h"
 #include "shill/netlink_attribute.h"
 #include "shill/nl80211_message.h"
-#include "shill/rtnl_message.h"
 #include "shill/wimax.h"
 
 using base::Callback;
diff --git a/device_unittest.cc b/device_unittest.cc
index 58a2e0a..c361046 100644
--- a/device_unittest.cc
+++ b/device_unittest.cc
@@ -43,12 +43,12 @@
 #include "shill/mock_manager.h"
 #include "shill/mock_metrics.h"
 #include "shill/mock_portal_detector.h"
-#include "shill/mock_rtnl_handler.h"
 #include "shill/mock_service.h"
 #include "shill/mock_store.h"
-#include "shill/mock_time.h"
 #include "shill/mock_traffic_monitor.h"
-#include "shill/ndisc.h"
+#include "shill/net/mock_rtnl_handler.h"
+#include "shill/net/mock_time.h"
+#include "shill/net/ndisc.h"
 #include "shill/portal_detector.h"
 #include "shill/property_store_unittest.h"
 #include "shill/static_ip_parameters.h"
diff --git a/dhcp_config.cc b/dhcp_config.cc
index 0bcb5fa..824cd71 100644
--- a/dhcp_config.cc
+++ b/dhcp_config.cc
@@ -20,9 +20,9 @@
 #include "shill/dhcpcd_proxy.h"
 #include "shill/event_dispatcher.h"
 #include "shill/glib.h"
-#include "shill/ip_address.h"
 #include "shill/logging.h"
 #include "shill/metrics.h"
+#include "shill/net/ip_address.h"
 #include "shill/proxy_factory.h"
 
 using std::string;
diff --git a/diagnostics_reporter.cc b/diagnostics_reporter.cc
index 8d55780..2e56019 100644
--- a/diagnostics_reporter.cc
+++ b/diagnostics_reporter.cc
@@ -9,8 +9,8 @@
 #include <base/files/file_util.h>
 #include <chromeos/minijail/minijail.h>
 
+#include "shill/net/shill_time.h"
 #include "shill/process_killer.h"
-#include "shill/shill_time.h"
 #include "shill/shims/net_diags_upload.h"
 
 using base::Closure;
diff --git a/diagnostics_reporter_unittest.cc b/diagnostics_reporter_unittest.cc
index 3608c42..4e8755f 100644
--- a/diagnostics_reporter_unittest.cc
+++ b/diagnostics_reporter_unittest.cc
@@ -11,7 +11,7 @@
 #include <gtest/gtest.h>
 
 #include "shill/mock_process_killer.h"
-#include "shill/mock_time.h"
+#include "shill/net/mock_time.h"
 
 using base::FilePath;
 using chromeos::MockMinijail;
diff --git a/dns_client.cc b/dns_client.cc
index 70c87e1..ed504e0 100644
--- a/dns_client.cc
+++ b/dns_client.cc
@@ -21,8 +21,8 @@
 #include <base/strings/string_number_conversions.h>
 
 #include "shill/logging.h"
+#include "shill/net/shill_time.h"
 #include "shill/shill_ares.h"
-#include "shill/shill_time.h"
 
 using base::Bind;
 using base::Unretained;
diff --git a/dns_client.h b/dns_client.h
index 283b083..a4bc581 100644
--- a/dns_client.h
+++ b/dns_client.h
@@ -16,7 +16,7 @@
 
 #include "shill/error.h"
 #include "shill/event_dispatcher.h"
-#include "shill/ip_address.h"
+#include "shill/net/ip_address.h"
 #include "shill/refptr_types.h"
 
 struct hostent;
diff --git a/dns_client_factory.h b/dns_client_factory.h
index 034ce00..5c4e36f 100644
--- a/dns_client_factory.h
+++ b/dns_client_factory.h
@@ -12,7 +12,7 @@
 
 #include "shill/dns_client.h"
 #include "shill/event_dispatcher.h"
-#include "shill/ip_address.h"
+#include "shill/net/ip_address.h"
 
 namespace shill {
 
diff --git a/dns_client_unittest.cc b/dns_client_unittest.cc
index 4092744..300840e 100644
--- a/dns_client_unittest.cc
+++ b/dns_client_unittest.cc
@@ -14,11 +14,11 @@
 
 #include "shill/error.h"
 #include "shill/event_dispatcher.h"
-#include "shill/io_handler.h"
 #include "shill/mock_ares.h"
 #include "shill/mock_control.h"
 #include "shill/mock_event_dispatcher.h"
-#include "shill/mock_time.h"
+#include "shill/net/io_handler.h"
+#include "shill/net/mock_time.h"
 #include "shill/testing.h"
 
 using base::Bind;
diff --git a/dns_server_tester.h b/dns_server_tester.h
index 0a4f2a4..206b1ec 100644
--- a/dns_server_tester.h
+++ b/dns_server_tester.h
@@ -15,7 +15,7 @@
 #include <base/memory/weak_ptr.h>
 #include <gtest/gtest_prod.h>  // for FRIEND_TEST
 
-#include "shill/ip_address.h"
+#include "shill/net/ip_address.h"
 #include "shill/refptr_types.h"
 
 namespace shill {
diff --git a/dns_server_tester_unittest.cc b/dns_server_tester_unittest.cc
index ae752c6..ae3db62 100644
--- a/dns_server_tester_unittest.cc
+++ b/dns_server_tester_unittest.cc
@@ -17,7 +17,7 @@
 #include "shill/mock_dns_client.h"
 #include "shill/mock_dns_client_factory.h"
 #include "shill/mock_event_dispatcher.h"
-#include "shill/mock_time.h"
+#include "shill/net/mock_time.h"
 
 using base::Bind;
 using base::Callback;
diff --git a/eap_listener.cc b/eap_listener.cc
index d7615fe..8cc6f38 100644
--- a/eap_listener.cc
+++ b/eap_listener.cc
@@ -14,7 +14,7 @@
 #include "shill/eap_protocol.h"
 #include "shill/event_dispatcher.h"
 #include "shill/logging.h"
-#include "shill/sockets.h"
+#include "shill/net/sockets.h"
 
 namespace shill {
 
diff --git a/eap_listener_unittest.cc b/eap_listener_unittest.cc
index 8f480b4..e9e047a 100644
--- a/eap_listener_unittest.cc
+++ b/eap_listener_unittest.cc
@@ -14,11 +14,11 @@
 #include <base/bind.h>
 #include <gtest/gtest.h>
 
-#include "shill/byte_string.h"
 #include "shill/eap_protocol.h"
 #include "shill/mock_event_dispatcher.h"
 #include "shill/mock_log.h"
-#include "shill/mock_sockets.h"
+#include "shill/net/byte_string.h"
+#include "shill/net/mock_sockets.h"
 
 using testing::_;
 using testing::HasSubstr;
diff --git a/ethernet.cc b/ethernet.cc
index 70d1785..d5b93fc 100644
--- a/ethernet.cc
+++ b/ethernet.cc
@@ -30,9 +30,9 @@
 #include "shill/event_dispatcher.h"
 #include "shill/logging.h"
 #include "shill/manager.h"
+#include "shill/net/rtnl_handler.h"
 #include "shill/profile.h"
 #include "shill/proxy_factory.h"
-#include "shill/rtnl_handler.h"
 #include "shill/supplicant_interface_proxy_interface.h"
 #include "shill/supplicant_process_proxy_interface.h"
 #include "shill/wpa_supplicant.h"
diff --git a/ethernet_unittest.cc b/ethernet_unittest.cc
index 250c6f6..82c8d37 100644
--- a/ethernet_unittest.cc
+++ b/ethernet_unittest.cc
@@ -25,11 +25,11 @@
 #include "shill/mock_manager.h"
 #include "shill/mock_metrics.h"
 #include "shill/mock_proxy_factory.h"
-#include "shill/mock_rtnl_handler.h"
 #include "shill/mock_service.h"
-#include "shill/mock_sockets.h"
 #include "shill/mock_supplicant_interface_proxy.h"
 #include "shill/mock_supplicant_process_proxy.h"
+#include "shill/net/mock_rtnl_handler.h"
+#include "shill/net/mock_sockets.h"
 #include "shill/nice_mock_control.h"
 #include "shill/testing.h"
 #include "shill/wpa_supplicant.h"
diff --git a/event_dispatcher.h b/event_dispatcher.h
index d9d79cc..5d90fe3 100644
--- a/event_dispatcher.h
+++ b/event_dispatcher.h
@@ -12,7 +12,7 @@
 #include <base/memory/ref_counted.h>
 #include <base/message_loop/message_loop.h>
 
-#include "shill/io_handler_factory.h"
+#include "shill/net/io_handler_factory.h"
 
 namespace base {
 class MessageLoopProxy;
diff --git a/generic_netlink_message.h b/generic_netlink_message.h
index b2c2f2d..b1e2cd1 100644
--- a/generic_netlink_message.h
+++ b/generic_netlink_message.h
@@ -6,7 +6,7 @@
 #define SHILL_GENERIC_NETLINK_MESSAGE_H_
 
 #include "shill/attribute_list.h"
-#include "shill/byte_string.h"
+#include "shill/net/byte_string.h"
 #include "shill/netlink_message.h"
 #include "shill/refptr_types.h"
 
diff --git a/http_proxy.cc b/http_proxy.cc
index b933d96..0bd72ec 100644
--- a/http_proxy.cc
+++ b/http_proxy.cc
@@ -23,9 +23,9 @@
 #include "shill/connection.h"
 #include "shill/dns_client.h"
 #include "shill/event_dispatcher.h"
-#include "shill/ip_address.h"
 #include "shill/logging.h"
-#include "shill/sockets.h"
+#include "shill/net/ip_address.h"
+#include "shill/net/sockets.h"
 
 using base::Bind;
 using base::StringPrintf;
diff --git a/http_proxy.h b/http_proxy.h
index b0f4183..40009cd 100644
--- a/http_proxy.h
+++ b/http_proxy.h
@@ -13,7 +13,7 @@
 #include <base/memory/ref_counted.h>
 #include <base/memory/weak_ptr.h>
 
-#include "shill/byte_string.h"
+#include "shill/net/byte_string.h"
 #include "shill/refptr_types.h"
 
 namespace shill {
diff --git a/http_proxy_unittest.cc b/http_proxy_unittest.cc
index c37d403..4efd471 100644
--- a/http_proxy_unittest.cc
+++ b/http_proxy_unittest.cc
@@ -13,14 +13,14 @@
 #include <base/strings/stringprintf.h>
 #include <gtest/gtest.h>
 
-#include "shill/ip_address.h"
 #include "shill/mock_async_connection.h"
 #include "shill/mock_connection.h"
 #include "shill/mock_control.h"
 #include "shill/mock_device_info.h"
 #include "shill/mock_dns_client.h"
 #include "shill/mock_event_dispatcher.h"
-#include "shill/mock_sockets.h"
+#include "shill/net/ip_address.h"
+#include "shill/net/mock_sockets.h"
 
 using base::StringPrintf;
 using std::string;
diff --git a/http_request.cc b/http_request.cc
index 215714b..6d11213 100644
--- a/http_request.cc
+++ b/http_request.cc
@@ -16,9 +16,9 @@
 #include "shill/error.h"
 #include "shill/event_dispatcher.h"
 #include "shill/http_url.h"
-#include "shill/ip_address.h"
 #include "shill/logging.h"
-#include "shill/sockets.h"
+#include "shill/net/ip_address.h"
+#include "shill/net/sockets.h"
 
 using base::Bind;
 using base::Callback;
diff --git a/http_request.h b/http_request.h
index c00c9bd..028d8bf 100644
--- a/http_request.h
+++ b/http_request.h
@@ -14,9 +14,9 @@
 #include <base/memory/ref_counted.h>
 #include <base/memory/weak_ptr.h>
 
-#include "shill/byte_string.h"
+#include "shill/net/byte_string.h"
+#include "shill/net/shill_time.h"
 #include "shill/refptr_types.h"
-#include "shill/shill_time.h"
 
 namespace shill {
 
diff --git a/http_request_unittest.cc b/http_request_unittest.cc
index c5a186c..c9eb02c 100644
--- a/http_request_unittest.cc
+++ b/http_request_unittest.cc
@@ -15,14 +15,14 @@
 #include <gtest/gtest.h>
 
 #include "shill/http_url.h"
-#include "shill/ip_address.h"
 #include "shill/mock_async_connection.h"
 #include "shill/mock_connection.h"
 #include "shill/mock_control.h"
 #include "shill/mock_device_info.h"
 #include "shill/mock_dns_client.h"
 #include "shill/mock_event_dispatcher.h"
-#include "shill/mock_sockets.h"
+#include "shill/net/ip_address.h"
+#include "shill/net/mock_sockets.h"
 
 using base::Bind;
 using base::Callback;
diff --git a/icmp.cc b/icmp.cc
index 122a387..68111ed 100644
--- a/icmp.cc
+++ b/icmp.cc
@@ -7,9 +7,9 @@
 #include <netinet/in.h>
 #include <netinet/ip_icmp.h>
 
-#include "shill/ip_address.h"
 #include "shill/logging.h"
-#include "shill/sockets.h"
+#include "shill/net/ip_address.h"
+#include "shill/net/sockets.h"
 
 namespace shill {
 
diff --git a/icmp_unittest.cc b/icmp_unittest.cc
index fbcc9da..dffea34 100644
--- a/icmp_unittest.cc
+++ b/icmp_unittest.cc
@@ -9,9 +9,9 @@
 
 #include <gtest/gtest.h>
 
-#include "shill/ip_address.h"
 #include "shill/mock_log.h"
-#include "shill/mock_sockets.h"
+#include "shill/net/ip_address.h"
+#include "shill/net/mock_sockets.h"
 
 using testing::_;
 using testing::HasSubstr;
diff --git a/ip_address_store.h b/ip_address_store.h
index 1e79ad8..ed64820 100644
--- a/ip_address_store.h
+++ b/ip_address_store.h
@@ -8,7 +8,7 @@
 #include <random>
 #include <set>
 
-#include "shill/ip_address.h"
+#include "shill/net/ip_address.h"
 
 namespace shill {
 
diff --git a/ipconfig.cc b/ipconfig.cc
index 7af79c0..a74f9ee 100644
--- a/ipconfig.cc
+++ b/ipconfig.cc
@@ -12,7 +12,7 @@
 #include "shill/control_interface.h"
 #include "shill/error.h"
 #include "shill/logging.h"
-#include "shill/shill_time.h"
+#include "shill/net/shill_time.h"
 #include "shill/static_ip_parameters.h"
 
 using base::Callback;
diff --git a/ipconfig.h b/ipconfig.h
index cda8bcd..cc9e674 100644
--- a/ipconfig.h
+++ b/ipconfig.h
@@ -14,7 +14,7 @@
 #include <base/memory/ref_counted.h>
 #include <gtest/gtest_prod.h>  // for FRIEND_TEST
 
-#include "shill/ip_address.h"
+#include "shill/net/ip_address.h"
 #include "shill/property_store.h"
 #include "shill/refptr_types.h"
 #include "shill/routing_table_entry.h"
diff --git a/ipconfig_unittest.cc b/ipconfig_unittest.cc
index 0aa4469..0b16789 100644
--- a/ipconfig_unittest.cc
+++ b/ipconfig_unittest.cc
@@ -16,7 +16,7 @@
 #include "shill/mock_control.h"
 #include "shill/mock_log.h"
 #include "shill/mock_store.h"
-#include "shill/mock_time.h"
+#include "shill/net/mock_time.h"
 #include "shill/static_ip_parameters.h"
 
 using base::Bind;
diff --git a/link_monitor.cc b/link_monitor.cc
index 54afd7c..8c3ac58 100644
--- a/link_monitor.cc
+++ b/link_monitor.cc
@@ -13,14 +13,13 @@
 
 #include "shill/arp_client.h"
 #include "shill/arp_packet.h"
-#include "shill/byte_string.h"
 #include "shill/connection.h"
 #include "shill/device_info.h"
 #include "shill/event_dispatcher.h"
-#include "shill/ip_address.h"
 #include "shill/logging.h"
 #include "shill/metrics.h"
-#include "shill/shill_time.h"
+#include "shill/net/ip_address.h"
+#include "shill/net/shill_time.h"
 
 using base::Bind;
 using base::Unretained;
diff --git a/link_monitor.h b/link_monitor.h
index 7a88484..c04889f 100644
--- a/link_monitor.h
+++ b/link_monitor.h
@@ -13,7 +13,7 @@
 #include <base/callback.h>
 #include <base/cancelable_callback.h>
 
-#include "shill/byte_string.h"
+#include "shill/net/byte_string.h"
 #include "shill/refptr_types.h"
 
 namespace shill {
diff --git a/link_monitor_unittest.cc b/link_monitor_unittest.cc
index e3da09a..e325778 100644
--- a/link_monitor_unittest.cc
+++ b/link_monitor_unittest.cc
@@ -12,8 +12,6 @@
 #include <gtest/gtest.h>
 
 #include "shill/arp_packet.h"
-#include "shill/byte_string.h"
-#include "shill/ip_address.h"
 #include "shill/logging.h"
 #include "shill/mock_arp_client.h"
 #include "shill/mock_connection.h"
@@ -22,8 +20,10 @@
 #include "shill/mock_event_dispatcher.h"
 #include "shill/mock_log.h"
 #include "shill/mock_metrics.h"
-#include "shill/mock_sockets.h"
-#include "shill/mock_time.h"
+#include "shill/net/byte_string.h"
+#include "shill/net/ip_address.h"
+#include "shill/net/mock_sockets.h"
+#include "shill/net/mock_time.h"
 
 using base::Bind;
 using base::Unretained;
diff --git a/mac80211_monitor.cc b/mac80211_monitor.cc
index 391e202..98bb7b0 100644
--- a/mac80211_monitor.cc
+++ b/mac80211_monitor.cc
@@ -13,7 +13,7 @@
 
 #include "shill/logging.h"
 #include "shill/metrics.h"
-#include "shill/shill_time.h"
+#include "shill/net/shill_time.h"
 
 namespace shill {
 
diff --git a/mac80211_monitor_unittest.cc b/mac80211_monitor_unittest.cc
index 291ec5a..c57f157 100644
--- a/mac80211_monitor_unittest.cc
+++ b/mac80211_monitor_unittest.cc
@@ -13,7 +13,7 @@
 
 #include "shill/mock_event_dispatcher.h"
 #include "shill/mock_metrics.h"
-#include "shill/mock_time.h"
+#include "shill/net/mock_time.h"
 
 using std::string;
 using std::vector;
diff --git a/mock_arp_client.h b/mock_arp_client.h
index 2c9a356..89f8ac6 100644
--- a/mock_arp_client.h
+++ b/mock_arp_client.h
@@ -10,7 +10,6 @@
 #include <gmock/gmock.h>
 
 #include "shill/arp_packet.h"
-#include "shill/byte_string.h"
 
 namespace shill {
 
diff --git a/mock_async_connection.cc b/mock_async_connection.cc
index 7d0cdb5..a7881c6 100644
--- a/mock_async_connection.cc
+++ b/mock_async_connection.cc
@@ -4,7 +4,7 @@
 
 #include "shill/mock_async_connection.h"
 
-#include "shill/ip_address.h"
+#include "shill/net/ip_address.h"
 
 namespace shill {
 
diff --git a/mock_dns_client.cc b/mock_dns_client.cc
index dd28069..1b88c37 100644
--- a/mock_dns_client.cc
+++ b/mock_dns_client.cc
@@ -7,7 +7,7 @@
 #include <string>
 #include <vector>
 
-#include "shill/ip_address.h"
+#include "shill/net/ip_address.h"
 
 using std::string;
 using std::vector;
diff --git a/mock_dns_client_factory.h b/mock_dns_client_factory.h
index be1be17..e78ccca 100644
--- a/mock_dns_client_factory.h
+++ b/mock_dns_client_factory.h
@@ -13,7 +13,7 @@
 
 #include "shill/dns_client_factory.h"
 #include "shill/event_dispatcher.h"
-#include "shill/ip_address.h"
+#include "shill/net/ip_address.h"
 
 namespace shill {
 
diff --git a/modem.cc b/modem.cc
index ef11138..e70f2dd 100644
--- a/modem.cc
+++ b/modem.cc
@@ -10,8 +10,8 @@
 #include "shill/cellular.h"
 #include "shill/logging.h"
 #include "shill/manager.h"
+#include "shill/net/rtnl_handler.h"
 #include "shill/proxy_factory.h"
-#include "shill/rtnl_handler.h"
 
 using base::Bind;
 using base::Unretained;
diff --git a/modem_1_unittest.cc b/modem_1_unittest.cc
index 1d8c32f..8c9d4ca 100644
--- a/modem_1_unittest.cc
+++ b/modem_1_unittest.cc
@@ -16,8 +16,8 @@
 #include "shill/mock_device_info.h"
 #include "shill/mock_modem_info.h"
 #include "shill/mock_proxy_factory.h"
-#include "shill/mock_rtnl_handler.h"
-#include "shill/rtnl_handler.h"
+#include "shill/net/mock_rtnl_handler.h"
+#include "shill/net/rtnl_handler.h"
 #include "shill/testing.h"
 
 using base::FilePath;
diff --git a/modem_unittest.cc b/modem_unittest.cc
index 87aa3a3..4cf735e 100644
--- a/modem_unittest.cc
+++ b/modem_unittest.cc
@@ -22,9 +22,9 @@
 #include "shill/mock_device_info.h"
 #include "shill/mock_modem.h"
 #include "shill/mock_modem_info.h"
-#include "shill/mock_rtnl_handler.h"
+#include "shill/net/mock_rtnl_handler.h"
+#include "shill/net/rtnl_handler.h"
 #include "shill/proxy_factory.h"
-#include "shill/rtnl_handler.h"
 
 using std::string;
 using std::vector;
diff --git a/byte_string.cc b/net/byte_string.cc
similarity index 98%
rename from byte_string.cc
rename to net/byte_string.cc
index 3baa17e..fbd305f 100644
--- a/byte_string.cc
+++ b/net/byte_string.cc
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "shill/byte_string.h"
+#include "shill/net/byte_string.h"
 
 #include <netinet/in.h>
 #include <string.h>
diff --git a/byte_string.h b/net/byte_string.h
similarity index 97%
rename from byte_string.h
rename to net/byte_string.h
index bc4b41e..7558dec 100644
--- a/byte_string.h
+++ b/net/byte_string.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef SHILL_BYTE_STRING_H_
-#define SHILL_BYTE_STRING_H_
+#ifndef SHILL_NET_BYTE_STRING_H_
+#define SHILL_NET_BYTE_STRING_H_
 
 #include <string>
 #include <vector>
@@ -133,4 +133,4 @@
 }  // namespace shill
 
 
-#endif  // SHILL_BYTE_STRING_H_
+#endif  // SHILL_NET_BYTE_STRING_H_
diff --git a/byte_string_unittest.cc b/net/byte_string_unittest.cc
similarity index 99%
rename from byte_string_unittest.cc
rename to net/byte_string_unittest.cc
index 6ddef62..87aa7c3 100644
--- a/byte_string_unittest.cc
+++ b/net/byte_string_unittest.cc
@@ -9,7 +9,7 @@
 
 #include <string>
 
-#include "shill/byte_string.h"
+#include "shill/net/byte_string.h"
 
 using testing::Test;
 using std::string;
diff --git a/glib_io_input_handler.cc b/net/glib_io_input_handler.cc
similarity index 97%
rename from glib_io_input_handler.cc
rename to net/glib_io_input_handler.cc
index fe64e9e..4c68634 100644
--- a/glib_io_input_handler.cc
+++ b/net/glib_io_input_handler.cc
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "shill/glib_io_input_handler.h"
+#include "shill/net/glib_io_input_handler.h"
 
 #include <errno.h>
 #include <glib.h>
@@ -12,11 +12,11 @@
 #include <string>
 #include <vector>
 
+#include <base/logging.h>
 #include <base/strings/string_util.h>
 #include <base/strings/stringprintf.h>
 
 #include "shill/error.h"
-#include "shill/logging.h"
 
 using base::Callback;
 using base::StringPrintf;
diff --git a/glib_io_input_handler.h b/net/glib_io_input_handler.h
similarity index 82%
rename from glib_io_input_handler.h
rename to net/glib_io_input_handler.h
index f8787e8..8f633a3 100644
--- a/glib_io_input_handler.h
+++ b/net/glib_io_input_handler.h
@@ -2,15 +2,15 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef SHILL_GLIB_IO_INPUT_HANDLER_H_
-#define SHILL_GLIB_IO_INPUT_HANDLER_H_
+#ifndef SHILL_NET_GLIB_IO_INPUT_HANDLER_H_
+#define SHILL_NET_GLIB_IO_INPUT_HANDLER_H_
 
 #include <glib.h>
 #include <stdio.h>
 
 #include <base/callback.h>
 
-#include "shill/io_handler.h"
+#include "shill/net/io_handler.h"
 
 namespace shill {
 
@@ -37,4 +37,4 @@
 
 }  // namespace shill
 
-#endif  // SHILL_GLIB_IO_INPUT_HANDLER_H_
+#endif  // SHILL_NET_GLIB_IO_INPUT_HANDLER_H_
diff --git a/glib_io_ready_handler.cc b/net/glib_io_ready_handler.cc
similarity index 96%
rename from glib_io_ready_handler.cc
rename to net/glib_io_ready_handler.cc
index 668ec6a..1f1a3a2 100644
--- a/glib_io_ready_handler.cc
+++ b/net/glib_io_ready_handler.cc
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "shill/glib_io_ready_handler.h"
+#include "shill/net/glib_io_ready_handler.h"
 
 #include <errno.h>
 #include <glib.h>
@@ -10,7 +10,7 @@
 #include <string.h>
 #include <sys/socket.h>
 
-#include "shill/logging.h"
+#include <base/logging.h>
 
 using base::Callback;
 
diff --git a/glib_io_ready_handler.h b/net/glib_io_ready_handler.h
similarity index 85%
rename from glib_io_ready_handler.h
rename to net/glib_io_ready_handler.h
index d18e73b..4aa6f01 100644
--- a/glib_io_ready_handler.h
+++ b/net/glib_io_ready_handler.h
@@ -2,15 +2,15 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef SHILL_GLIB_IO_READY_HANDLER_H_
-#define SHILL_GLIB_IO_READY_HANDLER_H_
+#ifndef SHILL_NET_GLIB_IO_READY_HANDLER_H_
+#define SHILL_NET_GLIB_IO_READY_HANDLER_H_
 
 #include <glib.h>
 #include <stdio.h>
 
 #include <base/callback.h>
 
-#include "shill/io_handler.h"
+#include "shill/net/io_handler.h"
 
 namespace shill {
 
@@ -40,4 +40,4 @@
 
 }  // namespace shill
 
-#endif  // SHILL_GLIB_IO_READY_HANDLER_H_
+#endif  // SHILL_NET_GLIB_IO_READY_HANDLER_H_
diff --git a/io_handler.h b/net/io_handler.h
similarity index 89%
rename from io_handler.h
rename to net/io_handler.h
index 6ae68e2..316934c 100644
--- a/io_handler.h
+++ b/net/io_handler.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef SHILL_IO_HANDLER_H_
-#define SHILL_IO_HANDLER_H_
+#ifndef SHILL_NET_IO_HANDLER_H_
+#define SHILL_NET_IO_HANDLER_H_
 
 #include <base/callback.h>
 
@@ -42,4 +42,4 @@
 
 }  // namespace shill
 
-#endif  // SHILL_IO_HANDLER_H_
+#endif  // SHILL_NET_IO_HANDLER_H_
diff --git a/io_handler_factory.cc b/net/io_handler_factory.cc
similarity index 89%
rename from io_handler_factory.cc
rename to net/io_handler_factory.cc
index 29bfee2..a79fe6e 100644
--- a/io_handler_factory.cc
+++ b/net/io_handler_factory.cc
@@ -2,14 +2,14 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "shill/io_handler_factory.h"
+#include "shill/net/io_handler_factory.h"
 
 #include <base/message_loop/message_loop.h>
 
-#include "shill/glib_io_input_handler.h"
-#include "shill/glib_io_ready_handler.h"
-#include "shill/io_input_handler.h"
-#include "shill/io_ready_handler.h"
+#include "shill/net/glib_io_input_handler.h"
+#include "shill/net/glib_io_ready_handler.h"
+#include "shill/net/io_input_handler.h"
+#include "shill/net/io_ready_handler.h"
 
 namespace shill {
 
diff --git a/io_handler_factory.h b/net/io_handler_factory.h
similarity index 84%
rename from io_handler_factory.h
rename to net/io_handler_factory.h
index 2ab9e16..2b46c8d 100644
--- a/io_handler_factory.h
+++ b/net/io_handler_factory.h
@@ -2,12 +2,12 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef SHILL_IO_HANDLER_FACTORY_H_
-#define SHILL_IO_HANDLER_FACTORY_H_
+#ifndef SHILL_NET_IO_HANDLER_FACTORY_H_
+#define SHILL_NET_IO_HANDLER_FACTORY_H_
 
 #include <base/lazy_instance.h>
 
-#include "shill/io_handler.h"
+#include "shill/net/io_handler.h"
 
 namespace shill {
 
@@ -39,4 +39,4 @@
 
 }  // namespace shill
 
-#endif  // SHILL_IO_HANDLER_FACTORY_H_
+#endif  // SHILL_NET_IO_HANDLER_FACTORY_H_
diff --git a/io_input_handler.cc b/net/io_input_handler.cc
similarity index 97%
rename from io_input_handler.cc
rename to net/io_input_handler.cc
index 0861df1..f5d616f 100644
--- a/io_input_handler.cc
+++ b/net/io_input_handler.cc
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "shill/io_input_handler.h"
+#include "shill/net/io_input_handler.h"
 
 #include <string>
 #include <unistd.h>
diff --git a/io_input_handler.h b/net/io_input_handler.h
similarity index 85%
rename from io_input_handler.h
rename to net/io_input_handler.h
index e6fae1e..1e654ed 100644
--- a/io_input_handler.h
+++ b/net/io_input_handler.h
@@ -2,12 +2,12 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef SHILL_IO_INPUT_HANDLER_H_
-#define SHILL_IO_INPUT_HANDLER_H_
+#ifndef SHILL_NET_IO_INPUT_HANDLER_H_
+#define SHILL_NET_IO_INPUT_HANDLER_H_
 
 #include <base/message_loop/message_loop.h>
 
-#include "shill/io_handler.h"
+#include "shill/net/io_handler.h"
 
 namespace shill {
 
@@ -36,4 +36,4 @@
 
 }  // namespace shill
 
-#endif  // SHILL_IO_INPUT_HANDLER_H_
+#endif  // SHILL_NET_IO_INPUT_HANDLER_H_
diff --git a/io_ready_handler.cc b/net/io_ready_handler.cc
similarity index 96%
rename from io_ready_handler.cc
rename to net/io_ready_handler.cc
index c7e6e1e..23ceed3 100644
--- a/io_ready_handler.cc
+++ b/net/io_ready_handler.cc
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "shill/io_ready_handler.h"
+#include "shill/net/io_ready_handler.h"
 
 #include <unistd.h>
 
diff --git a/io_ready_handler.h b/net/io_ready_handler.h
similarity index 87%
rename from io_ready_handler.h
rename to net/io_ready_handler.h
index 461d13f..9b97b52 100644
--- a/io_ready_handler.h
+++ b/net/io_ready_handler.h
@@ -2,12 +2,12 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef SHILL_IO_READY_HANDLER_H_
-#define SHILL_IO_READY_HANDLER_H_
+#ifndef SHILL_NET_IO_READY_HANDLER_H_
+#define SHILL_NET_IO_READY_HANDLER_H_
 
 #include <base/message_loop/message_loop.h>
 
-#include "shill/io_handler.h"
+#include "shill/net/io_handler.h"
 
 namespace shill {
 
@@ -39,4 +39,4 @@
 
 }  // namespace shill
 
-#endif  // SHILL_IO_READY_HANDLER_H_
+#endif  // SHILL_NET_IO_READY_HANDLER_H_
diff --git a/ip_address.cc b/net/ip_address.cc
similarity index 98%
rename from ip_address.cc
rename to net/ip_address.cc
index e6d6dcd..2e89a32 100644
--- a/ip_address.cc
+++ b/net/ip_address.cc
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "shill/ip_address.h"
+#include "shill/net/ip_address.h"
 
 #include <arpa/inet.h>
 #include <netinet/in.h>
@@ -10,11 +10,11 @@
 #include <string>
 #include <vector>
 
+#include <base/logging.h>
 #include <base/strings/string_number_conversions.h>
 #include <base/strings/string_split.h>
 
-#include "shill/byte_string.h"
-#include "shill/logging.h"
+#include "shill/net/byte_string.h"
 
 using std::string;
 using std::vector;
diff --git a/ip_address.h b/net/ip_address.h
similarity index 97%
rename from ip_address.h
rename to net/ip_address.h
index 1f58aab..f9512a0 100644
--- a/ip_address.h
+++ b/net/ip_address.h
@@ -2,12 +2,12 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef SHILL_IP_ADDRESS_H_
-#define SHILL_IP_ADDRESS_H_
+#ifndef SHILL_NET_IP_ADDRESS_H_
+#define SHILL_NET_IP_ADDRESS_H_
 
 #include <string>
 
-#include "shill/byte_string.h"
+#include "shill/net/byte_string.h"
 
 namespace shill {
 
@@ -141,4 +141,4 @@
 
 }  // namespace shill
 
-#endif  // SHILL_IP_ADDRESS_H_
+#endif  // SHILL_NET_IP_ADDRESS_H_
diff --git a/ip_address_unittest.cc b/net/ip_address_unittest.cc
similarity index 99%
rename from ip_address_unittest.cc
rename to net/ip_address_unittest.cc
index 32ea224..1c1d6ec 100644
--- a/ip_address_unittest.cc
+++ b/net/ip_address_unittest.cc
@@ -6,8 +6,8 @@
 
 #include <arpa/inet.h>
 
-#include "shill/byte_string.h"
-#include "shill/ip_address.h"
+#include "shill/net/byte_string.h"
+#include "shill/net/ip_address.h"
 
 using std::string;
 using testing::Test;
diff --git a/net/libshill-net.pc.in b/net/libshill-net.pc.in
new file mode 100644
index 0000000..c2c0de2
--- /dev/null
+++ b/net/libshill-net.pc.in
@@ -0,0 +1,7 @@
+bslot=@BSLOT@
+
+Name: libshill-net
+Description: Shill networking component interface library
+Version: ${bslot}
+Requires.private: @PRIVATE_PC@
+Libs: -lshill-net-${bslot}
diff --git a/mock_io_handler_factory.cc b/net/mock_io_handler_factory.cc
similarity index 91%
rename from mock_io_handler_factory.cc
rename to net/mock_io_handler_factory.cc
index d437c4a..d9ff613 100644
--- a/mock_io_handler_factory.cc
+++ b/net/mock_io_handler_factory.cc
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "shill/mock_io_handler_factory.h"
+#include "shill/net/mock_io_handler_factory.h"
 
 namespace shill {
 
diff --git a/mock_io_handler_factory.h b/net/mock_io_handler_factory.h
similarity index 85%
rename from mock_io_handler_factory.h
rename to net/mock_io_handler_factory.h
index 8d1a313..3429c42 100644
--- a/mock_io_handler_factory.h
+++ b/net/mock_io_handler_factory.h
@@ -2,13 +2,13 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef SHILL_MOCK_IO_HANDLER_FACTORY_H_
-#define SHILL_MOCK_IO_HANDLER_FACTORY_H_
+#ifndef SHILL_NET_MOCK_IO_HANDLER_FACTORY_H_
+#define SHILL_NET_MOCK_IO_HANDLER_FACTORY_H_
 
 #include <base/lazy_instance.h>
 #include <gmock/gmock.h>
 
-#include "shill/io_handler_factory.h"
+#include "shill/net/io_handler_factory.h"
 
 namespace shill {
 
@@ -42,4 +42,4 @@
 
 }  // namespace shill
 
-#endif  // SHILL_MOCK_IO_HANDLER_FACTORY_H_
+#endif  // SHILL_NET_MOCK_IO_HANDLER_FACTORY_H_
diff --git a/mock_rtnl_handler.cc b/net/mock_rtnl_handler.cc
similarity index 87%
rename from mock_rtnl_handler.cc
rename to net/mock_rtnl_handler.cc
index 01a3f72..9871068 100644
--- a/mock_rtnl_handler.cc
+++ b/net/mock_rtnl_handler.cc
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "shill/mock_rtnl_handler.h"
+#include "shill/net/mock_rtnl_handler.h"
 
 namespace shill {
 
diff --git a/mock_rtnl_handler.h b/net/mock_rtnl_handler.h
similarity index 89%
rename from mock_rtnl_handler.h
rename to net/mock_rtnl_handler.h
index a53919b..4d6e99f 100644
--- a/mock_rtnl_handler.h
+++ b/net/mock_rtnl_handler.h
@@ -2,15 +2,15 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef SHILL_MOCK_RTNL_HANDLER_H_
-#define SHILL_MOCK_RTNL_HANDLER_H_
+#ifndef SHILL_NET_MOCK_RTNL_HANDLER_H_
+#define SHILL_NET_MOCK_RTNL_HANDLER_H_
 
 #include <string>
 
 #include <base/macros.h>
 #include <gmock/gmock.h>
 
-#include "shill/rtnl_handler.h"
+#include "shill/net/rtnl_handler.h"
 
 namespace shill {
 
@@ -42,4 +42,4 @@
 
 }  // namespace shill
 
-#endif  // SHILL_MOCK_RTNL_HANDLER_H_
+#endif  // SHILL_NET_MOCK_RTNL_HANDLER_H_
diff --git a/mock_sockets.cc b/net/mock_sockets.cc
similarity index 88%
rename from mock_sockets.cc
rename to net/mock_sockets.cc
index 15b989f..fc139ba 100644
--- a/mock_sockets.cc
+++ b/net/mock_sockets.cc
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "shill/mock_sockets.h"
+#include "shill/net/mock_sockets.h"
 
 namespace shill {
 
diff --git a/mock_sockets.h b/net/mock_sockets.h
similarity index 94%
rename from mock_sockets.h
rename to net/mock_sockets.h
index e7a6761..9ec75a5 100644
--- a/mock_sockets.h
+++ b/net/mock_sockets.h
@@ -2,12 +2,12 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef SHILL_MOCK_SOCKETS_H_
-#define SHILL_MOCK_SOCKETS_H_
+#ifndef SHILL_NET_MOCK_SOCKETS_H_
+#define SHILL_NET_MOCK_SOCKETS_H_
 
 #include <string>
 
-#include "shill/sockets.h"
+#include "shill/net/sockets.h"
 
 #include <base/macros.h>
 #include <gmock/gmock.h>
@@ -64,4 +64,4 @@
 
 }  // namespace shill
 
-#endif  // SHILL_MOCK_SOCKETS_H_
+#endif  // SHILL_NET_MOCK_SOCKETS_H_
diff --git a/mock_time.cc b/net/mock_time.cc
similarity index 88%
rename from mock_time.cc
rename to net/mock_time.cc
index 754a1c7..9b5ae76 100644
--- a/mock_time.cc
+++ b/net/mock_time.cc
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "shill/mock_time.h"
+#include "shill/net/mock_time.h"
 
 namespace shill {
 
diff --git a/mock_time.h b/net/mock_time.h
similarity index 85%
rename from mock_time.h
rename to net/mock_time.h
index 0cc0be6..41426c1 100644
--- a/mock_time.h
+++ b/net/mock_time.h
@@ -2,10 +2,10 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef SHILL_MOCK_TIME_H_
-#define SHILL_MOCK_TIME_H_
+#ifndef SHILL_NET_MOCK_TIME_H_
+#define SHILL_NET_MOCK_TIME_H_
 
-#include "shill/shill_time.h"
+#include "shill/net/shill_time.h"
 
 #include <base/macros.h>
 #include <gmock/gmock.h>
@@ -31,4 +31,4 @@
 
 }  // namespace shill
 
-#endif  // SHILL_MOCK_TIME_H_
+#endif  // SHILL_NET_MOCK_TIME_H_
diff --git a/ndisc.h b/net/ndisc.h
similarity index 90%
rename from ndisc.h
rename to net/ndisc.h
index 4640bcd..3d368b3 100644
--- a/ndisc.h
+++ b/net/ndisc.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef SHILL_NDISC_H_
-#define SHILL_NDISC_H_
+#ifndef SHILL_NET_NDISC_H_
+#define SHILL_NET_NDISC_H_
 
 // Neighbor discovery related definitions. This is needed because kernel
 // currently does not export these definitions to the user space.
@@ -29,4 +29,4 @@
 // Infinity lifetime.
 #define ND_OPT_LIFETIME_INFINITY 0xFFFFFFFF
 
-#endif  // SHILL_NDISC_H_
+#endif  // SHILL_NET_NDISC_H_
diff --git a/net/preinstall.sh b/net/preinstall.sh
new file mode 100755
index 0000000..85b098e
--- /dev/null
+++ b/net/preinstall.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+# Copyright 2014 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+set -e
+
+OUT=$1
+v=$2
+
+deps=$(<"${OUT}"/gen/libshill-net-${v}-deps.txt)
+sed \
+  -e "s/@BSLOT@/${v}/g" \
+  -e "s/@PRIVATE_PC@/${deps}/g" \
+  "net/libshill-net.pc.in" > "${OUT}/lib/libshill-net-${v}.pc"
diff --git a/rtnl_handler.cc b/net/rtnl_handler.cc
similarity index 87%
rename from rtnl_handler.cc
rename to net/rtnl_handler.cc
index 6b26bac..84eb241 100644
--- a/rtnl_handler.cc
+++ b/net/rtnl_handler.cc
@@ -17,18 +17,16 @@
 #include <unistd.h>
 
 #include <base/bind.h>
+#include <base/logging.h>
 
 #include "shill/error.h"
-#include "shill/event_dispatcher.h"
-#include "shill/io_handler.h"
-#include "shill/ip_address.h"
-#include "shill/ipconfig.h"
-#include "shill/logging.h"
-#include "shill/ndisc.h"
-#include "shill/rtnl_handler.h"
-#include "shill/rtnl_listener.h"
-#include "shill/rtnl_message.h"
-#include "shill/sockets.h"
+#include "shill/net/io_handler.h"
+#include "shill/net/ip_address.h"
+#include "shill/net/ndisc.h"
+#include "shill/net/rtnl_handler.h"
+#include "shill/net/rtnl_listener.h"
+#include "shill/net/rtnl_message.h"
+#include "shill/net/sockets.h"
 
 using base::Bind;
 using base::Unretained;
@@ -52,11 +50,11 @@
       last_dump_sequence_(0),
       rtnl_callback_(Bind(&RTNLHandler::ParseRTNL, Unretained(this))),
       io_handler_factory_(IOHandlerFactory::GetInstance()) {
-  SLOG(RTNL, 2) << "RTNLHandler created";
+  VLOG(2) << "RTNLHandler created";
 }
 
 RTNLHandler::~RTNLHandler() {
-  SLOG(RTNL, 2) << "RTNLHandler removed";
+  VLOG(2) << "RTNLHandler removed";
   Stop();
 }
 
@@ -102,7 +100,7 @@
   sockets_ = sockets;
 
   NextRequest(last_dump_sequence_);
-  SLOG(RTNL, 2) << "RTNLHandler started";
+  VLOG(2) << "RTNLHandler started";
 }
 
 void RTNLHandler::Stop() {
@@ -118,7 +116,7 @@
   in_request_ = false;
   sockets_ = nullptr;
   request_flags_ = 0;
-  SLOG(RTNL, 2) << "RTNLHandler stopped";
+  VLOG(2) << "RTNLHandler stopped";
 }
 
 void RTNLHandler::AddListener(RTNLListener *to_add) {
@@ -127,7 +125,7 @@
       return;
   }
   listeners_.push_back(to_add);
-  SLOG(RTNL, 2) << "RTNLHandler added listener";
+  VLOG(2) << "RTNLHandler added listener";
 }
 
 void RTNLHandler::RemoveListener(RTNLListener *to_remove) {
@@ -137,7 +135,7 @@
       return;
     }
   }
-  SLOG(RTNL, 2) << "RTNLHandler removed listener";
+  VLOG(2) << "RTNLHandler removed listener";
 }
 
 void RTNLHandler::SetInterfaceFlags(int interface_index, unsigned int flags,
@@ -173,7 +171,7 @@
 void RTNLHandler::RequestDump(int request_flags) {
   request_flags_ |= request_flags;
 
-  SLOG(RTNL, 2) << "RTNLHandler got request to dump "
+  VLOG(2) << "RTNLHandler got request to dump "
           << std::showbase << std::hex
           << request_flags
           << std::dec << std::noshowbase;
@@ -192,11 +190,11 @@
   int flag = 0;
   RTNLMessage::Type type;
 
-  SLOG(RTNL, 2) << "RTNLHandler nextrequest " << seq << " "
-                << last_dump_sequence_
-                << std::showbase << std::hex
-                << " " << request_flags_
-                << std::dec << std::noshowbase;
+  VLOG(2) << "RTNLHandler nextrequest " << seq << " "
+          << last_dump_sequence_
+          << std::showbase << std::hex
+          << " " << request_flags_
+          << std::dec << std::noshowbase;
 
   if (seq != last_dump_sequence_)
     return;
@@ -211,7 +209,7 @@
     type = RTNLMessage::kTypeLink;
     flag = kRequestLink;
   } else {
-    SLOG(RTNL, 2) << "Done with requests";
+    VLOG(2) << "Done with requests";
     in_request_ = false;
     return;
   }
@@ -240,17 +238,17 @@
     if (!NLMSG_OK(hdr, static_cast<unsigned int>(end - buf)))
       break;
 
-    SLOG(RTNL, 3) << __func__ << ": received payload (" << end - buf << ")";
+    VLOG(3) << __func__ << ": received payload (" << end - buf << ")";
 
     RTNLMessage msg;
     ByteString payload(reinterpret_cast<unsigned char *>(hdr), hdr->nlmsg_len);
-    SLOG(RTNL, 5) << "RTNL received payload length " << payload.GetLength()
-                  << ": \"" << payload.HexEncode() << "\"";
+    VLOG(5) << "RTNL received payload length " << payload.GetLength()
+            << ": \"" << payload.HexEncode() << "\"";
     if (!msg.Decode(payload)) {
-      SLOG(RTNL, 3) << __func__ << ": rtnl packet type "
-                    << hdr->nlmsg_type
-                    << " length " << hdr->nlmsg_len
-                    << " sequence " << hdr->nlmsg_seq;
+      VLOG(3) << __func__ << ": rtnl packet type "
+              << hdr->nlmsg_type
+              << " length " << hdr->nlmsg_len
+              << " sequence " << hdr->nlmsg_seq;
 
       switch (hdr->nlmsg_type) {
         case NLMSG_NOOP:
@@ -397,7 +395,7 @@
     return false;
   }
 
-  SLOG(RTNL, 5) << "RTNL sending payload with request sequence "
+  VLOG(5) << "RTNL sending payload with request sequence "
                 << request_sequence_ << ", length " << msgdata.GetLength()
                 << ": \"" << msgdata.HexEncode() << "\"";
 
diff --git a/rtnl_handler.h b/net/rtnl_handler.h
similarity index 95%
rename from rtnl_handler.h
rename to net/rtnl_handler.h
index fc81117..c67efc7 100644
--- a/rtnl_handler.h
+++ b/net/rtnl_handler.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef SHILL_RTNL_HANDLER_H_
-#define SHILL_RTNL_HANDLER_H_
+#ifndef SHILL_NET_RTNL_HANDLER_H_
+#define SHILL_NET_RTNL_HANDLER_H_
 
 #include <memory>
 #include <string>
@@ -14,18 +14,15 @@
 #include <base/memory/ref_counted.h>
 #include <gtest/gtest_prod.h>  // for FRIEND_TEST
 
-#include "shill/device.h"
-
-#include "shill/io_handler_factory.h"
-#include "shill/rtnl_listener.h"
-#include "shill/rtnl_message.h"
+#include "shill/net/io_handler_factory.h"
+#include "shill/net/rtnl_listener.h"
+#include "shill/net/rtnl_message.h"
 
 struct nlmsghdr;
 
 namespace shill {
 
 class Error;
-class IPConfig;
 class Sockets;
 
 // This singleton class is responsible for interacting with the RTNL subsystem.
@@ -155,4 +152,4 @@
 
 }  // namespace shill
 
-#endif  // SHILL_RTNL_HANDLER_H_
+#endif  // SHILL_NET_RTNL_HANDLER_H_
diff --git a/rtnl_handler_unittest.cc b/net/rtnl_handler_unittest.cc
similarity index 86%
rename from rtnl_handler_unittest.cc
rename to net/rtnl_handler_unittest.cc
index c906c9c..bf4611a 100644
--- a/rtnl_handler_unittest.cc
+++ b/net/rtnl_handler_unittest.cc
@@ -4,7 +4,6 @@
 
 #include <string>
 
-#include <glib.h>
 #include <gtest/gtest.h>
 #include <net/if.h>
 #include <sys/socket.h>
@@ -14,16 +13,10 @@
 
 #include <base/bind.h>
 
-#include "shill/manager.h"
-#include "shill/mock_control.h"
-#include "shill/mock_event_dispatcher.h"
-#include "shill/mock_glib.h"
-#include "shill/mock_io_handler_factory.h"
-#include "shill/mock_manager.h"
-#include "shill/mock_metrics.h"
-#include "shill/mock_sockets.h"
-#include "shill/rtnl_handler.h"
-#include "shill/rtnl_message.h"
+#include "shill/net/mock_io_handler_factory.h"
+#include "shill/net/mock_sockets.h"
+#include "shill/net/rtnl_handler.h"
+#include "shill/net/rtnl_message.h"
 
 using base::Bind;
 using base::Callback;
@@ -53,9 +46,7 @@
 class RTNLHandlerTest : public Test {
  public:
   RTNLHandlerTest()
-      : metrics_(&dispatcher_),
-        manager_(&control_interface_, &dispatcher_, &metrics_, &glib_),
-        callback_(Bind(&RTNLHandlerTest::HandlerCallback, Unretained(this))) {
+      : callback_(Bind(&RTNLHandlerTest::HandlerCallback, Unretained(this))) {
   }
 
   virtual void SetUp() {
@@ -82,11 +73,6 @@
   }
 
   StrictMock<MockSockets> sockets_;
-  MockGLib glib_;
-  MockControl control_interface_;
-  MockMetrics metrics_;
-  MockManager manager_;
-  MockEventDispatcher dispatcher_;
   StrictMock<MockIOHandlerFactory> io_handler_factory_;
   Callback<void(const RTNLMessage &)> callback_;
 };
diff --git a/rtnl_listener.cc b/net/rtnl_listener.cc
similarity index 90%
rename from rtnl_listener.cc
rename to net/rtnl_listener.cc
index f1dec6f..86d6e75 100644
--- a/rtnl_listener.cc
+++ b/net/rtnl_listener.cc
@@ -2,9 +2,9 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "shill/rtnl_listener.h"
+#include "shill/net/rtnl_listener.h"
 
-#include "shill/rtnl_handler.h"
+#include "shill/net/rtnl_handler.h"
 
 using base::Callback;
 
diff --git a/rtnl_listener.h b/net/rtnl_listener.h
similarity index 84%
rename from rtnl_listener.h
rename to net/rtnl_listener.h
index bdd23b2..d7f5ccc 100644
--- a/rtnl_listener.h
+++ b/net/rtnl_listener.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef SHILL_RTNL_LISTENER_H_
-#define SHILL_RTNL_LISTENER_H_
+#ifndef SHILL_NET_RTNL_LISTENER_H_
+#define SHILL_NET_RTNL_LISTENER_H_
 
 #include <base/callback.h>
 
@@ -28,4 +28,4 @@
 
 }  // namespace shill
 
-#endif  // SHILL_RTNL_LISTENER_H_
+#endif  // SHILL_NET_RTNL_LISTENER_H_
diff --git a/rtnl_listener_unittest.cc b/net/rtnl_listener_unittest.cc
similarity index 93%
rename from rtnl_listener_unittest.cc
rename to net/rtnl_listener_unittest.cc
index 7822224..268c9ae 100644
--- a/rtnl_listener_unittest.cc
+++ b/net/rtnl_listener_unittest.cc
@@ -9,9 +9,9 @@
 #include <gmock/gmock.h>
 #include <gtest/gtest.h>
 
-#include "shill/rtnl_handler.h"
-#include "shill/rtnl_listener.h"
-#include "shill/rtnl_message.h"
+#include "shill/net/rtnl_handler.h"
+#include "shill/net/rtnl_listener.h"
+#include "shill/net/rtnl_message.h"
 
 using base::Bind;
 using base::Callback;
diff --git a/rtnl_message.cc b/net/rtnl_message.cc
similarity index 98%
rename from rtnl_message.cc
rename to net/rtnl_message.cc
index e0c1124..62c80d0 100644
--- a/rtnl_message.cc
+++ b/net/rtnl_message.cc
@@ -2,15 +2,16 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "shill/rtnl_message.h"
+#include "shill/net/rtnl_message.h"
 
 #include <linux/netlink.h>
 #include <linux/rtnetlink.h>
 #include <netinet/in.h>
 #include <sys/socket.h>
 
-#include "shill/logging.h"
-#include "shill/ndisc.h"
+#include <base/logging.h>
+
+#include "shill/net/ndisc.h"
 
 namespace shill {
 
diff --git a/rtnl_message.h b/net/rtnl_message.h
similarity index 96%
rename from rtnl_message.h
rename to net/rtnl_message.h
index 6c4a7a8..10fcc0e 100644
--- a/rtnl_message.h
+++ b/net/rtnl_message.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef SHILL_RTNL_MESSAGE_H_
-#define SHILL_RTNL_MESSAGE_H_
+#ifndef SHILL_NET_RTNL_MESSAGE_H_
+#define SHILL_NET_RTNL_MESSAGE_H_
 
 #include <unordered_map>
 #include <vector>
@@ -11,8 +11,8 @@
 #include <base/macros.h>
 #include <base/stl_util.h>
 
-#include "shill/byte_string.h"
-#include "shill/ip_address.h"
+#include "shill/net/byte_string.h"
+#include "shill/net/ip_address.h"
 
 struct rtattr;
 
@@ -215,4 +215,4 @@
 
 }  // namespace shill
 
-#endif  // SHILL_RTNL_MESSAGE_H_
+#endif  // SHILL_NET_RTNL_MESSAGE_H_
diff --git a/rtnl_message_unittest.cc b/net/rtnl_message_unittest.cc
similarity index 99%
rename from rtnl_message_unittest.cc
rename to net/rtnl_message_unittest.cc
index fc12147..bb90427 100644
--- a/rtnl_message_unittest.cc
+++ b/net/rtnl_message_unittest.cc
@@ -11,9 +11,9 @@
 
 #include <gtest/gtest.h>
 
-#include "shill/byte_string.h"
-#include "shill/ip_address.h"
-#include "shill/rtnl_message.h"
+#include "shill/net/byte_string.h"
+#include "shill/net/ip_address.h"
+#include "shill/net/rtnl_message.h"
 
 using std::string;
 using testing::Test;
diff --git a/shill_time.cc b/net/shill_time.cc
similarity index 98%
rename from shill_time.cc
rename to net/shill_time.cc
index 1e9bd5c..ac7afb4 100644
--- a/shill_time.cc
+++ b/net/shill_time.cc
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "shill/shill_time.h"
+#include "shill/net/shill_time.h"
 
 #include <string.h>
 #include <time.h>
diff --git a/shill_time.h b/net/shill_time.h
similarity index 95%
rename from shill_time.h
rename to net/shill_time.h
index 80fd406..48e3cf1 100644
--- a/shill_time.h
+++ b/net/shill_time.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef SHILL_SHILL_TIME_H_
-#define SHILL_SHILL_TIME_H_
+#ifndef SHILL_NET_SHILL_TIME_H_
+#define SHILL_NET_SHILL_TIME_H_
 
 #include <sys/time.h>
 #include <time.h>
@@ -74,4 +74,4 @@
 
 }  // namespace shill
 
-#endif  // SHILL_SHILL_TIME_H_
+#endif  // SHILL_NET_SHILL_TIME_H_
diff --git a/shill_time_unittest.cc b/net/shill_time_unittest.cc
similarity index 94%
rename from shill_time_unittest.cc
rename to net/shill_time_unittest.cc
index 11dba36..f563244 100644
--- a/shill_time_unittest.cc
+++ b/net/shill_time_unittest.cc
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "shill/shill_time.h"
+#include "shill/net/shill_time.h"
 
 #include <time.h>
 
diff --git a/sockets.cc b/net/sockets.cc
similarity index 98%
rename from sockets.cc
rename to net/sockets.cc
index 488ced0..2e6be2f 100644
--- a/sockets.cc
+++ b/net/sockets.cc
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "shill/sockets.h"
+#include "shill/net/sockets.h"
 
 #include <errno.h>
 #include <fcntl.h>
@@ -12,10 +12,9 @@
 #include <sys/socket.h>
 #include <unistd.h>
 
+#include <base/logging.h>
 #include <base/posix/eintr_wrapper.h>
 
-#include "shill/logging.h"
-
 namespace shill {
 
 Sockets::Sockets() {}
diff --git a/sockets.h b/net/sockets.h
similarity index 96%
rename from sockets.h
rename to net/sockets.h
index ed7f750..0521031 100644
--- a/sockets.h
+++ b/net/sockets.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef SHILL_SOCKETS_H_
-#define SHILL_SOCKETS_H_
+#ifndef SHILL_NET_SOCKETS_H_
+#define SHILL_NET_SOCKETS_H_
 
 #include <linux/filter.h>
 #include <sys/socket.h>
@@ -122,4 +122,4 @@
 
 }  // namespace shill
 
-#endif  // SHILL_SOCKETS_H_
+#endif  // SHILL_NET_SOCKETS_H_
diff --git a/netlink_attribute.h b/netlink_attribute.h
index 9c65188..520fd7e 100644
--- a/netlink_attribute.h
+++ b/netlink_attribute.h
@@ -13,8 +13,8 @@
 #include <base/macros.h>
 
 #include "shill/attribute_list.h"
-#include "shill/byte_string.h"
 #include "shill/logging.h"
+#include "shill/net/byte_string.h"
 #include "shill/refptr_types.h"
 
 struct nlattr;
diff --git a/netlink_manager.cc b/netlink_manager.cc
index 0ffd1bf..4fd24c0 100644
--- a/netlink_manager.cc
+++ b/netlink_manager.cc
@@ -18,13 +18,13 @@
 #include "shill/error.h"
 #include "shill/event_dispatcher.h"
 #include "shill/generic_netlink_message.h"
-#include "shill/io_handler.h"
 #include "shill/logging.h"
+#include "shill/net/io_handler.h"
+#include "shill/net/shill_time.h"
+#include "shill/net/sockets.h"
 #include "shill/netlink_message.h"
 #include "shill/nl80211_message.h"
 #include "shill/scope_logger.h"
-#include "shill/shill_time.h"
-#include "shill/sockets.h"
 
 using base::Bind;
 using base::LazyInstance;
diff --git a/netlink_manager.h b/netlink_manager.h
index 709612a..d871fd8 100644
--- a/netlink_manager.h
+++ b/netlink_manager.h
@@ -67,10 +67,10 @@
 #include <gtest/gtest_prod.h>  // for FRIEND_TEST
 
 #include "shill/generic_netlink_message.h"
-#include "shill/io_handler_factory.h"
+#include "shill/net/io_handler_factory.h"
+#include "shill/net/shill_time.h"
 #include "shill/netlink_message.h"
 #include "shill/netlink_socket.h"
-#include "shill/shill_time.h"
 
 struct nlmsghdr;
 
diff --git a/netlink_manager_unittest.cc b/netlink_manager_unittest.cc
index 32f64ea..59b7886 100644
--- a/netlink_manager_unittest.cc
+++ b/netlink_manager_unittest.cc
@@ -18,13 +18,13 @@
 #include <gmock/gmock.h>
 #include <gtest/gtest.h>
 
-#include "shill/io_handler.h"
 #include "shill/mock_event_dispatcher.h"
-#include "shill/mock_io_handler_factory.h"
 #include "shill/mock_log.h"
 #include "shill/mock_netlink_socket.h"
-#include "shill/mock_sockets.h"
-#include "shill/mock_time.h"
+#include "shill/net/io_handler.h"
+#include "shill/net/mock_io_handler_factory.h"
+#include "shill/net/mock_sockets.h"
+#include "shill/net/mock_time.h"
 #include "shill/netlink_attribute.h"
 #include "shill/nl80211_message.h"
 #include "shill/scope_logger.h"
diff --git a/netlink_message.h b/netlink_message.h
index 40989a4..ec5f64c 100644
--- a/netlink_message.h
+++ b/netlink_message.h
@@ -14,7 +14,7 @@
 
 #include <gtest/gtest.h>  // for FRIEND_TEST.
 
-#include "shill/byte_string.h"
+#include "shill/net/byte_string.h"
 
 struct nlmsghdr;
 
diff --git a/netlink_socket.cc b/netlink_socket.cc
index 4e3c1b3..dd8f70a 100644
--- a/netlink_socket.cc
+++ b/netlink_socket.cc
@@ -9,8 +9,8 @@
 #include <sys/socket.h>
 
 #include "shill/logging.h"
+#include "shill/net/sockets.h"
 #include "shill/netlink_message.h"
-#include "shill/sockets.h"
 
 // This is from a version of linux/socket.h that we don't have.
 #define SOL_NETLINK 270
diff --git a/netlink_socket_unittest.cc b/netlink_socket_unittest.cc
index 049313f..2b518c2 100644
--- a/netlink_socket_unittest.cc
+++ b/netlink_socket_unittest.cc
@@ -12,8 +12,8 @@
 #include <gmock/gmock.h>
 #include <gtest/gtest.h>
 
-#include "shill/byte_string.h"
-#include "shill/mock_sockets.h"
+#include "shill/net/byte_string.h"
+#include "shill/net/mock_sockets.h"
 #include "shill/netlink_message.h"
 
 using std::min;
diff --git a/nl80211_message.h b/nl80211_message.h
index baf51c3..b9cf5d9 100644
--- a/nl80211_message.h
+++ b/nl80211_message.h
@@ -11,8 +11,8 @@
 
 #include <base/lazy_instance.h>
 
-#include "shill/byte_string.h"
 #include "shill/generic_netlink_message.h"
+#include "shill/net/byte_string.h"
 
 struct nlmsghdr;
 
diff --git a/openvpn_driver.cc b/openvpn_driver.cc
index 1cf7389..9db51ac 100644
--- a/openvpn_driver.cc
+++ b/openvpn_driver.cc
@@ -19,10 +19,10 @@
 #include "shill/error.h"
 #include "shill/logging.h"
 #include "shill/manager.h"
+#include "shill/net/sockets.h"
 #include "shill/openvpn_management_server.h"
 #include "shill/process_killer.h"
 #include "shill/rpc_task.h"
-#include "shill/sockets.h"
 #include "shill/virtual_device.h"
 #include "shill/vpn_service.h"
 
diff --git a/openvpn_driver.h b/openvpn_driver.h
index a00d598..20db682 100644
--- a/openvpn_driver.h
+++ b/openvpn_driver.h
@@ -15,10 +15,10 @@
 
 #include "shill/glib.h"
 #include "shill/ipconfig.h"
+#include "shill/net/sockets.h"
 #include "shill/refptr_types.h"
 #include "shill/rpc_task.h"
 #include "shill/service.h"
-#include "shill/sockets.h"
 #include "shill/vpn_driver.h"
 
 namespace base {
diff --git a/openvpn_management_server.cc b/openvpn_management_server.cc
index d88a662..de6e2f9 100644
--- a/openvpn_management_server.cc
+++ b/openvpn_management_server.cc
@@ -18,8 +18,8 @@
 #include "shill/event_dispatcher.h"
 #include "shill/glib.h"
 #include "shill/logging.h"
+#include "shill/net/sockets.h"
 #include "shill/openvpn_driver.h"
-#include "shill/sockets.h"
 
 using base::Bind;
 using base::IntToString;
diff --git a/openvpn_management_server_unittest.cc b/openvpn_management_server_unittest.cc
index 3a9c30d..a449834 100644
--- a/openvpn_management_server_unittest.cc
+++ b/openvpn_management_server_unittest.cc
@@ -13,7 +13,7 @@
 #include "shill/key_value_store.h"
 #include "shill/mock_event_dispatcher.h"
 #include "shill/mock_openvpn_driver.h"
-#include "shill/mock_sockets.h"
+#include "shill/net/mock_sockets.h"
 
 using base::Bind;
 using base::Unretained;
diff --git a/portal_detector.h b/portal_detector.h
index ffec074..6119fcb 100644
--- a/portal_detector.h
+++ b/portal_detector.h
@@ -16,8 +16,8 @@
 #include <gtest/gtest_prod.h>  // for FRIEND_TEST
 
 #include "shill/connectivity_trial.h"
+#include "shill/net/shill_time.h"
 #include "shill/refptr_types.h"
-#include "shill/shill_time.h"
 
 namespace shill {
 
diff --git a/portal_detector_unittest.cc b/portal_detector_unittest.cc
index e49163b..c3b3cba 100644
--- a/portal_detector_unittest.cc
+++ b/portal_detector_unittest.cc
@@ -17,7 +17,7 @@
 #include "shill/mock_control.h"
 #include "shill/mock_device_info.h"
 #include "shill/mock_event_dispatcher.h"
-#include "shill/mock_time.h"
+#include "shill/net/mock_time.h"
 
 using base::Bind;
 using base::Callback;
diff --git a/routing_table.cc b/routing_table.cc
index 3f8df00..c3f578c 100644
--- a/routing_table.cc
+++ b/routing_table.cc
@@ -25,12 +25,13 @@
 #include <base/stl_util.h>
 #include <base/strings/stringprintf.h>
 
-#include "shill/byte_string.h"
+#include "shill/ipconfig.h"
 #include "shill/logging.h"
+#include "shill/net/byte_string.h"
+#include "shill/net/rtnl_handler.h"
+#include "shill/net/rtnl_listener.h"
+#include "shill/net/rtnl_message.h"
 #include "shill/routing_table_entry.h"
-#include "shill/rtnl_handler.h"
-#include "shill/rtnl_listener.h"
-#include "shill/rtnl_message.h"
 
 using base::Bind;
 using base::FilePath;
diff --git a/routing_table.h b/routing_table.h
index 679d86a..7060d97 100644
--- a/routing_table.h
+++ b/routing_table.h
@@ -15,9 +15,9 @@
 #include <base/lazy_instance.h>
 #include <base/memory/ref_counted.h>
 
-#include "shill/ip_address.h"
+#include "shill/net/ip_address.h"
+#include "shill/net/rtnl_message.h"
 #include "shill/refptr_types.h"
-#include "shill/rtnl_message.h"
 
 namespace shill {
 
diff --git a/routing_table_entry.h b/routing_table_entry.h
index 73837c1..a2e3d76 100644
--- a/routing_table_entry.h
+++ b/routing_table_entry.h
@@ -5,7 +5,7 @@
 #ifndef SHILL_ROUTING_TABLE_ENTRY_H_
 #define SHILL_ROUTING_TABLE_ENTRY_H_
 
-#include "shill/ip_address.h"
+#include "shill/net/ip_address.h"
 
 namespace shill {
 
diff --git a/routing_table_unittest.cc b/routing_table_unittest.cc
index a1d43a6..b28851e 100644
--- a/routing_table_unittest.cc
+++ b/routing_table_unittest.cc
@@ -8,19 +8,22 @@
 #include <memory>
 #include <vector>
 
+#include <base/bind.h>
+#include <base/callback.h>
 #include <base/memory/weak_ptr.h>
 #include <base/stl_util.h>
 #include <gtest/gtest.h>
 #include <gmock/gmock.h>
 
-#include "shill/byte_string.h"
+#include "shill/event_dispatcher.h"
+#include "shill/ipconfig.h"
 #include "shill/logging.h"
 #include "shill/mock_control.h"
-#include "shill/mock_rtnl_handler.h"
+#include "shill/net/byte_string.h"
+#include "shill/net/mock_rtnl_handler.h"
+#include "shill/net/rtnl_message.h"
 #include "shill/routing_table.h"
 #include "shill/routing_table_entry.h"
-#include "shill/rtnl_handler.h"
-#include "shill/rtnl_message.h"
 
 using base::Bind;
 using base::Callback;
diff --git a/scan_session.h b/scan_session.h
index ccb279a..89472ce 100644
--- a/scan_session.h
+++ b/scan_session.h
@@ -15,7 +15,7 @@
 #include <gtest/gtest_prod.h>  // for FRIEND_TEST
 #include <metrics/timer.h>
 
-#include "shill/byte_string.h"
+#include "shill/net/byte_string.h"
 #include "shill/netlink_manager.h"
 #include "shill/wifi_provider.h"
 
diff --git a/service.cc b/service.cc
index 1443b61..cff2fd3 100644
--- a/service.cc
+++ b/service.cc
@@ -26,12 +26,12 @@
 #include "shill/logging.h"
 #include "shill/manager.h"
 #include "shill/metrics.h"
+#include "shill/net/sockets.h"
 #include "shill/profile.h"
 #include "shill/property_accessor.h"
 #include "shill/refptr_types.h"
 #include "shill/service_dbus_adaptor.h"
 #include "shill/service_property_change_notifier.h"
-#include "shill/sockets.h"
 #include "shill/store_interface.h"
 
 using base::Bind;
diff --git a/service.h b/service.h
index b0ab70f..b62d145 100644
--- a/service.h
+++ b/service.h
@@ -22,9 +22,9 @@
 #include "shill/accessor_interface.h"
 #include "shill/adaptor_interfaces.h"
 #include "shill/callbacks.h"
+#include "shill/net/shill_time.h"
 #include "shill/property_store.h"
 #include "shill/refptr_types.h"
-#include "shill/shill_time.h"
 #include "shill/static_ip_parameters.h"
 #include "shill/technology.h"
 
diff --git a/service_unittest.cc b/service_unittest.cc
index 7410146..2eba9de 100644
--- a/service_unittest.cc
+++ b/service_unittest.cc
@@ -34,7 +34,7 @@
 #include "shill/mock_proxy_factory.h"
 #include "shill/mock_service.h"
 #include "shill/mock_store.h"
-#include "shill/mock_time.h"
+#include "shill/net/mock_time.h"
 #include "shill/property_store_unittest.h"
 #include "shill/service_property_change_test.h"
 #include "shill/service_sorter.h"
diff --git a/shill.gyp b/shill.gyp
index 1105284..aa27c1e 100644
--- a/shill.gyp
+++ b/shill.gyp
@@ -132,6 +132,51 @@
       ],
     },
     {
+      'target_name': 'libshill-net-<(libbase_ver)',
+      'type': 'shared_library',
+      'variables': {
+        'exported_deps': [
+          'dbus-c++-1',
+          'glib-2.0',
+        ],
+        'deps': ['<@(exported_deps)'],
+      },
+      'cflags': [
+        '-fvisibility=default',
+      ],
+      'sources': [
+        'error.cc',
+        'net/byte_string.cc',
+        'net/glib_io_input_handler.cc',
+        'net/glib_io_ready_handler.cc',
+        'net/io_handler_factory.cc',
+        'net/io_input_handler.cc',
+        'net/io_ready_handler.cc',
+        'net/ip_address.cc',
+        'net/rtnl_handler.cc',
+        'net/rtnl_listener.cc',
+        'net/rtnl_message.cc',
+        'net/shill_time.cc',
+        'net/sockets.cc',
+      ],
+      'includes': ['../common-mk/deps.gypi'],
+    },
+    {
+      'target_name': 'libshill-net-test-<(libbase_ver)',
+      'type': 'static_library',
+      'standalone_static_library': 1,
+      'dependencies': [
+        'libshill-net-<(libbase_ver)',
+      ],
+      'sources': [
+        'net/mock_io_handler_factory.cc',
+        'net/mock_rtnl_handler.cc',
+        'net/mock_sockets.cc',
+        'net/mock_time.cc',
+      ],
+      'includes': ['../common-mk/deps.gypi'],
+    },
+    {
       'target_name': 'libshill',
       'type': 'static_library',
       'dependencies': [
@@ -139,6 +184,7 @@
         'shill-adaptors',
         'shill-proxies',
         'shim-protos',
+        'libshill-net-<(libbase_ver)',
       ],
       'variables': {
         'exported_deps': [
@@ -256,7 +302,6 @@
         'arp_packet.cc',
         'async_connection.cc',
         'attribute_list.cc',
-        'byte_string.cc',
         'callback80211_metrics.cc',
         'certificate_file.cc',
         'connection.cc',
@@ -292,7 +337,6 @@
         'eap_listener.cc',
         'endpoint.cc',
         'ephemeral_profile.cc',
-        'error.cc',
         'ethernet.cc',
         'ethernet_eap_provider.cc',
         'ethernet_eap_service.cc',
@@ -304,17 +348,11 @@
         'generic_netlink_message.cc',
         'geolocation_info.cc',
         'glib.cc',
-        'glib_io_input_handler.cc',
-        'glib_io_ready_handler.cc',
         'hook_table.cc',
         'http_proxy.cc',
         'http_request.cc',
         'http_url.cc',
         'icmp.cc',
-        'io_handler_factory.cc',
-        'io_input_handler.cc',
-        'io_ready_handler.cc',
-        'ip_address.cc',
         'ip_address_store.cc',
         'ipconfig.cc',
         'ipconfig_dbus_adaptor.cc',
@@ -349,9 +387,6 @@
         'routing_table.cc',
         'rpc_task.cc',
         'rpc_task_dbus_adaptor.cc',
-        'rtnl_handler.cc',
-        'rtnl_listener.cc',
-        'rtnl_message.cc',
         'scan_session.cc',
         'scope_logger.cc',
         'scoped_umask.cc',
@@ -362,10 +397,8 @@
         'shill_config.cc',
         'shill_daemon.cc',
         'shill_test_config.cc',
-        'shill_time.cc',
         'socket_info.cc',
         'socket_info_reader.cc',
-        'sockets.cc',
         'static_ip_parameters.cc',
         'supplicant_bss_proxy.cc',
         'supplicant_eap_state_handler.cc',
@@ -491,7 +524,10 @@
         {
           'target_name': 'shill_unittest',
           'type': 'executable',
-          'dependencies': ['libshill'],
+          'dependencies': [
+            'libshill',
+            'libshill-net-test-<(libbase_ver)',
+          ],
           'includes': ['../common-mk/common_test.gypi'],
           'variables': {
             'deps': [
@@ -506,7 +542,6 @@
             'arp_client_unittest.cc',
             'arp_packet_unittest.cc',
             'async_connection_unittest.cc',
-            'byte_string_unittest.cc',
             'callback80211_metrics_unittest.cc',
             'certificate_file_unittest.cc',
             'connection_health_checker_unittest.cc',
@@ -547,10 +582,15 @@
             'http_url_unittest.cc',
             'icmp_unittest.cc',
             'ip_address_store_unittest.cc',
-            'ip_address_unittest.cc',
             'ipconfig_unittest.cc',
             'key_file_store_unittest.cc',
             'key_value_store_unittest.cc',
+            'net/byte_string_unittest.cc',
+            'net/ip_address_unittest.cc',
+            'net/rtnl_handler_unittest.cc',
+            'net/rtnl_listener_unittest.cc',
+            'net/rtnl_message_unittest.cc',
+            'net/shill_time_unittest.cc',
             'link_monitor_unittest.cc',
             'mac80211_monitor_unittest.cc',
             'manager_unittest.cc',
@@ -587,7 +627,6 @@
             'mock_external_task.cc',
             'mock_glib.cc',
             'mock_http_request.cc',
-            'mock_io_handler_factory.cc',
             'mock_ip_address_store.cc',
             'mock_ipconfig.cc',
             'mock_link_monitor.cc',
@@ -609,18 +648,15 @@
             'mock_proxy_factory.cc',
             'mock_resolver.cc',
             'mock_routing_table.cc',
-            'mock_rtnl_handler.cc',
             'mock_scan_session.cc',
             'mock_service.cc',
             'mock_socket_info_reader.cc',
-            'mock_sockets.cc',
             'mock_store.cc',
             'mock_supplicant_bss_proxy.cc',
             'mock_supplicant_eap_state_handler.cc',
             'mock_supplicant_interface_proxy.cc',
             'mock_supplicant_network_proxy.cc',
             'mock_supplicant_process_proxy.cc',
-            'mock_time.cc',
             'mock_traffic_monitor.cc',
             'mock_virtual_device.cc',
             'mock_vpn_provider.cc',
@@ -646,15 +682,11 @@
             'result_aggregator_unittest.cc',
             'routing_table_unittest.cc',
             'rpc_task_unittest.cc',
-            'rtnl_handler_unittest.cc',
-            'rtnl_listener_unittest.cc',
-            'rtnl_message_unittest.cc',
             'scan_session_unittest.cc',
             'scope_logger_unittest.cc',
             'service_property_change_test.cc',
             'service_under_test.cc',
             'service_unittest.cc',
-            'shill_time_unittest.cc',
             'shill_unittest.cc',
             'shims/netfilter_queue_processor.cc',
             'shims/netfilter_queue_processor_unittest.cc',
diff --git a/shill_daemon.cc b/shill_daemon.cc
index e69dffa..d7c5671 100644
--- a/shill_daemon.cc
+++ b/shill_daemon.cc
@@ -13,11 +13,11 @@
 #include "shill/diagnostics_reporter.h"
 #include "shill/error.h"
 #include "shill/logging.h"
+#include "shill/net/rtnl_handler.h"
 #include "shill/netlink_manager.h"
 #include "shill/nl80211_message.h"
 #include "shill/proxy_factory.h"
 #include "shill/routing_table.h"
-#include "shill/rtnl_handler.h"
 #include "shill/shill_config.h"
 
 using base::Bind;
diff --git a/shill_daemon.h b/shill_daemon.h
index de70262..5f188ed 100644
--- a/shill_daemon.h
+++ b/shill_daemon.h
@@ -13,7 +13,7 @@
 #include "shill/event_dispatcher.h"
 #include "shill/glib.h"
 #include "shill/manager.h"
-#include "shill/sockets.h"
+#include "shill/net/sockets.h"
 
 namespace shill {
 
diff --git a/shill_unittest.cc b/shill_unittest.cc
index 928fff4..4352638 100644
--- a/shill_unittest.cc
+++ b/shill_unittest.cc
@@ -14,7 +14,6 @@
 #include <gmock/gmock.h>
 #include <gtest/gtest.h>
 
-#include "shill/io_handler.h"
 #include "shill/logging.h"
 #include "shill/mock_control.h"
 #include "shill/mock_dhcp_provider.h"
@@ -23,7 +22,8 @@
 #include "shill/mock_netlink_manager.h"
 #include "shill/mock_proxy_factory.h"
 #include "shill/mock_routing_table.h"
-#include "shill/mock_rtnl_handler.h"
+#include "shill/net/io_handler.h"
+#include "shill/net/mock_rtnl_handler.h"
 #include "shill/nl80211_message.h"
 #include "shill/shill_daemon.h"
 #include "shill/shill_test_config.h"
diff --git a/shims/net_diags_upload.h b/shims/net_diags_upload.h
index cb7dd82..0ee03e7 100644
--- a/shims/net_diags_upload.h
+++ b/shims/net_diags_upload.h
@@ -5,8 +5,6 @@
 #ifndef SHILL_SHIMS_NET_DIAGS_UPLOAD_H_
 #define SHILL_SHIMS_NET_DIAGS_UPLOAD_H_
 
-#include "shill/byte_string.h"
-
 class FilePath;
 
 namespace shill {
diff --git a/socket_info.h b/socket_info.h
index 2ca93d3..e0d6799 100644
--- a/socket_info.h
+++ b/socket_info.h
@@ -7,7 +7,7 @@
 
 #include <base/macros.h>
 
-#include "shill/ip_address.h"
+#include "shill/net/ip_address.h"
 
 namespace shill {
 
diff --git a/static_ip_parameters.cc b/static_ip_parameters.cc
index 9f342ba..4b7566e 100644
--- a/static_ip_parameters.cc
+++ b/static_ip_parameters.cc
@@ -11,8 +11,8 @@
 #include <chromeos/dbus/service_constants.h>
 
 #include "shill/error.h"
-#include "shill/ip_address.h"
 #include "shill/logging.h"
+#include "shill/net/ip_address.h"
 #include "shill/property_accessor.h"
 #include "shill/property_store.h"
 #include "shill/store_interface.h"
diff --git a/virtual_device.cc b/virtual_device.cc
index c80e3e3..71f7562 100644
--- a/virtual_device.cc
+++ b/virtual_device.cc
@@ -8,7 +8,7 @@
 #include <linux/if.h>  // NOLINT - Needs definitions from netinet/ether.h
 
 #include "shill/logging.h"
-#include "shill/rtnl_handler.h"
+#include "shill/net/rtnl_handler.h"
 
 using std::string;
 
diff --git a/virtual_device_unittest.cc b/virtual_device_unittest.cc
index 816a5bc..9424804 100644
--- a/virtual_device_unittest.cc
+++ b/virtual_device_unittest.cc
@@ -13,8 +13,8 @@
 #include "shill/mock_glib.h"
 #include "shill/mock_manager.h"
 #include "shill/mock_metrics.h"
-#include "shill/mock_rtnl_handler.h"
 #include "shill/mock_store.h"
+#include "shill/net/mock_rtnl_handler.h"
 #include "shill/nice_mock_control.h"
 #include "shill/technology.h"
 
diff --git a/vpn_service_unittest.cc b/vpn_service_unittest.cc
index 27eb3b6..b224b42 100644
--- a/vpn_service_unittest.cc
+++ b/vpn_service_unittest.cc
@@ -17,10 +17,10 @@
 #include "shill/mock_manager.h"
 #include "shill/mock_metrics.h"
 #include "shill/mock_profile.h"
-#include "shill/mock_sockets.h"
 #include "shill/mock_store.h"
 #include "shill/mock_vpn_driver.h"
 #include "shill/mock_vpn_provider.h"
+#include "shill/net/mock_sockets.h"
 #include "shill/nice_mock_control.h"
 #include "shill/service_property_change_test.h"
 
diff --git a/wake_on_wifi.cc b/wake_on_wifi.cc
index a4fbbac..dce7425 100644
--- a/wake_on_wifi.cc
+++ b/wake_on_wifi.cc
@@ -17,13 +17,13 @@
 #include <base/cancelable_callback.h>
 
 #include "shill/attribute_list.h"
-#include "shill/byte_string.h"
 #include "shill/error.h"
 #include "shill/event_dispatcher.h"
-#include "shill/ip_address.h"
 #include "shill/ip_address_store.h"
 #include "shill/logging.h"
 #include "shill/manager.h"
+#include "shill/net/byte_string.h"
+#include "shill/net/ip_address.h"
 #include "shill/netlink_manager.h"
 #include "shill/nl80211_message.h"
 #include "shill/wifi.h"
diff --git a/wake_on_wifi.h b/wake_on_wifi.h
index c1f9b05..9d7d014 100644
--- a/wake_on_wifi.h
+++ b/wake_on_wifi.h
@@ -20,8 +20,8 @@
 #include <base/memory/weak_ptr.h>
 
 #include "shill/callbacks.h"
-#include "shill/ip_address.h"
 #include "shill/ip_address_store.h"
+#include "shill/net/ip_address.h"
 #include "shill/netlink_manager.h"
 #include "shill/refptr_types.h"
 
diff --git a/wake_on_wifi_unittest.cc b/wake_on_wifi_unittest.cc
index 8191d76..277dcae 100644
--- a/wake_on_wifi_unittest.cc
+++ b/wake_on_wifi_unittest.cc
@@ -12,10 +12,8 @@
 #include <gmock/gmock.h>
 #include <gtest/gtest.h>
 
-#include "shill/byte_string.h"
 #include "shill/error.h"
 #include "shill/event_dispatcher.h"
-#include "shill/ip_address.h"
 #include "shill/ip_address_store.h"
 #include "shill/logging.h"
 #include "shill/mock_glib.h"
@@ -23,6 +21,8 @@
 #include "shill/mock_manager.h"
 #include "shill/mock_metrics.h"
 #include "shill/mock_netlink_manager.h"
+#include "shill/net/byte_string.h"
+#include "shill/net/ip_address.h"
 #include "shill/netlink_message_matchers.h"
 #include "shill/nice_mock_control.h"
 #include "shill/nl80211_message.h"
diff --git a/wifi.cc b/wifi.cc
index 41d49da..787fcac 100644
--- a/wifi.cc
+++ b/wifi.cc
@@ -33,21 +33,21 @@
 #include "shill/geolocation_info.h"
 #include "shill/icmp.h"
 #include "shill/ieee80211.h"
-#include "shill/ip_address.h"
 #include "shill/link_monitor.h"
 #include "shill/logging.h"
 #include "shill/mac80211_monitor.h"
 #include "shill/manager.h"
 #include "shill/metrics.h"
+#include "shill/net/ip_address.h"
+#include "shill/net/rtnl_handler.h"
+#include "shill/net/shill_time.h"
 #include "shill/netlink_manager.h"
 #include "shill/netlink_message.h"
 #include "shill/nl80211_message.h"
 #include "shill/property_accessor.h"
 #include "shill/proxy_factory.h"
-#include "shill/rtnl_handler.h"
 #include "shill/scan_session.h"
 #include "shill/scope_logger.h"
-#include "shill/shill_time.h"
 #include "shill/supplicant_eap_state_handler.h"
 #include "shill/supplicant_interface_proxy_interface.h"
 #include "shill/supplicant_network_proxy_interface.h"
diff --git a/wifi_provider.cc b/wifi_provider.cc
index a60117d..28bee8b 100644
--- a/wifi_provider.cc
+++ b/wifi_provider.cc
@@ -25,8 +25,8 @@
 #include "shill/logging.h"
 #include "shill/manager.h"
 #include "shill/metrics.h"
+#include "shill/net/shill_time.h"
 #include "shill/profile.h"
-#include "shill/shill_time.h"
 #include "shill/store_interface.h"
 #include "shill/technology.h"
 #include "shill/wifi_endpoint.h"
diff --git a/wifi_provider_unittest.cc b/wifi_provider_unittest.cc
index 823f6a6..103c25b 100644
--- a/wifi_provider_unittest.cc
+++ b/wifi_provider_unittest.cc
@@ -22,8 +22,8 @@
 #include "shill/mock_metrics.h"
 #include "shill/mock_profile.h"
 #include "shill/mock_store.h"
-#include "shill/mock_time.h"
 #include "shill/mock_wifi_service.h"
+#include "shill/net/mock_time.h"
 #include "shill/nice_mock_control.h"
 #include "shill/technology.h"
 #include "shill/wifi_endpoint.h"
diff --git a/wifi_unittest.cc b/wifi_unittest.cc
index 2c9d042..64112f8 100644
--- a/wifi_unittest.cc
+++ b/wifi_unittest.cc
@@ -27,7 +27,6 @@
 #include "shill/event_dispatcher.h"
 #include "shill/geolocation_info.h"
 #include "shill/ieee80211.h"
-#include "shill/ip_address.h"
 #include "shill/ip_address_store.h"
 #include "shill/key_value_store.h"
 #include "shill/logging.h"
@@ -49,7 +48,6 @@
 #include "shill/mock_netlink_manager.h"
 #include "shill/mock_profile.h"
 #include "shill/mock_proxy_factory.h"
-#include "shill/mock_rtnl_handler.h"
 #include "shill/mock_scan_session.h"
 #include "shill/mock_store.h"
 #include "shill/mock_supplicant_bss_proxy.h"
@@ -57,10 +55,12 @@
 #include "shill/mock_supplicant_interface_proxy.h"
 #include "shill/mock_supplicant_network_proxy.h"
 #include "shill/mock_supplicant_process_proxy.h"
-#include "shill/mock_time.h"
 #include "shill/mock_wake_on_wifi.h"
 #include "shill/mock_wifi_provider.h"
 #include "shill/mock_wifi_service.h"
+#include "shill/net/ip_address.h"
+#include "shill/net/mock_rtnl_handler.h"
+#include "shill/net/mock_time.h"
 #include "shill/netlink_message_matchers.h"
 #include "shill/nice_mock_control.h"
 #include "shill/nl80211_attribute.h"