summaryrefslogtreecommitdiff
path: root/net/base/address_map_linux.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/base/address_map_linux.h')
-rw-r--r--net/base/address_map_linux.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/net/base/address_map_linux.h b/net/base/address_map_linux.h
index 49bc35bb9..6f10b112b 100644
--- a/net/base/address_map_linux.h
+++ b/net/base/address_map_linux.h
@@ -29,6 +29,20 @@ class NET_EXPORT AddressMapOwnerLinux {
// with (e.g. interface index).
using AddressMap = std::map<IPAddress, struct ifaddrmsg>;
+ // Represents a diff between one AddressMap and a new one. IPAddresses that
+ // map to absl::nullopt have been deleted from the map, and IPAddresses that
+ // map to non-nullopt have been added or updated.
+ using AddressMapDiff =
+ base::flat_map<IPAddress, absl::optional<struct ifaddrmsg>>;
+ // Represents a diff between one set of online links and new one. Interface
+ // indices that map to true are newly online and indices that map to false are
+ // newly offline.
+ using OnlineLinksDiff = base::flat_map<int, bool>;
+ // A callback for diffs, to be used by AddressTrackerLinux.
+ using DiffCallback =
+ base::RepeatingCallback<void(const AddressMapDiff& addr_diff,
+ const OnlineLinksDiff&)>;
+
AddressMapOwnerLinux() = default;
AddressMapOwnerLinux(const AddressMapOwnerLinux&) = delete;