Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(707)

Side by Side Diff: webrtc/p2p/base/portallocator.h

Issue 1411253008: WebRTC should generate default private address even when adapter enumeration is disabled. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: rename set_default_private_address to set_default_local_address Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 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 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 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 28 matching lines...) Expand all
39 PORTALLOCATOR_ENABLE_SHAKER = 0x10, 39 PORTALLOCATOR_ENABLE_SHAKER = 0x10,
40 PORTALLOCATOR_ENABLE_IPV6 = 0x40, 40 PORTALLOCATOR_ENABLE_IPV6 = 0x40,
41 // TODO(pthatcher): Remove this once it's no longer used in: 41 // TODO(pthatcher): Remove this once it's no longer used in:
42 // remoting/client/plugin/pepper_port_allocator.cc 42 // remoting/client/plugin/pepper_port_allocator.cc
43 // remoting/protocol/chromium_port_allocator.cc 43 // remoting/protocol/chromium_port_allocator.cc
44 // remoting/test/fake_port_allocator.cc 44 // remoting/test/fake_port_allocator.cc
45 // It's a no-op and is no longer needed. 45 // It's a no-op and is no longer needed.
46 PORTALLOCATOR_ENABLE_SHARED_UFRAG = 0x80, 46 PORTALLOCATOR_ENABLE_SHARED_UFRAG = 0x80,
47 PORTALLOCATOR_ENABLE_SHARED_SOCKET = 0x100, 47 PORTALLOCATOR_ENABLE_SHARED_SOCKET = 0x100,
48 PORTALLOCATOR_ENABLE_STUN_RETRANSMIT_ATTRIBUTE = 0x200, 48 PORTALLOCATOR_ENABLE_STUN_RETRANSMIT_ATTRIBUTE = 0x200,
49 // When specified, we'll only generate the default public candidate as used by
pthatcher1 2015/11/10 18:52:34 This might be more clear as "Only allocate STUN an
guoweis_webrtc 2015/11/10 20:37:29 Done.
50 // http traffic and the default private candidate associated with that.
49 PORTALLOCATOR_DISABLE_ADAPTER_ENUMERATION = 0x400, 51 PORTALLOCATOR_DISABLE_ADAPTER_ENUMERATION = 0x400,
50 // When specified, a loopback candidate will be generated if 52 // When specified, the default private candidate will not be generated when
pthatcher1 2015/11/10 18:52:34 This might be more clear as "Only allocate STUN ca
guoweis_webrtc 2015/11/10 20:37:29 Done.
51 // PORTALLOCATOR_DISABLE_ADAPTER_ENUMERATION is specified. 53 // PORTALLOCATOR_DISABLE_ADAPTER_ENUMERATION is specified.
52 PORTALLOCATOR_ENABLE_LOCALHOST_CANDIDATE = 0x800, 54 PORTALLOCATOR_DISABLE_LOCAL_CANDIDATE = 0x800,
53 // Disallow use of UDP when connecting to a relay server. Since proxy servers 55 // Disallow use of UDP when connecting to a relay server. Since proxy servers
54 // usually don't handle UDP, using UDP will leak the IP address. 56 // usually don't handle UDP, using UDP will leak the IP address.
55 PORTALLOCATOR_DISABLE_UDP_RELAY = 0x1000, 57 PORTALLOCATOR_DISABLE_UDP_RELAY = 0x1000,
56 }; 58 };
57 59
58 const uint32_t kDefaultPortAllocatorFlags = 0; 60 const uint32_t kDefaultPortAllocatorFlags = 0;
59 61
60 const uint32_t kDefaultStepDelay = 1000; // 1 sec step delay. 62 const uint32_t kDefaultStepDelay = 1000; // 1 sec step delay.
61 // As per RFC 5245 Appendix B.1, STUN transactions need to be paced at certain 63 // As per RFC 5245 Appendix B.1, STUN transactions need to be paced at certain
62 // internal. Less than 20ms is not acceptable. We choose 50ms as our default. 64 // internal. Less than 20ms is not acceptable. We choose 50ms as our default.
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 int max_port_; 202 int max_port_;
201 uint32_t step_delay_; 203 uint32_t step_delay_;
202 bool allow_tcp_listen_; 204 bool allow_tcp_listen_;
203 uint32_t candidate_filter_; 205 uint32_t candidate_filter_;
204 std::string origin_; 206 std::string origin_;
205 }; 207 };
206 208
207 } // namespace cricket 209 } // namespace cricket
208 210
209 #endif // WEBRTC_P2P_BASE_PORTALLOCATOR_H_ 211 #endif // WEBRTC_P2P_BASE_PORTALLOCATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698