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

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

Issue 10868031: Limit the ports used by IT2Me when NAT traversal is disabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move default min & max port definitions to NetworkSettings. Created 8 years, 4 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 | « no previous file | remoting/host/plugin/host_script_object.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_HOST_NETWORK_SETTINGS_H_ 5 #ifndef REMOTING_HOST_NETWORK_SETTINGS_H_
6 #define REMOTING_HOST_NETWORK_SETTINGS_H_ 6 #define REMOTING_HOST_NETWORK_SETTINGS_H_
7 7
8 namespace remoting { 8 namespace remoting {
9 9
10 struct NetworkSettings { 10 struct NetworkSettings {
11
12 static const int kDefaultMinPort = 12400;
Sergey Ulanov 2012/08/24 18:47:27 Please add comments to explain how these constants
Wez 2012/08/24 19:51:25 Done.
13 static const int kDefaultMaxPort = 12409;
14
11 enum NatTraversalMode { 15 enum NatTraversalMode {
12 // Active NAT traversal using STUN and relay servers. 16 // Active NAT traversal using STUN and relay servers.
13 NAT_TRAVERSAL_ENABLED, 17 NAT_TRAVERSAL_ENABLED,
14 18
15 // Don't use STUN or relay servers. Accept incoming P2P connection 19 // Don't use STUN or relay servers. Accept incoming P2P connection
16 // attempts, but don't initiate any. This ensures that the peer is 20 // attempts, but don't initiate any. This ensures that the peer is
17 // on the same network. Note that connection will always fail if 21 // on the same network. Note that connection will always fail if
18 // both ends use this mode. 22 // both ends use this mode.
19 NAT_TRAVERSAL_DISABLED, 23 NAT_TRAVERSAL_DISABLED,
20 24
(...skipping 17 matching lines...) Expand all
38 42
39 // |min_port| and |max_port| specify range (inclusive) of ports used by 43 // |min_port| and |max_port| specify range (inclusive) of ports used by
40 // P2P sessions. Any port can be used when both values are set to 0. 44 // P2P sessions. Any port can be used when both values are set to 0.
41 int min_port; 45 int min_port;
42 int max_port; 46 int max_port;
43 }; 47 };
44 48
45 } // namespace remoting 49 } // namespace remoting
46 50
47 #endif // REMOTING_HOST_NETWORK_SETTINGS_H_ 51 #endif // REMOTING_HOST_NETWORK_SETTINGS_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/host/plugin/host_script_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698