| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/base/address_tracker_linux.h" | 5 #include "net/base/address_tracker_linux.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 #include <linux/if.h> | 8 #include <linux/if.h> |
| 9 #include <sys/ioctl.h> | 9 #include <sys/ioctl.h> |
| 10 | 10 |
| 11 #include "base/files/scoped_file.h" | 11 #include "base/files/scoped_file.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/posix/eintr_wrapper.h" | 13 #include "base/posix/eintr_wrapper.h" |
| 14 #include "base/threading/thread_restrictions.h" | 14 #include "base/threading/thread_restrictions.h" |
| 15 #include "net/base/net_util_linux.h" | 15 #include "net/base/network_interfaces_linux.h" |
| 16 | 16 |
| 17 namespace net { | 17 namespace net { |
| 18 namespace internal { | 18 namespace internal { |
| 19 | 19 |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 // Retrieves address from NETLINK address message. | 22 // Retrieves address from NETLINK address message. |
| 23 // Sets |really_deprecated| for IPv6 addresses with preferred lifetimes of 0. | 23 // Sets |really_deprecated| for IPv6 addresses with preferred lifetimes of 0. |
| 24 bool GetAddress(const struct nlmsghdr* header, | 24 bool GetAddress(const struct nlmsghdr* header, |
| 25 IPAddressNumber* out, | 25 IPAddressNumber* out, |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 | 461 |
| 462 AddressTrackerLinux::AddressTrackerAutoLock::~AddressTrackerAutoLock() { | 462 AddressTrackerLinux::AddressTrackerAutoLock::~AddressTrackerAutoLock() { |
| 463 if (tracker_.tracking_) { | 463 if (tracker_.tracking_) { |
| 464 lock_.AssertAcquired(); | 464 lock_.AssertAcquired(); |
| 465 lock_.Release(); | 465 lock_.Release(); |
| 466 } | 466 } |
| 467 } | 467 } |
| 468 | 468 |
| 469 } // namespace internal | 469 } // namespace internal |
| 470 } // namespace net | 470 } // namespace net |
| OLD | NEW |