Skip to content

Commit

Permalink
Change default OpenFlow TCP port to 6653
Browse files Browse the repository at this point in the history
  • Loading branch information
SUGYO committed Nov 28, 2013
1 parent 6545dcc commit 817c1bd
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions features/switch_manager.feature
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Feature: switch_manager help
-s, --switch=PATH the command path of switch
-n, --name=SERVICE_NAME service name
-p, --port=PORT server listen port (default 6633)
-p, --port=PORT server listen port (default 6653)
-d, --daemonize run in the background
-l, --logging_level=LEVEL set logging level
-h, --help display this help and exit
Expand All @@ -29,7 +29,7 @@ Feature: switch_manager help
-s, --switch=PATH the command path of switch
-n, --name=SERVICE_NAME service name
-p, --port=PORT server listen port (default 6633)
-p, --port=PORT server listen port (default 6653)
-d, --daemonize run in the background
-l, --logging_level=LEVEL set logging level
-h, --help display this help and exit
Expand Down
2 changes: 1 addition & 1 deletion features/trema.run.feature
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Feature: run trema application with `trema run' command
vswitch { datapath_id "0xabc" }
"""
And wait until "learning_switch" is up
Then "switch_manager" should be executed with option = "--daemonize --port=6633 -- port_status::learning_switch packet_in::learning_switch state_notify::learning_switch"
Then "switch_manager" should be executed with option = "--daemonize --port=6653 -- port_status::learning_switch packet_in::learning_switch state_notify::learning_switch"
And "learning_switch" should be executed with option = "--name learning_switch -i 0xabc"


Expand Down
2 changes: 1 addition & 1 deletion ruby/trema/dsl/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class Configuration
# @return [Configuration]
#
def initialize
@port = 6633
@port = 6653
@apps = Trema::App.clear
@hosts = Trema::Host.clear
@links = Trema::Link.clear
Expand Down
10 changes: 5 additions & 5 deletions spec/trema/dsl/runner_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module DSL

context = mock(
"context",
:port => 6633,
:port => 6653,
:tremashark => nil,
:switch_manager => nil,
:packetin_filter => nil,
Expand All @@ -67,7 +67,7 @@ module DSL
:hosts => {},
:switches => {},
:apps => {},
:port => 6633
:port => 6653
)

Runner.new( context ).run
Expand Down Expand Up @@ -96,7 +96,7 @@ module DSL
:hosts => {},
:switches => {},
:apps => {},
:port => 6633
:port => 6653
)

Runner.new( context ).run
Expand Down Expand Up @@ -138,7 +138,7 @@ module DSL
:hosts => { "host0" => host0, "host1" => host1, "host2" => host2 },
:switches => {},
:apps => {},
:port => 6633
:port => 6653
)

Runner.new( context ).run
Expand All @@ -164,7 +164,7 @@ module DSL
:hosts => {},
:switches => { "switch0" => switch0, "switch1" => switch1, "switch 2" => switch2 },
:apps => {},
:port => 6633
:port => 6653
)

Runner.new( context ).run
Expand Down
2 changes: 1 addition & 1 deletion spec/trema/dsl/syntax_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

describe Trema::DSL::Syntax do
before( :each ) do
@context = mock( "context", :port => 6633, :dump_to => nil )
@context = mock( "context", :port => 6653, :dump_to => nil )
@syntax = Trema::DSL::Syntax.new( @context )
end

Expand Down
2 changes: 1 addition & 1 deletion spec/trema/shell/vswitch_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

context "executed within a shell" do
before {
$config = mock( "config", :port => 6633 )
$config = mock( "config", :port => 6653 )
$context = mock( "context", :dump => true )
}
after { Trema::OpenflowSwitch[ "0xabc" ].shutdown! if Trema::OpenflowSwitch[ "0xabc" ] }
Expand Down
4 changes: 2 additions & 2 deletions src/lib/openflow.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
#endif


#define OFP_TCP_PORT 6633
#define OFP_SSL_PORT 6633
#define OFP_TCP_PORT 6653
#define OFP_SSL_PORT 6653


// 7.1 OpenFlow Header
Expand Down
2 changes: 1 addition & 1 deletion src/switch/README
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The switch program can be run using the following steps:

$ cd $TREMA_HOME
$ sudo -E ./objects/switch/switch/switch --datapath_id=1 \
--server_ip=10.0.0.1 --server_port=6633 --switch_ports=eth0,eth1
--server_ip=10.0.0.1 --server_port=6653 --switch_ports=eth0,eth1

This would create and use a datapath_id of 1 attempt to connect to
controller with ip address 10.0.0.1 using the port 6333. Two switch
Expand Down
2 changes: 1 addition & 1 deletion src/switch/switch/parse-options.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ set_default_opts( struct switch_arguments *args, const struct option long_option
args->datapath_ports = "",
args->datapath_id = 1,
args->server_ip = 0x7f000001,
args->server_port = 6633,
args->server_port = 6653,
args->max_flow_entries = UINT8_MAX;
args->run_as_daemon = false,
args->options = long_options;
Expand Down
2 changes: 1 addition & 1 deletion unittests/switch_manager/switch_manager_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ test_switch_manager_main_and_port_option_succeeded() {

char *argv[] = {
( char * )( uintptr_t )"switch_manager",
( char * )( uintptr_t )"--port=6633",
( char * )( uintptr_t )"--port=6653",
NULL,
};
int argc = ARRAY_SIZE( argv ) - 1;
Expand Down

0 comments on commit 817c1bd

Please sign in to comment.