diff options
author | Cronet Mainline Eng <cronet-mainline-eng+copybara@google.com> | 2023-04-18 07:37:34 -0800 |
---|---|---|
committer | Patrick Rohr <prohr@google.com> | 2023-04-18 08:40:26 -0700 |
commit | eddec18c18cdbcbdbbe9bf3c0fa24cb7f8d768ae (patch) | |
tree | 2983326030c4b680835550dca47bc960e77c492f /net/base/address_map_linux.h | |
parent | 41cb724250484f326b0bbd5f8b955eb37b3b83c6 (diff) | |
download | cronet-eddec18c18cdbcbdbbe9bf3c0fa24cb7f8d768ae.tar.gz |
Import Cronet version 114.0.5715.0
Project import generated by Copybara.
FolderOrigin-RevId: /tmp/copybara-origin/src
Test: none
Change-Id: I15627f4badf0f6173d24f6c555169cc815a29fdd
Diffstat (limited to 'net/base/address_map_linux.h')
-rw-r--r-- | net/base/address_map_linux.h | 14 |
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; |