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

Side by Side Diff: remoting/jingle_glue/network_settings.h

Issue 209323002: New policies: enable/disable relay; port range (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added a few more tests. Created 6 years, 9 months 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 | Annotate | Revision Log
« no previous file with comments | « remoting/jingle_glue/chromium_port_allocator.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef REMOTING_JINGLE_GLUE_NETWORK_SETTINGS_H_ 5 #ifndef REMOTING_JINGLE_GLUE_NETWORK_SETTINGS_H_
6 #define REMOTING_JINGLE_GLUE_NETWORK_SETTINGS_H_ 6 #define REMOTING_JINGLE_GLUE_NETWORK_SETTINGS_H_
7 7
8 namespace remoting { 8 namespace remoting {
9 9
10 struct NetworkSettings { 10 struct NetworkSettings {
11 11
12 // When hosts are configured with NAT traversal disabled they will 12 // When hosts are configured with NAT traversal disabled they will
13 // typically also limit their P2P ports to this range, so that 13 // typically also limit their P2P ports to this range, so that
14 // sessions may be blocked or un-blocked via firewall rules. 14 // sessions may be blocked or un-blocked via firewall rules.
15 static const int kDefaultMinPort = 12400; 15 static const int kDefaultMinPort = 12400;
16 static const int kDefaultMaxPort = 12409; 16 static const int kDefaultMaxPort = 12409;
17 17
18 enum NatTraversalMode { 18 enum NatTraversalMode {
19 // Active NAT traversal using STUN and relay servers. 19 // Active NAT traversal using STUN and relay servers.
20 NAT_TRAVERSAL_ENABLED, 20 NAT_TRAVERSAL_ENABLED,
21 21
22 // Active NAT traversal using STUN, but don't use relay servers.
23 NAT_TRAVERSAL_ENABLED_NO_RELAY,
Sergey Ulanov 2014/03/24 23:37:12 This breaks LibjingleTransportFactory::EnsureFresh
dcaiafa 2014/03/26 15:29:16 Good catch! Done.
24
22 // Don't use STUN or relay servers. Accept incoming P2P connection 25 // Don't use STUN or relay servers. Accept incoming P2P connection
23 // attempts, but don't initiate any. This ensures that the peer is 26 // attempts, but don't initiate any. This ensures that the peer is
24 // on the same network. Note that connection will always fail if 27 // on the same network. Note that connection will always fail if
25 // both ends use this mode. 28 // both ends use this mode.
26 NAT_TRAVERSAL_DISABLED, 29 NAT_TRAVERSAL_DISABLED,
27 30
28 // Don't use STUN or relay servers but make outgoing connections. 31 // Don't use STUN or relay servers but make outgoing connections.
29 NAT_TRAVERSAL_OUTGOING, 32 NAT_TRAVERSAL_OUTGOING,
30 }; 33 };
31 34
(...skipping 13 matching lines...) Expand all
45 48
46 // |min_port| and |max_port| specify range (inclusive) of ports used by 49 // |min_port| and |max_port| specify range (inclusive) of ports used by
47 // P2P sessions. Any port can be used when both values are set to 0. 50 // P2P sessions. Any port can be used when both values are set to 0.
48 int min_port; 51 int min_port;
49 int max_port; 52 int max_port;
50 }; 53 };
51 54
52 } // namespace remoting 55 } // namespace remoting
53 56
54 #endif // REMOTING_HOST_NETWORK_SETTINGS_H_ 57 #endif // REMOTING_HOST_NETWORK_SETTINGS_H_
OLDNEW
« no previous file with comments | « remoting/jingle_glue/chromium_port_allocator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698