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/network_interfaces_linux.h" | 15 #include "net/base/network_interfaces_linux.h" |
| 16 #include "net/base/ip_address_number.h" |
16 | 17 |
17 namespace net { | 18 namespace net { |
18 namespace internal { | 19 namespace internal { |
19 | 20 |
20 namespace { | 21 namespace { |
21 | 22 |
22 // Retrieves address from NETLINK address message. | 23 // Retrieves address from NETLINK address message. |
23 // Sets |really_deprecated| for IPv6 addresses with preferred lifetimes of 0. | 24 // Sets |really_deprecated| for IPv6 addresses with preferred lifetimes of 0. |
24 bool GetAddress(const struct nlmsghdr* header, | 25 bool GetAddress(const struct nlmsghdr* header, |
25 IPAddressNumber* out, | 26 IPAddressNumber* out, |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 | 462 |
462 AddressTrackerLinux::AddressTrackerAutoLock::~AddressTrackerAutoLock() { | 463 AddressTrackerLinux::AddressTrackerAutoLock::~AddressTrackerAutoLock() { |
463 if (tracker_.tracking_) { | 464 if (tracker_.tracking_) { |
464 lock_.AssertAcquired(); | 465 lock_.AssertAcquired(); |
465 lock_.Release(); | 466 lock_.Release(); |
466 } | 467 } |
467 } | 468 } |
468 | 469 |
469 } // namespace internal | 470 } // namespace internal |
470 } // namespace net | 471 } // namespace net |
OLD | NEW |