summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/base/network_change_notifier_netlink_linux.cc6
-rw-r--r--net/base/network_change_notifier_netlink_linux.h6
2 files changed, 10 insertions, 2 deletions
diff --git a/net/base/network_change_notifier_netlink_linux.cc b/net/base/network_change_notifier_netlink_linux.cc
index 493e17a..8135d6d 100644
--- a/net/base/network_change_notifier_netlink_linux.cc
+++ b/net/base/network_change_notifier_netlink_linux.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -57,6 +57,8 @@ bool IsDuplicateIPv6AddressUpdate(
} // namespace
+namespace net {
+
int InitializeNetlinkSocket() {
int sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
if (sock < 0) {
@@ -127,3 +129,5 @@ bool HandleNetlinkMessage(char* buf, size_t len) {
return false;
}
+
+} // namespace net
diff --git a/net/base/network_change_notifier_netlink_linux.h b/net/base/network_change_notifier_netlink_linux.h
index 13abbc6..4433c01 100644
--- a/net/base/network_change_notifier_netlink_linux.h
+++ b/net/base/network_change_notifier_netlink_linux.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -12,10 +12,14 @@
#include <cstddef>
+namespace net {
+
// Returns the file descriptor if successful. Otherwise, returns -1.
int InitializeNetlinkSocket();
// Returns true if a network change has been detected, otherwise returns false.
bool HandleNetlinkMessage(char* buf, size_t len);
+} // namespace net
+
#endif // NET_BASE_NETWORK_CHANGE_NOTIFIER_NETLINK_LINUX_H_