Patrik Höglund | e2d6a06 | 2017-10-05 12:53:33 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license |
| 5 | * that can be found in the LICENSE file in the root of the source |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
| 11 | #ifndef API_CANDIDATE_H_ |
| 12 | #define API_CANDIDATE_H_ |
| 13 | |
| 14 | #include <limits.h> |
| 15 | #include <stdint.h> |
| 16 | |
| 17 | #include <algorithm> |
| 18 | #include <string> |
| 19 | |
Tommi | 6bf2d31 | 2023-09-25 12:05:31 | [diff] [blame] | 20 | #include "absl/base/attributes.h" |
Niels Möller | d4aa3a3 | 2021-09-29 11:23:01 | [diff] [blame] | 21 | #include "absl/strings/string_view.h" |
Patrik Höglund | e2d6a06 | 2017-10-05 12:53:33 | [diff] [blame] | 22 | #include "rtc_base/checks.h" |
Patrik Höglund | e2d6a06 | 2017-10-05 12:53:33 | [diff] [blame] | 23 | #include "rtc_base/network_constants.h" |
Steve Anton | 10542f2 | 2019-01-11 17:11:00 | [diff] [blame] | 24 | #include "rtc_base/socket_address.h" |
Mirko Bonadei | 3b56ee7 | 2018-10-15 15:15:12 | [diff] [blame] | 25 | #include "rtc_base/system/rtc_export.h" |
Patrik Höglund | e2d6a06 | 2017-10-05 12:53:33 | [diff] [blame] | 26 | |
Tommi | 32f2a30 | 2024-02-08 18:16:49 | [diff] [blame] | 27 | namespace webrtc { |
| 28 | enum class IceCandidateType : int { kHost, kSrflx, kPrflx, kRelay }; |
Tommi | c7a4b2a | 2024-02-25 22:34:39 | [diff] [blame] | 29 | RTC_EXPORT absl::string_view IceCandidateTypeToString(IceCandidateType); |
Tommi | 32f2a30 | 2024-02-08 18:16:49 | [diff] [blame] | 30 | } // namespace webrtc |
| 31 | |
Patrik Höglund | e2d6a06 | 2017-10-05 12:53:33 | [diff] [blame] | 32 | namespace cricket { |
| 33 | |
Tommi | 3b2b2af | 2024-01-17 13:19:41 | [diff] [blame] | 34 | // TODO(tommi): These are temporarily here, moved from `port.h` and will |
| 35 | // eventually be removed once we use enums instead of strings for these values. |
Tommi | 521b863 | 2024-02-12 13:52:13 | [diff] [blame] | 36 | RTC_EXPORT extern const absl::string_view LOCAL_PORT_TYPE; |
| 37 | RTC_EXPORT extern const absl::string_view STUN_PORT_TYPE; |
| 38 | RTC_EXPORT extern const absl::string_view PRFLX_PORT_TYPE; |
| 39 | RTC_EXPORT extern const absl::string_view RELAY_PORT_TYPE; |
Tommi | 3b2b2af | 2024-01-17 13:19:41 | [diff] [blame] | 40 | |
Philipp Hancke | 41a8357 | 2022-11-28 13:47:45 | [diff] [blame] | 41 | // TURN servers are limited to 32 in accordance with |
| 42 | // https://w3c.github.io/webrtc-pc/#dom-rtcconfiguration-iceservers |
| 43 | static constexpr size_t kMaxTurnServers = 32; |
| 44 | |
Patrik Höglund | e2d6a06 | 2017-10-05 12:53:33 | [diff] [blame] | 45 | // Candidate for ICE based connection discovery. |
Mirko Bonadei | 3b56ee7 | 2018-10-15 15:15:12 | [diff] [blame] | 46 | class RTC_EXPORT Candidate { |
Patrik Höglund | e2d6a06 | 2017-10-05 12:53:33 | [diff] [blame] | 47 | public: |
Steve Anton | 36b28db | 2017-10-26 18:27:17 | [diff] [blame] | 48 | Candidate(); |
Tommi | c7a4b2a | 2024-02-25 22:34:39 | [diff] [blame] | 49 | Candidate(int component, |
| 50 | absl::string_view protocol, |
| 51 | const rtc::SocketAddress& address, |
| 52 | uint32_t priority, |
| 53 | absl::string_view username, |
| 54 | absl::string_view password, |
| 55 | webrtc::IceCandidateType type, |
| 56 | uint32_t generation, |
| 57 | absl::string_view foundation, |
| 58 | uint16_t network_id = 0, |
| 59 | uint16_t network_cost = 0); |
| 60 | // TODO(tommi): Deprecate. |
Patrik Höglund | e2d6a06 | 2017-10-05 12:53:33 | [diff] [blame] | 61 | Candidate(int component, |
Niels Möller | d4aa3a3 | 2021-09-29 11:23:01 | [diff] [blame] | 62 | absl::string_view protocol, |
Patrik Höglund | e2d6a06 | 2017-10-05 12:53:33 | [diff] [blame] | 63 | const rtc::SocketAddress& address, |
| 64 | uint32_t priority, |
Niels Möller | d4aa3a3 | 2021-09-29 11:23:01 | [diff] [blame] | 65 | absl::string_view username, |
| 66 | absl::string_view password, |
Tommi | 6bf2d31 | 2023-09-25 12:05:31 | [diff] [blame] | 67 | absl::string_view type ABSL_ATTRIBUTE_LIFETIME_BOUND, |
Patrik Höglund | e2d6a06 | 2017-10-05 12:53:33 | [diff] [blame] | 68 | uint32_t generation, |
Niels Möller | d4aa3a3 | 2021-09-29 11:23:01 | [diff] [blame] | 69 | absl::string_view foundation, |
Patrik Höglund | e2d6a06 | 2017-10-05 12:53:33 | [diff] [blame] | 70 | uint16_t network_id = 0, |
Steve Anton | 36b28db | 2017-10-26 18:27:17 | [diff] [blame] | 71 | uint16_t network_cost = 0); |
| 72 | Candidate(const Candidate&); |
| 73 | ~Candidate(); |
Patrik Höglund | e2d6a06 | 2017-10-05 12:53:33 | [diff] [blame] | 74 | |
Tommi | bde80e3 | 2024-02-17 14:52:57 | [diff] [blame] | 75 | // 8 character long randomized ID string for logging purposes. |
Yves Gerey | 665174f | 2018-06-19 13:03:05 | [diff] [blame] | 76 | const std::string& id() const { return id_; } |
Tommi | bde80e3 | 2024-02-17 14:52:57 | [diff] [blame] | 77 | // Generates a new, 8 character long, id. |
| 78 | void generate_id(); |
| 79 | // TODO(tommi): Callers should use generate_id(). Remove. |
| 80 | [[deprecated]] void set_id(absl::string_view id) { Assign(id_, id); } |
Patrik Höglund | e2d6a06 | 2017-10-05 12:53:33 | [diff] [blame] | 81 | |
| 82 | int component() const { return component_; } |
| 83 | void set_component(int component) { component_ = component; } |
| 84 | |
Yves Gerey | 665174f | 2018-06-19 13:03:05 | [diff] [blame] | 85 | const std::string& protocol() const { return protocol_; } |
Tommi | f2431a9 | 2024-02-20 14:27:44 | [diff] [blame] | 86 | |
| 87 | // Valid protocol values are: |
| 88 | // UDP_PROTOCOL_NAME, TCP_PROTOCOL_NAME, SSLTCP_PROTOCOL_NAME, |
| 89 | // TLS_PROTOCOL_NAME. |
Niels Möller | d4aa3a3 | 2021-09-29 11:23:01 | [diff] [blame] | 90 | void set_protocol(absl::string_view protocol) { Assign(protocol_, protocol); } |
Patrik Höglund | e2d6a06 | 2017-10-05 12:53:33 | [diff] [blame] | 91 | |
| 92 | // The protocol used to talk to relay. |
| 93 | const std::string& relay_protocol() const { return relay_protocol_; } |
Tommi | f2431a9 | 2024-02-20 14:27:44 | [diff] [blame] | 94 | |
| 95 | // Valid protocol values are: |
| 96 | // UDP_PROTOCOL_NAME, TCP_PROTOCOL_NAME, SSLTCP_PROTOCOL_NAME, |
| 97 | // TLS_PROTOCOL_NAME. |
Niels Möller | d4aa3a3 | 2021-09-29 11:23:01 | [diff] [blame] | 98 | void set_relay_protocol(absl::string_view protocol) { |
| 99 | Assign(relay_protocol_, protocol); |
Patrik Höglund | e2d6a06 | 2017-10-05 12:53:33 | [diff] [blame] | 100 | } |
| 101 | |
Yves Gerey | 665174f | 2018-06-19 13:03:05 | [diff] [blame] | 102 | const rtc::SocketAddress& address() const { return address_; } |
| 103 | void set_address(const rtc::SocketAddress& address) { address_ = address; } |
Patrik Höglund | e2d6a06 | 2017-10-05 12:53:33 | [diff] [blame] | 104 | |
| 105 | uint32_t priority() const { return priority_; } |
| 106 | void set_priority(const uint32_t priority) { priority_ = priority; } |
| 107 | |
Patrik Höglund | e2d6a06 | 2017-10-05 12:53:33 | [diff] [blame] | 108 | // TODO(honghaiz): Change to usernameFragment or ufrag. |
Yves Gerey | 665174f | 2018-06-19 13:03:05 | [diff] [blame] | 109 | const std::string& username() const { return username_; } |
Niels Möller | d4aa3a3 | 2021-09-29 11:23:01 | [diff] [blame] | 110 | void set_username(absl::string_view username) { Assign(username_, username); } |
Patrik Höglund | e2d6a06 | 2017-10-05 12:53:33 | [diff] [blame] | 111 | |
Yves Gerey | 665174f | 2018-06-19 13:03:05 | [diff] [blame] | 112 | const std::string& password() const { return password_; } |
Niels Möller | d4aa3a3 | 2021-09-29 11:23:01 | [diff] [blame] | 113 | void set_password(absl::string_view password) { Assign(password_, password); } |
Patrik Höglund | e2d6a06 | 2017-10-05 12:53:33 | [diff] [blame] | 114 | |
Tommi | c7a4b2a | 2024-02-25 22:34:39 | [diff] [blame] | 115 | webrtc::IceCandidateType type() const { return type_; } |
Tommi | 6bf2d31 | 2023-09-25 12:05:31 | [diff] [blame] | 116 | |
Tommi | f7b22c6 | 2024-02-15 08:18:34 | [diff] [blame] | 117 | // Returns the name of the candidate type as specified in |
| 118 | // https://datatracker.ietf.org/doc/html/rfc5245#section-15.1 |
| 119 | absl::string_view type_name() const; |
| 120 | |
Tommi | 6bf2d31 | 2023-09-25 12:05:31 | [diff] [blame] | 121 | // Setting the type requires a constant string (e.g. |
| 122 | // cricket::LOCAL_PORT_TYPE). The type should really be an enum rather than a |
| 123 | // string, but until we make that change the lifetime attribute helps us lock |
| 124 | // things down. See also the `Port` class. |
Tommi | c7a4b2a | 2024-02-25 22:34:39 | [diff] [blame] | 125 | void set_type(webrtc::IceCandidateType type) { type_ = type; } |
Patrik Höglund | e2d6a06 | 2017-10-05 12:53:33 | [diff] [blame] | 126 | |
Tommi | c7a4b2a | 2024-02-25 22:34:39 | [diff] [blame] | 127 | // TODO(tommi): Deprecate. |
| 128 | void set_type(absl::string_view type ABSL_ATTRIBUTE_LIFETIME_BOUND); |
| 129 | |
| 130 | // Simple checkers for checking the candidate type without dependency on the |
| 131 | // IceCandidateType enum. The `is_local()` and `is_stun()` names are legacy |
| 132 | // names and should now more accurately be `is_host()` and `is_srflx()`. |
Tommi | 3b2b2af | 2024-01-17 13:19:41 | [diff] [blame] | 133 | bool is_local() const; |
| 134 | bool is_stun() const; |
| 135 | bool is_prflx() const; |
| 136 | bool is_relay() const; |
| 137 | |
Tommi | be2786c | 2024-01-19 16:33:00 | [diff] [blame] | 138 | // Returns the type preference, a value between 0-126 inclusive, with 0 being |
| 139 | // the lowest preference value, as described in RFC 5245. |
| 140 | // https://datatracker.ietf.org/doc/html/rfc5245#section-4.1.2.1 |
| 141 | int type_preference() const { |
| 142 | // From https://datatracker.ietf.org/doc/html/rfc5245#section-4.1.4 : |
| 143 | // It is RECOMMENDED that default candidates be chosen based on the |
| 144 | // likelihood of those candidates to work with the peer that is being |
| 145 | // contacted. |
| 146 | // I.e. it is recommended that relayed > reflexive > host. |
| 147 | if (is_local()) |
| 148 | return 1; // Host. |
| 149 | if (is_stun()) |
| 150 | return 2; // Reflexive. |
| 151 | if (is_relay()) |
| 152 | return 3; // Relayed. |
| 153 | return 0; // Unknown, lowest preference. |
| 154 | } |
| 155 | |
Yves Gerey | 665174f | 2018-06-19 13:03:05 | [diff] [blame] | 156 | const std::string& network_name() const { return network_name_; } |
Niels Möller | d4aa3a3 | 2021-09-29 11:23:01 | [diff] [blame] | 157 | void set_network_name(absl::string_view network_name) { |
| 158 | Assign(network_name_, network_name); |
Patrik Höglund | e2d6a06 | 2017-10-05 12:53:33 | [diff] [blame] | 159 | } |
| 160 | |
| 161 | rtc::AdapterType network_type() const { return network_type_; } |
| 162 | void set_network_type(rtc::AdapterType network_type) { |
| 163 | network_type_ = network_type; |
| 164 | } |
| 165 | |
Jonas Oreland | 0d13bbd | 2022-03-02 10:17:36 | [diff] [blame] | 166 | rtc::AdapterType underlying_type_for_vpn() const { |
| 167 | return underlying_type_for_vpn_; |
| 168 | } |
| 169 | void set_underlying_type_for_vpn(rtc::AdapterType network_type) { |
| 170 | underlying_type_for_vpn_ = network_type; |
| 171 | } |
| 172 | |
Patrik Höglund | e2d6a06 | 2017-10-05 12:53:33 | [diff] [blame] | 173 | // Candidates in a new generation replace those in the old generation. |
| 174 | uint32_t generation() const { return generation_; } |
| 175 | void set_generation(uint32_t generation) { generation_ = generation; } |
Patrik Höglund | e2d6a06 | 2017-10-05 12:53:33 | [diff] [blame] | 176 | |
Artem Titov | 0e61fdd | 2021-07-25 19:50:14 | [diff] [blame] | 177 | // `network_cost` measures the cost/penalty of using this candidate. A network |
Patrik Höglund | e2d6a06 | 2017-10-05 12:53:33 | [diff] [blame] | 178 | // cost of 0 indicates this candidate can be used freely. A value of |
| 179 | // rtc::kNetworkCostMax indicates it should be used only as the last resort. |
| 180 | void set_network_cost(uint16_t network_cost) { |
| 181 | RTC_DCHECK_LE(network_cost, rtc::kNetworkCostMax); |
| 182 | network_cost_ = network_cost; |
| 183 | } |
| 184 | uint16_t network_cost() const { return network_cost_; } |
| 185 | |
| 186 | // An ID assigned to the network hosting the candidate. |
| 187 | uint16_t network_id() const { return network_id_; } |
| 188 | void set_network_id(uint16_t network_id) { network_id_ = network_id; } |
| 189 | |
Tommi | f2431a9 | 2024-02-20 14:27:44 | [diff] [blame] | 190 | // From RFC 5245, section-7.2.1.3: |
| 191 | // The foundation of the candidate is set to an arbitrary value, different |
| 192 | // from the foundation for all other remote candidates. |
| 193 | // Note: Use ComputeFoundation to populate this value. |
Yves Gerey | 665174f | 2018-06-19 13:03:05 | [diff] [blame] | 194 | const std::string& foundation() const { return foundation_; } |
Tommi | f2431a9 | 2024-02-20 14:27:44 | [diff] [blame] | 195 | |
| 196 | // TODO(tommi): Deprecate in favor of ComputeFoundation. |
| 197 | // For situations where serializing/deserializing a candidate is needed, |
| 198 | // the constructor can be used to inject a value for the foundation. |
Niels Möller | d4aa3a3 | 2021-09-29 11:23:01 | [diff] [blame] | 199 | void set_foundation(absl::string_view foundation) { |
| 200 | Assign(foundation_, foundation); |
Patrik Höglund | e2d6a06 | 2017-10-05 12:53:33 | [diff] [blame] | 201 | } |
| 202 | |
Yves Gerey | 665174f | 2018-06-19 13:03:05 | [diff] [blame] | 203 | const rtc::SocketAddress& related_address() const { return related_address_; } |
| 204 | void set_related_address(const rtc::SocketAddress& related_address) { |
Patrik Höglund | e2d6a06 | 2017-10-05 12:53:33 | [diff] [blame] | 205 | related_address_ = related_address; |
| 206 | } |
| 207 | const std::string& tcptype() const { return tcptype_; } |
Niels Möller | d4aa3a3 | 2021-09-29 11:23:01 | [diff] [blame] | 208 | void set_tcptype(absl::string_view tcptype) { Assign(tcptype_, tcptype); } |
Patrik Höglund | e2d6a06 | 2017-10-05 12:53:33 | [diff] [blame] | 209 | |
| 210 | // The name of the transport channel of this candidate. |
| 211 | // TODO(phoglund): remove. |
| 212 | const std::string& transport_name() const { return transport_name_; } |
Niels Möller | d4aa3a3 | 2021-09-29 11:23:01 | [diff] [blame] | 213 | void set_transport_name(absl::string_view transport_name) { |
| 214 | Assign(transport_name_, transport_name); |
Patrik Höglund | e2d6a06 | 2017-10-05 12:53:33 | [diff] [blame] | 215 | } |
| 216 | |
| 217 | // The URL of the ICE server which this candidate is gathered from. |
| 218 | const std::string& url() const { return url_; } |
Niels Möller | d4aa3a3 | 2021-09-29 11:23:01 | [diff] [blame] | 219 | void set_url(absl::string_view url) { Assign(url_, url); } |
Patrik Höglund | e2d6a06 | 2017-10-05 12:53:33 | [diff] [blame] | 220 | |
| 221 | // Determines whether this candidate is equivalent to the given one. |
Steve Anton | 36b28db | 2017-10-26 18:27:17 | [diff] [blame] | 222 | bool IsEquivalent(const Candidate& c) const; |
Patrik Höglund | e2d6a06 | 2017-10-05 12:53:33 | [diff] [blame] | 223 | |
| 224 | // Determines whether this candidate can be considered equivalent to the |
| 225 | // given one when looking for a matching candidate to remove. |
Steve Anton | 36b28db | 2017-10-26 18:27:17 | [diff] [blame] | 226 | bool MatchesForRemoval(const Candidate& c) const; |
Patrik Höglund | e2d6a06 | 2017-10-05 12:53:33 | [diff] [blame] | 227 | |
Yves Gerey | 665174f | 2018-06-19 13:03:05 | [diff] [blame] | 228 | std::string ToString() const { return ToStringInternal(false); } |
Patrik Höglund | e2d6a06 | 2017-10-05 12:53:33 | [diff] [blame] | 229 | |
Yves Gerey | 665174f | 2018-06-19 13:03:05 | [diff] [blame] | 230 | std::string ToSensitiveString() const { return ToStringInternal(true); } |
Patrik Höglund | e2d6a06 | 2017-10-05 12:53:33 | [diff] [blame] | 231 | |
| 232 | uint32_t GetPriority(uint32_t type_preference, |
| 233 | int network_adapter_preference, |
Philipp Hancke | 17ec056 | 2023-06-16 11:58:45 | [diff] [blame] | 234 | int relay_preference, |
| 235 | bool adjust_local_preference) const; |
Patrik Höglund | e2d6a06 | 2017-10-05 12:53:33 | [diff] [blame] | 236 | |
Steve Anton | 36b28db | 2017-10-26 18:27:17 | [diff] [blame] | 237 | bool operator==(const Candidate& o) const; |
| 238 | bool operator!=(const Candidate& o) const; |
Patrik Höglund | e2d6a06 | 2017-10-05 12:53:33 | [diff] [blame] | 239 | |
Qingsi Wang | 1dac6d8 | 2018-12-12 23:28:47 | [diff] [blame] | 240 | // Returns a sanitized copy configured by the given booleans. If |
Artem Titov | 0e61fdd | 2021-07-25 19:50:14 | [diff] [blame] | 241 | // `use_host_address` is true, the returned copy has its IP removed from |
| 242 | // `address()`, which leads `address()` to be a hostname address. If |
| 243 | // `filter_related_address`, the returned copy has its related address reset |
Qingsi Wang | 1dac6d8 | 2018-12-12 23:28:47 | [diff] [blame] | 244 | // to the wildcard address (i.e. 0.0.0.0 for IPv4 and :: for IPv6). Note that |
| 245 | // setting both booleans to false returns an identical copy to the original |
| 246 | // candidate. |
| 247 | Candidate ToSanitizedCopy(bool use_hostname_address, |
| 248 | bool filter_related_address) const; |
| 249 | |
Tommi | f2431a9 | 2024-02-20 14:27:44 | [diff] [blame] | 250 | // Computes and populates the `foundation()` field. |
| 251 | // Foundation: An arbitrary string that is the same for two candidates |
| 252 | // that have the same type, base IP address, protocol (UDP, TCP, |
| 253 | // etc.), and STUN or TURN server. If any of these are different, |
| 254 | // then the foundation will be different. Two candidate pairs with |
| 255 | // the same foundation pairs are likely to have similar network |
| 256 | // characteristics. Foundations are used in the frozen algorithm. |
Christoffer Dewerin | 7098d11 | 2024-02-26 14:38:44 | [diff] [blame^] | 257 | // A session wide (peerconnection) tie-breaker is applied to the foundation, |
Tommi | f2431a9 | 2024-02-20 14:27:44 | [diff] [blame] | 258 | // adds additional randomness and must be the same for all candidates. |
Christoffer Dewerin | 7098d11 | 2024-02-26 14:38:44 | [diff] [blame^] | 259 | void ComputeFoundation(const rtc::SocketAddress& base_address, |
| 260 | uint64_t tie_breaker); |
Tommi | f2431a9 | 2024-02-20 14:27:44 | [diff] [blame] | 261 | |
| 262 | // https://www.rfc-editor.org/rfc/rfc5245#section-7.2.1.3 |
| 263 | // Call to populate the foundation field for a new peer reflexive remote |
| 264 | // candidate. The type of the candidate must be "prflx". |
| 265 | // The foundation of the candidate is set to an arbitrary value, different |
| 266 | // from the foundation for all other remote candidates. |
| 267 | void ComputePrflxFoundation(); |
| 268 | |
Patrik Höglund | e2d6a06 | 2017-10-05 12:53:33 | [diff] [blame] | 269 | private: |
Niels Möller | d4aa3a3 | 2021-09-29 11:23:01 | [diff] [blame] | 270 | // TODO(bugs.webrtc.org/13220): With C++17, we get a std::string assignment |
| 271 | // operator accepting any object implicitly convertible to std::string_view, |
| 272 | // and then we don't need this workaround. |
| 273 | static void Assign(std::string& s, absl::string_view view); |
Steve Anton | 36b28db | 2017-10-26 18:27:17 | [diff] [blame] | 274 | std::string ToStringInternal(bool sensitive) const; |
Patrik Höglund | e2d6a06 | 2017-10-05 12:53:33 | [diff] [blame] | 275 | |
| 276 | std::string id_; |
| 277 | int component_; |
| 278 | std::string protocol_; |
| 279 | std::string relay_protocol_; |
| 280 | rtc::SocketAddress address_; |
| 281 | uint32_t priority_; |
| 282 | std::string username_; |
| 283 | std::string password_; |
Tommi | c7a4b2a | 2024-02-25 22:34:39 | [diff] [blame] | 284 | webrtc::IceCandidateType type_ = webrtc::IceCandidateType::kHost; |
Patrik Höglund | e2d6a06 | 2017-10-05 12:53:33 | [diff] [blame] | 285 | std::string network_name_; |
| 286 | rtc::AdapterType network_type_; |
Jonas Oreland | 0d13bbd | 2022-03-02 10:17:36 | [diff] [blame] | 287 | rtc::AdapterType underlying_type_for_vpn_; |
Patrik Höglund | e2d6a06 | 2017-10-05 12:53:33 | [diff] [blame] | 288 | uint32_t generation_; |
| 289 | std::string foundation_; |
| 290 | rtc::SocketAddress related_address_; |
| 291 | std::string tcptype_; |
| 292 | std::string transport_name_; |
| 293 | uint16_t network_id_; |
| 294 | uint16_t network_cost_; |
| 295 | std::string url_; |
| 296 | }; |
| 297 | |
| 298 | } // namespace cricket |
| 299 | |
| 300 | #endif // API_CANDIDATE_H_ |